Skip to content

Commit

Permalink
pip: Update docs about using pip_find_build_deps script
Browse files Browse the repository at this point in the history
+ remove old links to Cachito repository

Signed-off-by: Michal Šoltis <[email protected]>
  • Loading branch information
slimreaper35 committed Jan 7, 2025
1 parent d659e58 commit 679af4f
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions docs/pip.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,16 +432,11 @@ but contains build dependencies rather than runtime dependencies.
*Note: this file must contain all the transitive build dependencies of each of your transitive runtime dependencies
(you are installing dependencies from source).*

There's no great way to generate such a file. As far as we know, the best solution is pip-compile combined with this
standalone script that lives in the old Cachito repo:
[pip\_find\_builddeps.py](https://github.com/containerbuildsystem/cachito/blob/master/bin/pip_find_builddeps.py).

#### Prerequisites

Generate a [fully resolved requirements.txt](#requirementstxt)

Get the script ([download](https://raw.githubusercontent.com/containerbuildsystem/cachito/master/bin/pip_find_builddeps.py)
directly from Github, it has no runtime dependencies other than pip)
There's no great way to generate such a file. Together with pip-compile, you can use the
[hack/pip\_find\_build_deps.py](https://github.com/containerbuildsystem/cachi2/blob/main/hack/pip_find_build_deps.py)
script if you already have our repository cloned. If not then you can download the script directly from Github
[here](https://raw.githubusercontent.com/containerbuildsystem/cachi2/main/hack/pip_find_build_deps.py)
(it has no runtime dependencies other than pip).

If your project itself has build dependencies (typically defined in pyproject.toml), copy them to `requirements-build.in`.

Expand All @@ -466,10 +461,10 @@ pdm-pep517

**Usage:**

Run the `pip_find_builddeps.py` script and pip-compile the output:
Run the `pip_find_build_deps.py` script and pip-compile the output:

```shell
pip_find_builddeps.py requirements.txt \
pip_find_build_deps.py requirements.txt \
--append \
--only-write-on-update \
-o requirements-build.in
Expand Down

0 comments on commit 679af4f

Please sign in to comment.