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

Detect and draw Python dependency tree #7

Open
abitrolly opened this issue Aug 19, 2021 · 6 comments
Open

Detect and draw Python dependency tree #7

abitrolly opened this issue Aug 19, 2021 · 6 comments

Comments

@abitrolly
Copy link
Member

abitrolly commented Aug 19, 2021

Need a way to quickly draw pip dependency tree for troubleshooting various build problems like this one.

...
 Downloading opencv_python_headless-4.5.3.56-cp37-cp37m-manylinux2014_x86_64.whl (37.1 MB)
Collecting wxpython<4.1
  Downloading wxPython-4.0.7.post2.tar.gz (68.9 MB)
...
ERROR: Command errored out with exit status 1: /home/travis/virtualenv/python3.7.1/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ngyqp946/wxpython_7c7fa4b7ce23477a873494227362d125/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ngyqp946/wxpython_7c7fa4b7ce23477a873494227362d125/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1eyqbdoh/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/virtualenv/python3.7.1/include/site/python3.7/wxpython Check the logs for full command output.
...
@abitrolly
Copy link
Member Author

abitrolly commented Aug 20, 2021

deps.cloud (server-side indexer + CLI)

Example

Installing CLI that interacts with https://api.deps.cloud

brew tap depscloud/tap
brew install depscloud-cli
# deps {"version":"0.3.5","commit":"4d94a021e15d60f20ede00df7de2fd9149159928","date":"2021-06-07T13:46:53Z"}

Querying gave no results, not errors.

deps get dependencies -l python -n https://github.com/jonmatthis/freemocap

It is not clear if https://github.com/jonmatthis/freemocap needs to be added to the server side manually. There seems to be no command to do this from CLI.

The deployment docs mention extractor, tracker and indexer , but it is again not clear what component does what, and how to run one.

Looking at the extractor source it seems that it is the right tool, but it looks like it is server side only.

References

@abitrolly
Copy link
Member Author

abitrolly commented Aug 21, 2021

pipgrip (Python CLI)

Installs all deps as wheels and analyzes them.

Example

export GITREPO=https://github.com/jonmatthis/freemocap
podman run --rm -it python:3 bash -c "\
    pip3 install pipgrip && \
    git clone --depth 1 $GITREPO app && \
    cd app && \
    pipgrip . -v --tree \
"

@abitrolly
Copy link
Member Author

abitrolly commented Sep 3, 2021

pip-tools (Python CLI)

Add comments to requirements.txt that explain where things are coming from.

Example

... TBD

@abitrolly
Copy link
Member Author

abitrolly commented Sep 3, 2021

pipdeptree` (Python CLI)

Shows dependency tree for installed packages.

Example

... TBD

@abitrolly
Copy link
Member Author

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