dependency-check / dependency-check/DependencyCheck

Request: Support Python's setup.py

Open
#549 0 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
7.7k
Forks
1.4k
Avg merge
9d 22h
Merged PRs (30d)
13

Description

`setup.py` appears to be the current standard and is more popular than `requirements.txt`. However, it is also harder to deal with since it is just code and people do odd things in code. Some applications have both `requirements.txt` and `setup.py` where `setup.py` just reads in requirements from `requirements.txt`.

`setup.py` will include a call to `setup()` with the `install_requires` keyword:

``` python
setup(
# other metadata here...
install_requires=[ ... ],
)
```

The requirements appear to have a similar syntax to `requirements.txt`.

Examples:
- [Ansible](https://github.com/ansible/ansible/blob/devel/setup.py#L25)
*[Flask](https://github.com/pallets/flask/blob/master/setup.py#L73)
- [GeoNode](https://github.com/GeoNode/geonode/blob/874041199752bcca5d1b3a7996d696e0b279017f/setup.py#L79)
- [bandersnatch](https://bitbucket.org/pypa/bandersnatch/src/eb2769ffeb34aca455335b0b5faa4be2dd0d1104/setup.py?fileviewer=file-view-default#setup.py-17)
- [asciimatics](https://github.com/peterbrittain/asciimatics/blob/master/setup.py#L53)

It's also weirdly common to put the requirements in a variable first:
- [sentry](https://github.com/getsentry/sentry/blob/master/setup.py#L90)
- [watchdog](https://github.com/gorakhargosh/watchdog/blob/master/setup.py#L84)
- [httpie](https://github.com/jkbrzt/httpie/blob/master/setup.py#L37)
- [certbot](https://github.com/certbot/certbot/blob/master/setup.py#L34)
- [Kyoukai](https://github.com/SunDwarf/Kyoukai/blob/master/setup.py#L22)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.