pipreqs
pipreqs copied to clipboard
Allow specification of target system
Currently, pipreqs uses the host system when compiling requirements (OS and Python version).
There should be options to compile what the requirements would be on any specific Python version and OS. For instance, pip download works this way and allows the user to download the package wheel for a different system:
https://pip.pypa.io/en/stable/reference/pip_download/#examples
For example,
pip download \
--only-binary=:all: \
--platform linux_x86_64 \
--python-version 3 \
--implementation cp \
--abi cp34m \
SomePackage
This makes a difference in some cases. For example, importlib.metadata is a built-in for >= Py 3.7 but otherwise needs to put into the Python requirements file. It should be possible to generate the requirements for Py 3.5 on Py 3.7 and vice-versa.