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.1.tar.gz (10.6 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.1-py2.py3-none-any.whl (12.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for vendorize-0.2.1.tar.gz
Algorithm Hash digest
SHA256 31f72bef2e49a6cec0e0335025eb687d21e4cdd9d81e7299d588a182c5a0c928
MD5 d33ac6beed650e1868099ae7dd7ba0ff
BLAKE2b-256 51748ec16cdb4ffc3e0e80429b6858276bece3a090c794ec362c851d6c557bb5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vendorize-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f05d756044657c30e7d46591a5f27009d4611903999df1cecbf791eebc3bc2ce
MD5 a4b75671550244ce2f732b858800eae1
BLAKE2b-256 18819aec35fcb66fb25df4032d2615b362e5727fabc22c76d291144acb9338e7

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