0x48piraj / 0x48piraj/rqmts

Fails to detect on some modules

Open Beginner friendly
#4 2 comments 0 reactions 0 assignees View on GitHub
bug
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.