pip-download
pip-download copied to clipboard
Can't download Linux only package on Windows
Running pip-download -p manylinux_x86_64 gnureadline
on windows fails due to the following:
gnureadline
setup.py
contains the check:
if sys.platform == 'win32':
sys.exit('Error: this module is not meant to work on Windows (try pyreadline instead)')
Now, since pip (and therefore pip-download) parses the setup.py file, the operation fails (though the .tar.gz is downloaded successfully).
I wonder if this can be fixed by pip-download, so this package (and others which use this kind of weird checks) can be downloaded (by mocking sys.platform
according to --platform-tag
? by handling failed runs of setup.py
?).
Sorry for the late reply, I am working on it. It may take some time.
Do you know any other Linux only packages ? Is this common? I used the monkey patch and import pip to fix this. However, none of these techniques are perfect.
# monkey patch
distutils.util.get_platform = lambda: platform
# import pip
from pip._internal import main as pip_main
What's your opinion?