Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extras_require: are installed by default #1242

Closed
FRidh opened this issue Dec 30, 2017 · 3 comments
Closed

extras_require: are installed by default #1242

FRidh opened this issue Dec 30, 2017 · 3 comments

Comments

@FRidh
Copy link

FRidh commented Dec 30, 2017

Installing jupyter_client with

python setup.py bdist_wheel
pip install *.whl

will attempt to install the extras_require listed in the setup.py.

  • setuptools 38.2.5
  • pip 9.0.1
  • wheel 0.30.0

The same actually happens when using

pip install jupyter_client

where it uses wheels.

@benoit-pierre
Copy link
Member

If you're referring to the fact that pytest is installed too, I think this is a bug in the wheel package.

This:

        'test:python_version >= "3.4" or python_version == "2.7"': ['pytest'],

get converted to:

> unzip -p dist/jupyter_client-5.2.0-py2.py3-none-any.whl '*/METADATA' | grep 'pytest;'
Requires-Dist: pytest; python_version >= "3.4" or python_version == "2.7" and extra == 'test'

IMHO, the wheel package should automatically parenthesize the original environment marker so the metadata becomes:

Requires-Dist: pytest; (python_version >= "3.4" or python_version == "2.7") and extra == 'test'

And jupyter_client' setup.py should also be patched as a workaround:

--- jupyter_client-5.2.0/setup.py       2017-12-18 13:24:57.000000000 +0100
+++ jupyter_client/setup.py     2017-12-30 15:02:21.711695601 +0100
@@ -86,7 +86,7 @@
     extras_require   = {
         'test': ['ipykernel', 'ipython', 'mock'],
         'test:python_version == "3.3"': ['pytest<3.3.0'],
-        'test:python_version >= "3.4" or python_version == "2.7"': ['pytest'],
+        'test:(python_version >= "3.4" or python_version == "2.7")': ['pytest'],
     },
     cmdclass         = {
         'bdist_egg': bdist_egg if 'bdist_egg' in sys.argv else bdist_egg_disabled,

@FRidh
Copy link
Author

FRidh commented Dec 30, 2017

Thanks @benoit-pierre!

cc maintainer of wheel @agronholm
cc maintainer of jupyter_client @takluyver @minrk @Carreau

Carreau added a commit to Carreau/jupyter_client that referenced this issue Dec 30, 2017
Du to a likely bug in wheel, the conditional dependency on pytest ends
up being unconditional. Seem like adding parenthesis fix that (as a work
around).

See pypa/setuptools#1242
Closes jupyter#324
@Carreau
Copy link
Contributor

Carreau commented Dec 30, 2017

Thanks for the ping and tracking that down, I've opened jupyter/jupyter_client#324 to track this, we'll fix this soon (when on a better network) and release a 5.2.1 of Jupyter_client soon.

@FRidh FRidh closed this as completed Dec 30, 2017
Carreau added a commit to Carreau/jupyter_client that referenced this issue Dec 30, 2017
Du to a likely bug in wheel, the conditional dependency on pytest ends
up being unconditional. Seem like adding parenthesis fix that (as a work
around).

See pypa/setuptools#1242
Closes jupyter#324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants