Allow specification of target system
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
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,
```bash
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.
Contributor guide
Research direction
Start by reviewing pipreqs' requirement-compilation entry point and the pip download option examples linked in the issue. The work is done when users can specify a target Python version and operating system and pipreqs generates requirements appropriate for that target rather than the host system.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100