From 5357724b57453beb27ee40800f904b2741931c9e Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jan 19 2022 10:18:35 +0000 Subject: Python: Add a warning about git tarballs and setuptools_scm --- diff --git a/guidelines/modules/ROOT/pages/Python.adoc b/guidelines/modules/ROOT/pages/Python.adoc index 0cb0c12..43eebd4 100644 --- a/guidelines/modules/ROOT/pages/Python.adoc +++ b/guidelines/modules/ROOT/pages/Python.adoc @@ -1136,6 +1136,16 @@ When using sources from PyPI, you can use the <> to generate the proper URL. +WARNING: Some Python packages use `git` +(or a similar version control system) +to determine the version, +for example via https://pypi.org/project/setuptools-scm/[setuptools_scm]. +When using sources from PyPI, +the git-derived version information is usually hardcoded in some file. +When using a tarball from a git forge, +the version information is missing and must be manually provided by the packager, +e.g. by setting the `SETUPTOOLS_SCM_PRETEND_VERSION` environment variable in `+%generate_buildrequires+` and `+%build+` sections of the spec file. + == Example spec file[[_example_python_spec_file]] The following is a viable spec file