Skip to content

Commit 2023dc7

Browse files
author
Andy Freeland
committed
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
1 parent 7f3dd99 commit 2023dc7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[bdist_wheel]
2+
universal=1

setup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
import sys
2-
31
from setuptools import setup
42

53

6-
dependencies = ['pytest>=2.4']
7-
if sys.version_info < (3, 3):
8-
dependencies.append('mock')
9-
104
setup(
115
name='pytest-mock',
126
version='0.7.0',
@@ -15,7 +9,12 @@
159
},
1610
py_modules=['pytest_mock'],
1711
platforms='any',
18-
install_requires=dependencies,
12+
install_requires=[
13+
'pytest>=2.4',
14+
],
15+
extras_require={
16+
':python_version<"3.3"': ['mock'],
17+
},
1918
url='https://github.com/pytest-dev/pytest-mock/',
2019
license='LGPL',
2120
author='Bruno Oliveira',

0 commit comments

Comments
 (0)