Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find all libraries required by a given package #3

Open
jackmaney opened this issue Mar 20, 2015 · 0 comments
Open

Find all libraries required by a given package #3

jackmaney opened this issue Mar 20, 2015 · 0 comments

Comments

@jackmaney
Copy link
Owner

  • Use ast on all of the .py files and get a list of imported modules.
  • From this list, remove modules that are:
    • Built-in to Python (via stdlib_list), or
    • In the given package itself (might be tricky...).
  • Use pkg_resources.require on any remaining modules in the list to see which are installed (see this useful Stack Overflow answer).
  • Return a report listing (if found):
    • Modules that are imported but not found.
    • Modules that were listed as requirements, but not actually imported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant