Helps to control project dependencies and provides
Project description
Py3DepHell
This project presents tools to work with dependencies and provides of python3 projects.
py3req
This module detects dependencies of python3 packages. It has verbose --help option, but here is simple example how to use it:
py3prov
This module generate provides for python3 packages. As for py3req its --help is verbose enough
How to
Imagine you have simple project like this one:
src/
├── pkg1
│ ├── mod1.py
│ └── subpkg
│ └── mod3.py
└── tests
└── test1.py
Now you want to detect its dependencies:
% python3 -m py3dephell.py3req --pip_format src
unittest
re
re
Feel free to make it more verbose:
% python3 -m py3dephell.py3req --pip_format --verbose src
py3prov: detected potential module:src
/tmp/.private/kotopesutility/src/tests/test1.py:unittest
/tmp/.private/kotopesutility/src/pkg1/mod1.py:requests os
/tmp/.private/kotopesutility/src/pkg1/subpkg/mod3.py:re
As you can see, there are some modules from standard library, so let py3req to learn it:
% python3 -m py3dephell.py3req --pip_format --add_prov_path /usr/lib64/python3.11 src
requests
That's it! But what if we want to detect its provides, to understand which dependencies it could satisfy? Let's use py3prov!
% python3 -m py3dephell.py3prov src
test1
tests.test1
src.tests.test1
mod1
pkg1.mod1
src.pkg1.mod1
mod3
subpkg.mod3
pkg1.subpkg.mod3
src.pkg1.subpkg.mod3
Yeah, let's enhance the verbosity level!
% python3 -m py3dephell.py3prov --verbose src/pkg1 src/tests
src/tests:['test1', 'tests.test1', 'src.tests.test1']
src/pkg1:['mod1', 'pkg1.mod1', 'src.pkg1.mod1', 'mod3', 'subpkg.mod3', 'pkg1.subpkg.mod3', 'src.pkg1.subpkg.mod3']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for py3dephell-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94e0e42201ca4cbc87d08d6e62846136443f419362f74930ca3ef2de28ba10a4 |
|
MD5 | e0b5b5dfe5f466f9f2138627f14bee64 |
|
BLAKE2b-256 | 96d576a92daa0eb95a69ef95cc8b5d83eae2b5b0966539ee85737499f34c8154 |