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.2.2.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vendorize-0.2.2-py2.py3-none-any.whl (12.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: vendorize-0.2.2.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for vendorize-0.2.2.tar.gz
Algorithm Hash digest
SHA256 991aaa96b988df4dc779c085e3e8ac5c461d7210ca5e6d6707b9cde9ec29d57c
MD5 dd6dbf7c3a51f71c7ee3cf304af9c831
BLAKE2b-256 f2548b91de24bb54d8a140c74669a4c00c7e5c2a2d26e449663b1c205e490b95

See more details on using hashes here.

File details

Details for the file vendorize-0.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: vendorize-0.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for vendorize-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 08ee120d77aa76917b1ccf6924139e02b8b96e7e6f457d8d0d4048430bb04442
MD5 317d87f97b3f7f071fd4b6756552b75e
BLAKE2b-256 1d5075c2c942b26413e38d140fa741ada09bbe01ae7e5e7a10aed8ed62ae6e34

See more details on using hashes here.

Supported by

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