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. requires 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"
requires = [
    "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.0.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.0-py2.py3-none-any.whl (12.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: vendorize-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 666bd030306041566d19252bfd78f7ea487af42b5cbd71d5cecc50daf867f09b
MD5 cb8fba9354e0e67e03c07d2f0fce8983
BLAKE2b-256 9b70c3ead337adac1884260b52bdca46a424cd931b65981d6e4320986b5aabe5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vendorize-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3daa3632603b94e5af3bbfb19574b3dc6d5490fd9fd76634a266b600214578a0
MD5 3a7fb0dd740058db248fa60fd1825868
BLAKE2b-256 f3ee67ec6d066450ca0f6d5669e7d7ea25613bc099eeb0a843542a6988895421

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