Skip to main content

python-vendorize

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.ini. In the vendorize section, the target option describes where vendorized dependencies should be placed. Each dependency should have its own section named require:${REQUIREMENT}. $REQUIREMENT 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.ini

vendorize.ini might look something like:

[vendorize]
target=hello/_vendor
[require:six]

I can then run python-vendorize in the same directory as vendorize.ini. The directory structure would then be something like:

- hello
  - _vendor
    - six.dist-info
      - ...
    - __init__.py
    - six.py
  - __init__.py
- setup.py
- vendorize.ini

In hello/__init__.py, six can be imported from _vendor:

from ._vendor import six

Installation

pip install vendorize

Metadata

Release files for vendorize 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vendorize 0.1.0
File Size Uploaded Provenance
vendorize-0.1.0.tar.gz 12.6 kB Without provenance Details

Release files / vendorize-0.1.0.tar.gz

Download URL vendorize-0.1.0.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
25f42cbcad74cb9612e51d0c5ffe3875df3f883436c7413dbe103cac5c2bce25
BLAKE2b-256 checksum
How to use checksums
fe4eedc45649b99e676e85930aa8fc46bb34dbac0a2505a9a7e2ff424fde0f64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for vendorize 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page