libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] Kami opened a new pull request #1393: Fix wheel METADATA and ensure conditional dependencies are handled correctly
Date Sat, 21 Dec 2019 17:32:13 GMT
Kami opened a new pull request #1393: Fix wheel METADATA and ensure conditional dependencies
are handled correctly
URL: https://github.com/apache/libcloud/pull/1393
 
 
   In a prevision version we added some more conditional dependencies - ``typing`` and ``enum34``
packages which are needed for Python versions older than 3.4.0.
   
   Those versions were dynamically included as part of ``install_requirements`` so the actual
``Reqires-Dist`` metadata entry which is part of the wheel file was not correct and depended
on the version of Python which was used to generate the wheel.
   
   ## Proposed Solution
   
   This pull request fixes that by utilizing PEP 508 (https://www.python.org/dev/peps/pep-0508/#environment-markers)
environment markers notation.
   
   In addition to that, we also use ``extra_requires`` fallback notation for users who install
Libcloud using old versions of pip and setuptools (reference: https://hynek.me/articles/conditional-python-dependencies/).
   
   Keep in mind that this change now requires a Libcloud committer which is making a release
to generate a wheel using a recent version of setuptools for the METADATA entries to be correct.
   
   I updated ``setup.py`` to fail on ``bdist_wheel`` command if an older version is used.
I will also document this under committer docs.
   
   I tested it locally using various Python versions and confirmed it works correctly.
   
   The universal wheel metadata now looks like this:
   
   ```bash
   ...
   Requires-Dist: requests (>=2.5.0)
   Requires-Dist: backports.ssl-match-hostname ; python_version < "2.7.9"
   Requires-Dist: typing ; python_version < "3.4.0"
   Requires-Dist: enum34 ; python_version < "3.4.0"
   ...
   ```
   
   ## Note on supporting Python <= 3.4.0
   
   In the very near future, we plan to drop support for Python <= 3.4.0.  At that point,
this change won't be needed anymore and we will be able to simplify ``setup.py``.
   
   The reason why I made this change is so we can make another release in the ``v2.x`` release
series which contains the correct wheel metadata entries. This will be the last release which
will support Python <= 3.4.0.
   
   Resolves #1392.
   
   Thanks to @arterrey for reporting this issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message