diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-03-03 11:10:15 -0800 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-03-03 11:24:36 -0800 |
commit | 193292bc4d0ce70bb351d1e748a54c9898a5648b (patch) | |
tree | 2ef9d44a37d3e985d716e9a20f0b882e75415314 /setup.cfg | |
parent | 88a23e8aaacddf727ce01040dab31b9f7f55c497 (diff) | |
download | isort-193292bc4d0ce70bb351d1e748a54c9898a5648b.tar.gz |
Use environment markers to define Python2 specific dependencies
The "futures" package need only be installed on Python 2. To specify a
conditional dependency, setuptools, pip, and wheel support "environment
markers". Use this mechanism instead of adding install time logic to the
setup.py file.
Allows restoring universal wheel support, allowing a single wheel for
all version of Python.
For additional details on wheel support for environment markers, see the
documentation at:
https://wheel.readthedocs.io/en/stable/index.html#defining-conditional-dependencies
> Defining conditional dependencies
>
> In wheel, the only way to have conditional dependencies (that might
> only be needed on certain platforms) is to use environment markers as
> defined by PEP 426.
>
> ...
>
> As of setuptools 36.2.1, you can pass extras as part of
> install_requires. The above requirements could thus be written like
> this:
>
> install_requires=[
> 'argparse; python_version=="2.6"',
> 'keyring; extra=="signatures"',
> 'pyxdg; extra=="signatures" and sys_platform!="win32"',
> 'ed25519ll; extra=="faster-signatures"'
> ]
Diffstat (limited to 'setup.cfg')
-rw-r--r-- | setup.cfg | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1,3 +1,6 @@ +[bdist_wheel] +universal = 1 + [flake8] max-line-length = 160 ignore = |