Fails to detect on some modules
- Dominant language
- Python
- Stars
- 6
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
#### Current behavior :
`rqmts.py` fails to detect packages which have different names.
#### Expected behavior :
Successfully detects and parses out the dependency _(package version)_
#### Logcat
```
C:\Users\rqmts>py -3 rqmts.py
Enter path of the python script : C:\tests\run.py
[!] System package: `re`
[!] System package: `time`
[!] System package: `string`
[!] System package: `strgen` <---- NOT A SYSTEM PACKAGE
[!] System package: `random`
[!] System package: `os`
[!] System package: `time`
[+] Success: Parsed the dependencies correctly
[*] Saving generated requirements.txt
[+] Success: requirements.txt saved
[+] Path where it can be found: C:\tests\requirements.txt
```
#### References :
1. **[pypi-strgen](https://pypi.org/project/StringGenerator/)**
2. `pip install StringGenerator`
Contributor guide
Research direction
Look at rqmts.py to understand how it detects system packages versus external dependencies. The issue is that 'strgen' (from pypi package StringGenerator) is incorrectly flagged as a system package. Check the logic for distinguishing built-in modules from PyPI packages, possibly by comparing against a list of standard library modules. Test by running the script on a file that imports strgen to verify the fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100