Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/di/vendy
Vendy is a tool for vendoring third-party packages into your project.
https://github.com/di/vendy
Last synced: about 2 months ago
JSON representation
Vendy is a tool for vendoring third-party packages into your project.
- Host: GitHub
- URL: https://github.com/di/vendy
- Owner: di
- License: apache-2.0
- Created: 2019-05-30T16:32:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-28T01:50:33.000Z (about 1 year ago)
- Last Synced: 2025-01-03T00:43:55.400Z (about 2 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 14
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pyproject - Vendy - A tool for vendoring third-party packages into your project. (Other Tools)
README
Vendy is a tool for vendoring third-party packages into your project.
## Disclaimer:
This is not an officially supported Google product.## Example:
In a `pyproject.toml` file in the root of your package, define the target
directory (should be in the same directory as the `pyproject.toml` file), and
the packages to vendor:```toml
[tool.vendy]
target = 'my_project'
packages = [
"sampleproject==1.2.0",
]
```On the command line:
```
$ python -m vendy
[vendy] Using vendor dir: /private/tmp/my_project/my_project/_vendor
[vendy] Cleaning /private/tmp/my_project/my_project/_vendor
[vendy] Installing vendored libraries
Collecting sampleproject==1.3.0
Using cached https://files.pythonhosted.org/packages/a1/fd/3564a5176430eac106c27eff4de50b58fc916f5083782062cea3141acfaa/sampleproject-1.3.0-py2.py3-none-any.whl
Installing collected packages: sampleproject
Successfully installed sampleproject-1.3.0
[vendy] Detected vendored libraries: bin, my_data, sample
[vendy] Rewriting all imports related to vendored libs
[vendy] Downloading licenses
Collecting sampleproject==1.3.0
Using cached https://files.pythonhosted.org/packages/a6/aa/0090d487d204f5de30035c00f6c71b53ec7f613138d8653eebac50f47f45/sampleproject-1.3.0.tar.gz
Saved ./my_project/_vendor/__tmp__/sampleproject-1.3.0.tar.gz
Successfully downloaded sampleproject
[vendy] Extracting sampleproject-1.3.0/LICENSE.txt into my_project/_vendor/sampleproject.LICENSE.txt
[vendy] Revendoring complete
```Result:
```
$ tree
.
├── my_project
│ ├── __init__.py
│ └── _vendor
│ ├── bin
│ │ └── sample
│ ├── my_data
│ │ └── data_file
│ ├── sample
│ │ ├── __init__.py
│ │ └── package_data.dat
│ └── sampleproject.LICENSE.txt
└── pyproject.toml
```And you can import from the vendored library like:
```diff
-from sampleproject.foo import bar
+from myproject._vendor.sampleproject.foo import bar
```