pip-download icon indicating copy to clipboard operation
pip-download copied to clipboard

Can't download Linux only package on Windows

Open impervius opened this issue 3 years ago • 2 comments

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?).

impervius avatar Jan 08 '22 08:01 impervius

Sorry for the late reply, I am working on it. It may take some time.

youngquan avatar Mar 06 '22 14:03 youngquan

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?

youngquan avatar Mar 12 '22 12:03 youngquan