From 370c2462a5d30a3cdb25ccd0b9af4c89683c3735 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Dec 20 2018 13:52:57 +0000 Subject: python: Add information how to disable depgen on f30+ Signed-off-by: Igor Gnatenko --- diff --git a/guidelines/modules/ROOT/pages/Python.adoc b/guidelines/modules/ROOT/pages/Python.adoc index e0a15fa..91b032e 100644 --- a/guidelines/modules/ROOT/pages/Python.adoc +++ b/guidelines/modules/ROOT/pages/Python.adoc @@ -39,11 +39,15 @@ Packages MUST NOT have dependencies (either build-time or runtime) on packages n === Automatically generated dependencies -Packages MAY use the automatic Python dependency generator. This generator uses upstream egg/dist metadata (such as https://python-packaging.readthedocs.io/en/latest/dependencies.html[setuptool's install_requires]) to determine what the package should depend on. The generator parses the installed metadata from `+/usr/lib(64)?/pythonX.Y/site-packages/[^/]\+.(egg|dist)-info/requires.txt+`, so it will not work with software that uses plain https://docs.python.org/3/distutils/[distutils]. +Packages MAY use the automatic Python dependency generator. This generator uses upstream egg/dist metadata (such as https://python-packaging.readthedocs.io/en/latest/dependencies.html[setuptool's install_requires]) to determine what the package should depend on. The generator parses the installed metadata from `+/usr/lib(64)?/pythonX.Y/site-packages/[^/]+++.(egg|dist)-info/requires.txt+`, so it will not work with software that uses plain https://docs.python.org/3/distutils/[distutils]. -To enable this feature, add: +To enable this feature (F28 and F29), add: -`+%{?python_enable_dependency_generator}+` + %{?python_enable_dependency_generator} + +To disable this feature (F30 and newer), add: + + %{?python_disable_dependency_generator} Although this statement can be used anywhere in the spec, we recommend putting it just before the main package's `+%description+` declaration. This generates run time requires in the form of `+pythonX.Ydist(foo)+`. If the generated dependencies are not accurate, additional ones can still be added manually. To remove some, a packager MAY modify upstream-provided metadata (usually specified in the `setup.py` file) in the `+%prep+` section of the specfile or fall back to xref:AutoProvidesAndRequiresFiltering.adoc[filtering] those dependencies.