Skip to main content

Vendorize packages from PyPI

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vendorize-0.3.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

vendorize-0.3.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file vendorize-0.3.0.tar.gz.

File metadata

  • Download URL: vendorize-0.3.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.2

File hashes

Hashes for vendorize-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d3fc6f1ce436887f46b80ed0c13fb546a8201906d6e763d9b2aaf7ec40193792
MD5 03b91026551cc64789e5b0f3c710d6ed
BLAKE2b-256 b58084e3070c19d294b1c8036d337d4900da0bee2cd1b30fb3e72638bacbc884

See more details on using hashes here.

File details

Details for the file vendorize-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: vendorize-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.2

File hashes

Hashes for vendorize-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6c163755369d4f6120f3a69b5d2112f04bb124555550b002813265463fb43c9
MD5 5bac850b62e70f76bcd876812dab26b2
BLAKE2b-256 dbdcc66b94d76662180aa8c7e043b59fa33d777e5da54575e14e914231a72fcf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page