-
-
Notifications
You must be signed in to change notification settings - Fork 673
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
Allow wheels to determine the required dependencies #504
Allow wheels to determine the required dependencies #504
Conversation
Codecov Report
@@ Coverage Diff @@
## master #504 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 14 14
Lines 3189 3189
Branches 229 229
=====================================
Hits 3189 3189 Continue to review full report at Codecov.
|
We really need this PR, I have so much pain with my builds on CI now... @crsmithdev could you please take a look? |
setup.py
Outdated
install_requires=install_requires, | ||
install_requires=[ | ||
'python-dateutil', | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you just fix this alignment? Just remove 4 spaces, everything else is LGTM.
@ramonsaraiva updated (I believe) as you requested! Everything should be good to go! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ramonsaraiva, could you please upload new version of package with fix? There are too many people (#495) which are waiting for new version. |
This allows universal wheels to be generated and reliably installed.
Background
Version 0.11 (of arrow) introduced caching, but based on a feature that was added to the Python standard library post-2.7. This meant that arrow became un-usable with Python 2.7.
Version 0.12 was released to fix the above problem. It did this by adding the following code to setup.py:
This code declares the required dependency, but requires code to run on install to do so. Wheels do not run code at install time, rather code is run on wheel generation. This meant that generated wheels would either always require this backports package (if the wheel was generated by a system running Python 2.7) or never require it (if the wheel was generated by a system running Python 3). Even though arrow does not provide wheels on PyPI, this can still cause issues. This is because
pip
, on end user machines, will generate and cache a wheel when downloading source distributions (like arrow provides), and this pip cache, and thus the generated wheel, is shared by all version of Python installed on the end user's machine, and used for later installs.Solution
This PR declares the required dependency in a conditional way that wheel can read it on install.
Further Reading