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

Add optional dependencies, forwarding them to pymongo #38

Closed
wants to merge 1 commit into from

Conversation

arthurdarcet
Copy link

pymongo supports three optional dependencies, it would be nice to support them as well here, so that we can depend directly on motor[srv] instead of having to list both motor and pymongo[srv]

@eguven
Copy link
Contributor

eguven commented Mar 7, 2018

Not sure if this would be the same behaviour using pypi but it doesn't seem to work locally.

$ pip install -U -e .[srv]
Obtaining file:///***/***/motor
  motor 1.3.dev0 does not provide the extra 'srv'
Collecting pymongo<4,>=3.4 (from motor==1.3.dev0)
  Using cached pymongo-3.6.1-cp35-cp35m-macosx_10_6_intel.whl
Installing collected packages: pymongo, motor
  Running setup.py develop for motor
Successfully installed motor pymongo-3.6.1
$ pip freeze
-e git+git@github.com:eguven/motor.git@1a5055d06391e779f27ca6cc1e8c7ea01c59baad#egg=motor
pymongo==3.6.1

@arthurdarcet
Copy link
Author

@eguven there was indeed a typo in my commit, which I fixed.
But it's still not working: the optional dependency are ignored, probably because pymongo is listed in both install_requires and extras_require. It looks like a pip bug to me, but I don't have time to look into it for now, I'll open an issue with them when I have the time

@arthurdarcet
Copy link
Author

Actually, the issue already exists on pip: pypa/pip#3878
This PR should work once pypa/pip#3878 is merged

@ajdavis
Copy link
Member

ajdavis commented Mar 28, 2018

OK, if this feature doesn't work with pip today, it will be a long time before we can rely on all pip users to have upgraded to a version of pip that supports it. A few years minimum. Thanks for your work, unfortunately I can't accept this PR.

@ajdavis ajdavis closed this Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants