Closed
Description
See #1052
It was discovered that web3 4.7.0 would attempt to install pypiwin32 on all
platforms when installed from pypi with pip whereas a local install with setup.py or
the built tar.gz package did not.
Ref:
- pip is affected by wheel stripping PEP-508 markers pypa/pip#4614
- bdist_wheel silently discards PEP 508 environment markers pypa/wheel#181
- Fix environment markers handling pypa/setuptools#1081
setuptools had a bug where environment markers get stripped from the wheel's
MANIFEST.
I had started out building with the broken package with pip version 9.0.3 and
setuptools 28.8.0. (doh!)
$ python setup.py sdist bdist_wheel
$ grep pypiwin32 web3.egg-info/requires.txt
pypiwin32>=223;platform_system=='Windows'
$ mkdir web3_whl; cd web3_whl
$ unzip ../dist/web3-4.7.0-py3-none-any.whl
$ grep pypiwin32 web3-4.7.0.dist-info/METADATA
Requires-Dist: pypiwin32 (>=223)
Upgrading pip was not sufficient to fix the issue:
$ pip install pip --upgrade
$ pip show pip
Name: pip
Version: 18.0
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: pypa-dev@groups.google.com
License: MIT
Location: /home/dwilson/Develop/Projects/ethereum/web3.py/venv-test/lib/python3.6/site-packages
Requires:
Required-by:
$ pip show setuptools
Name: setuptools
Version: 28.8.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License: UNKNOWN
Location: /home/dwilson/Develop/Projects/ethereum/web3.py/venv-test/lib/python3.6/site-packages
Requires:
Required-by:
$ python setup.py sdist bdist_wheel
$ grep pypiwin32 web3.egg-info/requires.txt
pypiwin32>=223;platform_system=='Windows'
$ grep pypiwin32 web3-4.7.0.dist-info/METADATA
Requires-Dist: pypiwin32 (>=223)
After upgrading setuptools the MANIFEST file included in the wheel contains the
environment markers.
$ pip install setuptools --upgrade
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/66/e8/570bb5ca88a8bcd2a1db9c6246bb66615750663ffaaeada95b04ffe74e12/setuptools-40.2.0-py2.py3-none-any.whl
Installing collected packages: setuptools
Found existing installation: setuptools 28.8.0
Uninstalling setuptools-28.8.0:
Successfully uninstalled setuptools-28.8.0
Successfully installed setuptools-40.2.0
$ grep pypiwin32 web3-4.7.0.dist-info/METADATA
Requires-Dist: pypiwin32 (>=223); platform_system == "Windows"
Metadata
Metadata
Assignees
Labels
No labels