https://github.com/timsutton/homebrew-python-vendoring-scripts
Scripts to automate vendoring migration in python-based homebrew/core formulae
https://github.com/timsutton/homebrew-python-vendoring-scripts
Last synced: 4 months ago
JSON representation
Scripts to automate vendoring migration in python-based homebrew/core formulae
- Host: GitHub
- URL: https://github.com/timsutton/homebrew-python-vendoring-scripts
- Owner: timsutton
- Created: 2024-02-18T00:24:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-18T01:49:28.000Z (almost 2 years ago)
- Last Synced: 2025-02-25T00:58:10.565Z (10 months ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# homebrew-python-vendoring-scripts
A few scripts to help automate the process of migrating most Python-based formulae back into vendored resources.
## Usage
Currently there are two scripts, which each have a hardcoded list of formulae or PyPi package names. These lists should contain the full list of formulae/packages to be vendored.
If you need to modify the formulae/pypi package lists, edit the lists in the scripts directly.
The scripts can be run out of this repo checkout, and assume you have homebrew-core tapped.
### Remove excluded PyPi packages from formula mappings
With a basic Ruby environment loaded, run the `remove-excluded-pypi-packages.rb` script to remove some the excluded packages from `pypi_formula_mappings.json`:
```bash
./remove-excluded-pypi-packages.rb
```
### Update Python resources in formulas
Run `update-formula-files.sh` next, to make the initial formula updates:
```bash
./update-formula-files.sh
```
This will (1) remove the appropriate `depends_on` lines in formulas, and (2) run `brew update-python-resources ` on all formulae which are modified (according to Git).
## Next steps
Take a look at the formula changes and see if they make sense, or might need additional edits.
If the formula didn't previously have anything vendored, it should also set its install method to use the `virtualenv_install_with_resources` method and `include Language::Python::Virtualenv` in the formula.
Test out the installation and open a PR for the formula and `pypi_formula_mappings.json` change.