From 95b9984480e7255d08b60d3ea2c362d12f3d1f91 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 12 Aug 2020 18:05:22 +0200 Subject: [PATCH] In sys.version and initial REPL message, list the source commit as "default" We create an artificial Git repo to apply patches. Python build system thinks that it's building from Git and embeds a bogus branch name into its version string: $ python3 Python 3.9.0b5 (heads/master-dirty:24c7f56, Aug 3 2020, 00:00:00) [GCC 10.2.1 20200804 (Red Hat 10.2.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. Tell configure that Git is not installed. This reverts that part of sys.version to "default". --- python3.9.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/python3.9.spec b/python3.9.spec index 7ac3648..bf05ee6 100644 --- a/python3.9.spec +++ b/python3.9.spec @@ -17,7 +17,7 @@ URL: https://www.python.org/ %global prerel rc1 %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} License: Python @@ -690,6 +690,12 @@ rm configure pyconfig.h.in %build +# The build process embeds version info extracted from the Git repository +# into the Py_GetBuildInfo and sys.version strings. +# Our Git repository is artificial, so we don't want that. +# Tell configure to not use git. +export HAS_GIT=not-found + # Regenerate the configure script and pyconfig.h.in autoconf autoheader @@ -1634,6 +1640,9 @@ CheckPython optimized # ====================================================== %changelog +* Wed Aug 12 2020 Petr Viktorin - 3.9.0~rc1-2 +- In sys.version and initial REPL message, list the source commit as "default" + * Tue Aug 11 2020 Miro HronĨok - 3.9.0~rc1-1 - Update to 3.9.0rc1