| Both sides previous revision Previous revision Next revision | Previous revision |
| python:setuptools [2023/01/04 00:00] – horizontal rule CharlieLi | python:setuptools [2023/10/12 07:30] (current) – further clarify RUN_DEPENDS CharlieLi |
|---|
| |
| ===== PY_SETUPTOOLS ===== | ===== PY_SETUPTOOLS ===== |
| A new variable ''%%${PY_SETUPTOOLS}%%'' will be introduced, in the same vein as variables for other third-party modules like ''%%${PYNUMPY}%%'' and ''%%${PY_BOOST}%%''. This variable will provide the correct dependency line for setuptools based on the tooling specified. This will act as a shorthand for those packages still needing the setuptools ''%%RUN_DEPENDS%%'' and packages that have adopted PEP-517 specifying setuptools as the build backend. | A new variable ''%%${PY_SETUPTOOLS}%%'' will be introduced, in the same vein as variables for other third-party modules like ''%%${PYNUMPY}%%'' and ''%%${PY_BOOST}%%''. This variable will provide the correct dependency line for setuptools based on the tooling specified, and is only valid for the port that it is used in. |
| | |
| | ===== Removal from RUN_DEPENDS ===== |
| | setuptools will be removed from ''%%RUN_DEPENDS%%'' to clean up runtime environments and reduce the dependency tree. Ports shall never specify ''%%RUN_DEPENDS=${PY_SETUPTOOLS}%%'' except in the following cases: |
| | * Leaf ports (no further consumers) |
| | * Helper ports of PEP-517 build backends that use ''%%devel/py-setuptools-scm%%'' to derive versions from source code management systems (git, mercurial, etc). Other ports shall not specify these as ''%%RUN_DEPENDS%%''. |
| | Any consumers not covered by the above exceptions should add ''%%BUILD_DEPENDS=${PY_SETUPTOOLS}%%'' directly if not ''%%USE_PYTHON=distutils%%'', or preferably, work to remove the run dependency entirely. |
| | |
| | Different versions of setuptools cannot exist in the same environment. |
| |
| ===== devel/py-setuptools58 ===== | ===== devel/py-setuptools58 ===== |
| A new port ''%%devel/py-setuptools58%%'' will be introduced, allowing to pin direct execution of ''%%${PYSETUP}%%'' to this version. Packages that have adopted PEP-517 specifying setuptools as the build backend will continue using the main setuptools port, which can then be updated on a more timely basis. | A new port ''%%devel/py-setuptools58%%'' will be introduced, allowing to pin direct execution of ''%%${PYSETUP}%%'', ie ''%%USE_PYTHON=distutils%%'', to this version. Packages that have adopted PEP-517 specifying setuptools as the build backend will continue using the main setuptools port, which can then be updated on a more timely basis. |
| |
| ===== Removal from RUN_DEPENDS ===== | ===== Disable compiling bytecode ===== |
| setuptools will be removed from ''%%RUN_DEPENDS%%'' by default. This should clean up runtime environments and reduce the dependency tree. Ports are free to re-add setuptools to ''%%RUN_DEPENDS%%'' on an individual basis if functionality is still needed at runtime. | ''%%${PYDISTUTILS_INSTALLARGS}%%'' will change to not compile bytecode. For CPython, [[Python/CompiledPackages|a trigger does this automatically, including cleanup]]. |
| |
| ---- | ---- |