Skip to content

amitsaha/parse_setup_py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parse setup.py

Parse a Python package's setup.py to return:

  • the package name
  • the dependency names (not the versions)

See parse_setup_py.py and tests.

Notes

Some things I learned along the way:

(Roughly) pip install uses the following to invoke python setup.py <arg>:

# Shim to wrap setup.py invocation with setuptools
SETUPTOOLS_SHIM = (
    "import setuptools, tokenize;__file__=%r;"
    "exec(compile(getattr(tokenize, 'open', open)(__file__).read()"
    ".replace('\\r\\n', '\\n'), __file__, 'exec'))"

)

setup() function is defined in distutils.core.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages