bndr / bndr/pipreqs

<package>/<package>.egg-info directories cause bad versions in requirements.txt

Open
#58 0 comments 5 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
7.5k
Forks
424
PR merge metrics
No merged PRs in 30d

Description

I usually install multiple packages under development in a virtualenv using `python setup.py develop`. As a result, I get a `.egg-info` directory (which contains `top_level.txt` etc.).

In presence of such packages, the `requirements.txt` file created by `pipreqs` contains entries like this:

mypackage.egg==info
otherpackage.egg==info

Instead, either the version from `setup.py` should be used, or maybe the version should be omitted altogether.

(see also #33 which was about checking local versions of packages)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by installing multiple packages with `python setup.py develop`, then run pipreqs and inspect the generated `requirements.txt`. Trace how `.egg-info` entries are interpreted; done when they no longer produce names such as `mypackage.egg==info`, with either the package version from `setup.py` or no version recorded.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.