python-vendorize allows pure-Python dependencies to be vendorized: that is, the Python source of the dependency is copied into your own package. Best used for small, pure-Python dependencies to avoid version conflicts when other packages require a different version of the same dependency.
Dependencies you want vendorizing should be specified in vendorize.toml. target should be a string containing the path where vendorized dependencies should be placed, relative to the directory that vendorize.toml is in. packages should be a list of strings containing the dependencies. Each of these strings can be anything that pip would understand, such as a package name, a package name with version constraints or an URL. Dependencies can then be vendorized using python-vendorize.
For instance, suppose I want to vendorize six so it can be used from the package hello. The directory structure would be something like:
- hello - __init__.py - setup.py - vendorize.toml
vendorize.toml might look something like:
target = "hello/_vendor"
packages = [
"six",
]
I can then run python-vendorize in the same directory as vendorize.toml. The directory structure would then be something like:
- hello
- _vendor
- six.dist-info
- ...
- __init__.py
- six.py
- __init__.py
- setup.py
- vendorize.toml
In hello/__init__.py, six can be imported from _vendor:
from ._vendor import six
Installation
pip install vendorize
Release files for vendorize 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vendorize-0.3.0.tar.gz | 11.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vendorize-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.2 kB
Release files / vendorize-0.3.0.tar.gz
| Download URL | vendorize-0.3.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3fc6f1ce436887f46b80ed0c13fb546a8201906d6e763d9b2aaf7ec40193792
|
|
BLAKE2b-256 checksum How to use checksums |
b58084e3070c19d294b1c8036d337d4900da0bee2cd1b30fb3e72638bacbc884
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.2
|
Release files / vendorize-0.3.0-py3-none-any.whl
| Download URL | vendorize-0.3.0-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6c163755369d4f6120f3a69b5d2112f04bb124555550b002813265463fb43c9
|
|
BLAKE2b-256 checksum How to use checksums |
dbdcc66b94d76662180aa8c7e043b59fa33d777e5da54575e14e914231a72fcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.2
|