From e0e84843edd9f8aec540b223e4bae65c24f8b38a Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sat, 11 Jul 2020 13:31:58 -0400 Subject: [PATCH] xbps-src: Explain python module dependencies in Manual.md --- Manual.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Manual.md b/Manual.md index 10082b68da5..bdfe9dffb81 100644 --- a/Manual.md +++ b/Manual.md @@ -1444,9 +1444,18 @@ Python packages should be built with the `python{,2,3}-module` build style, if p This sets some environment variables required to allow cross compilation. Support to allow building a python module for multiple versions from a single template is also possible. -To allow cross compilation, the `python-devel` package (for python 2.7) must be added -to `hostmakedepends` and `makedepends`. If any other python version is also supported, -for example python3.4, those must also be added as host and target build dependencies. +Python packages that rely on `python-setuptools` or `python3-setuptools` should generally map +`install_requires` dependencies in `setup.py` to `depends` in the template, and `setup_requires` +dependencies to `hostmakedepends` in the template. If a python package includes a compiled +extension, the `python-devel` (for python 2.7) or `python3-devel` (for python 3.X) packages should +be added to `makedepends`, as should any python packages that also provide native libraries +against which the extension will be linked (even if that package is also included in +`hostmakedepends` to satisfy `setuptools`). + +**NB**: Python `setuptools` will attempt to use `pip` or `EasyInstall` to fetch any missing +dependencies at build time. If you notice warnings about `EasyInstall` deprecation or python eggs +present in `${wrksrc}/.eggs` after building the package, then those packages should be added to +`hostmakedepends`. The following variables may influence how the python packages are built and configured at post-install time: