From 2023dc7f06bdee8f483fc9e227754379ab658f10 Mon Sep 17 00:00:00 2001 From: Andy Freeland Date: Mon, 28 Sep 2015 22:43:28 -0400 Subject: [PATCH 1/3] Use PEP-0426 environment markers to build universal wheels PEP-0426 defines [environment markers][] to allow wheels to conditionally install dependencies. This won't work with really old versions of setuptools/pip, but it works with pip 1.5.6 and newer. [environment markers]: https://www.python.org/dev/peps/pep-0426/#environment-markers --- setup.cfg | 2 ++ setup.py | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..3c6e79c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/setup.py b/setup.py index dea75d5..4ca8b76 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,6 @@ -import sys - from setuptools import setup -dependencies = ['pytest>=2.4'] -if sys.version_info < (3, 3): - dependencies.append('mock') - setup( name='pytest-mock', version='0.7.0', @@ -15,7 +9,12 @@ }, py_modules=['pytest_mock'], platforms='any', - install_requires=dependencies, + install_requires=[ + 'pytest>=2.4', + ], + extras_require={ + ':python_version<"3.3"': ['mock'], + }, url='https://github.com/pytest-dev/pytest-mock/', license='LGPL', author='Bruno Oliveira', From 22a4efb46d2c5a73e15f808a7864cd8e55f798e9 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 29 Sep 2015 00:16:18 -0300 Subject: [PATCH 2/3] Fix environment variable usage --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4ca8b76..48bc1da 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,8 @@ 'pytest>=2.4', ], extras_require={ - ':python_version<"3.3"': ['mock'], + ':python_version=="2.6" or python_version=="2.7" or ' + 'python_version=="3.2"': ['mock'], }, url='https://github.com/pytest-dev/pytest-mock/', license='LGPL', From 9da3453990ace6d6de2343fbeea7e2bdb5b31201 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 29 Sep 2015 00:22:06 -0300 Subject: [PATCH 3/3] Drop explicit support for py32 and py33 --- .travis.yml | 3 +-- setup.py | 6 ++---- tox.ini | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3226a10..dff7eca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,8 @@ language: python python: - 2.6 - 2.7 - - 3.2 - - 3.3 - 3.4 + - 3.5 - pypy install: diff --git a/setup.py b/setup.py index 48bc1da..cc80f76 100644 --- a/setup.py +++ b/setup.py @@ -13,8 +13,7 @@ 'pytest>=2.4', ], extras_require={ - ':python_version=="2.6" or python_version=="2.7" or ' - 'python_version=="3.2"': ['mock'], + ':python_version=="2.6" or python_version=="2.7"': ['mock'], }, url='https://github.com/pytest-dev/pytest-mock/', license='LGPL', @@ -31,9 +30,8 @@ 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Topic :: Software Development :: Testing', ] ) diff --git a/tox.ini b/tox.ini index 0f45aff..37292da 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] # note that tox expects interpreters to be found at C:\PythonXY, # with XY being python version ("27" or "34") for instance -envlist = py26, py27, py32, py33, py34 +envlist = py26, py27, py34, py35 [testenv] commands = py.test test_pytest_mock.py \ No newline at end of file