Hello community,

here is the log from the commit of package python3 for openSUSE:Factory checked 
in at 2017-03-20 17:04:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3 (Old)
 and      /work/SRC/openSUSE:Factory/.python3.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3"

Mon Mar 20 17:04:34 2017 rev:70 rq:479250 version:3.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3/python3-base.changes     2017-02-19 
00:45:06.082069556 +0100
+++ /work/SRC/openSUSE:Factory/.python3.new/python3-base.changes        
2017-03-20 17:04:35.815940992 +0100
@@ -1,0 +2,13 @@
+Mon Mar 13 14:04:22 UTC 2017 - jmate...@suse.com
+
+- prevent regenerating AST at build-time more robustly
+- add "--without profileopt" and "--without testsuite" options to python3-base
+  to allow short circuiting when working on the package
+
+-------------------------------------------------------------------
+Sat Feb 25 20:55:57 UTC 2017 - bwiedem...@suse.com
+
+- Add 0001-allow-for-reproducible-builds-of-python-packages.patch
+  upstream https://github.com/python/cpython/pull/296 
+
+-------------------------------------------------------------------
python3.changes: same change

New:
----
  0001-allow-for-reproducible-builds-of-python-packages.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-base.spec ++++++
--- /var/tmp/diff_new_pack.Jmluc2/_old  2017-03-20 17:04:37.431712844 +0100
+++ /var/tmp/diff_new_pack.Jmluc2/_new  2017-03-20 17:04:37.431712844 +0100
@@ -59,6 +59,14 @@
 %define dynlib() 
%{sitedir}/lib-dynload/%{1}.cpython-%{abi_tag}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}.so
 ### COMMON-DEF-END ###
 
+# that thing where "without" means "default=on" and vice versa
+%bcond_without testsuite
+%if 0%{?do_profiling}
+%bcond_without profileopt
+%else
+%bcond_with    profileopt
+%endif
+
 Name:           python3-base
 Version:        3.6.0
 Release:        0
@@ -152,6 +160,8 @@
 Patch20:        python3-ncurses-6.0-accessors.patch
 # PATCH-FIX-UPSTREAM fix Kernel Crypto test failing on kernel >= 4.9
 Patch21:        test-socket-aead-kernel49.patch
+# PATCH-FIX-UPSTREAM bmwiedem...@suse.de -- 
https://github.com/python/cpython/pull/296
+Patch22:        0001-allow-for-reproducible-builds-of-python-packages.patch
 ### COMMON-PATCH-END ###
 
 %description
@@ -245,6 +255,7 @@
 %patch19 -p1
 %patch20 -p1
 %patch21 -p1
+%patch22 -p1
 
 # drop Autoconf version requirement
 sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac
@@ -275,10 +286,6 @@
 touch -r %{SOURCE0} Makefile.pre.in
 
 autoreconf -fi
-# prevent make from trying to rebuild asdl stuff, which requires existing 
python installation
-touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
-# prevent makeopcodetargets
-touch -r Python/opcode_targets.h Lib/opcode.py Python/makeopcodetargets.py
 
 %if 0%{?sles_version}
 sed -e 's/-fprofile-correction//' -i Makefile.pre.in
@@ -295,9 +302,16 @@
     --enable-lto \
     --enable-loadable-sqlite-extensions
 
+# prevent make from trying to rebuild PYTHON_FOR_GEN stuff
+make -t Python/Python-ast.c \
+        Include/Python-ast.h \
+        Objects/typeslots.inc \
+        Python/opcode_targets.h \
+        Include/opcode.h
+
 ### COMMON-CONFIG-END ###
 
-%if 0%{?do_profiling}
+%if %{with profileopt}
     target=profile-opt
 %else
     target=all
@@ -340,9 +354,11 @@
   ulimit -v 10000000 || :
 fi
 
+%if %{with testsuite}
 make -j1 test TESTOPTS="-u none -x $EXCLUDE"
 # use network, be verbose:
 #make test TESTOPTS="-l -u network -v"
+%endif
 
 %install
 

++++++ python3-doc.spec ++++++
--- /var/tmp/diff_new_pack.Jmluc2/_old  2017-03-20 17:04:37.463708326 +0100
+++ /var/tmp/diff_new_pack.Jmluc2/_new  2017-03-20 17:04:37.463708326 +0100
@@ -90,6 +90,8 @@
 Patch20:        python3-ncurses-6.0-accessors.patch
 # PATCH-FIX-UPSTREAM fix Kernel Crypto test failing on kernel >= 4.9
 Patch21:        test-socket-aead-kernel49.patch
+# PATCH-FIX-UPSTREAM bmwiedem...@suse.de -- 
https://github.com/python/cpython/pull/296
+Patch22:        0001-allow-for-reproducible-builds-of-python-packages.patch
 ### COMMON-PATCH-END ###
 
 %description
@@ -113,6 +115,7 @@
 %patch19 -p1
 %patch20 -p1
 %patch21 -p1
+%patch22 -p1
 
 # drop Autoconf version requirement
 sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac

++++++ python3.spec ++++++
--- /var/tmp/diff_new_pack.Jmluc2/_old  2017-03-20 17:04:37.499703244 +0100
+++ /var/tmp/diff_new_pack.Jmluc2/_new  2017-03-20 17:04:37.499703244 +0100
@@ -128,6 +128,8 @@
 Patch20:        python3-ncurses-6.0-accessors.patch
 # PATCH-FIX-UPSTREAM fix Kernel Crypto test failing on kernel >= 4.9
 Patch21:        test-socket-aead-kernel49.patch
+# PATCH-FIX-UPSTREAM bmwiedem...@suse.de -- 
https://github.com/python/cpython/pull/296
+Patch22:        0001-allow-for-reproducible-builds-of-python-packages.patch
 ### COMMON-PATCH-END ###
 
 %description
@@ -185,6 +187,7 @@
 %patch19 -p1
 %patch20 -p1
 %patch21 -p1
+%patch22 -p1
 
 # drop Autoconf version requirement
 sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac
@@ -215,10 +218,6 @@
 touch -r %{SOURCE0} Makefile.pre.in
 
 autoreconf -fi
-# prevent make from trying to rebuild asdl stuff, which requires existing 
python installation
-touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
-# prevent makeopcodetargets
-touch -r Python/opcode_targets.h Lib/opcode.py Python/makeopcodetargets.py
 
 %if 0%{?sles_version}
 sed -e 's/-fprofile-correction//' -i Makefile.pre.in
@@ -235,6 +234,13 @@
     --enable-lto \
     --enable-loadable-sqlite-extensions
 
+# prevent make from trying to rebuild PYTHON_FOR_GEN stuff
+make -t Python/Python-ast.c \
+        Include/Python-ast.h \
+        Objects/typeslots.inc \
+        Python/opcode_targets.h \
+        Include/opcode.h
+
 ### COMMON-CONFIG-END ###
 
 make %{?_smp_mflags}

++++++ 0001-allow-for-reproducible-builds-of-python-packages.patch ++++++
>From 0d6dde67a01878b0d708b4216e2b31f1c76544fb Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedem...@suse.de>
Date: Sat, 25 Feb 2017 06:42:28 +0100
Subject: [PATCH] allow for reproducible builds of python packages

See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Background:
In some distributions like openSUSE, binary rpms contain precompiled .pyc files.

And packages like amqp or twisted dynamically generate .py files at build time
so those have the current time and that timestamp gets embedded
into the .pyc file header.
When we then adapt file timestamps in rpms to be constant,
the timestamp in the .pyc header will no more match
the .py timestamp in the filesystem.
The software will still work, but it will not use the .pyc file as it should.
---
 Lib/py_compile.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Lib/py_compile.py b/Lib/py_compile.py
index 11c5b50..62dcdc7 100644
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -137,6 +137,10 @@ def compile(file, cfile=None, dfile=None, doraise=False, 
optimize=-1):
     except FileExistsError:
         pass
     source_stats = loader.path_stats(file)
+    sde = os.environ.get('SOURCE_DATE_EPOCH')
+    if sde and source_stats['mtime'] > int(sde):
+        source_stats['mtime'] = int(sde)
+        os.utime(file, (source_stats['mtime'], source_stats['mtime']))
     bytecode = importlib._bootstrap_external._code_to_bytecode(
             code, source_stats['mtime'], source_stats['size'])
     mode = importlib._bootstrap_external._calc_mode(file)
-- 
2.10.2

++++++ PACKAGING-NOTES ++++++
--- /var/tmp/diff_new_pack.Jmluc2/_old  2017-03-20 17:04:37.551695903 +0100
+++ /var/tmp/diff_new_pack.Jmluc2/_new  2017-03-20 17:04:37.551695903 +0100
@@ -1,6 +1,20 @@
 Notes for packagers of Python3
 ==============================
 
+0. Faster build turnaround
+--------------------------
+
+By default, python builds with profile-guided optimization. This needs
+an additional run of the test suite and it is generally slow.
+PGO build takes around 50 minutes.
+
+For development, use "--without profileopt" option to disable PGO. This
+shortens the build time to ~5 minutes including test suite.
+
+If you just need to rerun a build and don't need the full test suite, you can
+also build "--without testsuite". This shaves off another three minutes.
+(Note that you usually *want* the full test suite.)
+
 I. python3 and python3-base naming confusion
 --------------------------------------------
 
@@ -56,6 +70,8 @@
 If you want to replicate another section from py3-base to py3, just mark the
 section with NEW-SECTION-BEGIN and NEW-SECTION-END (in both py3-base and py3)
 and add NEW-SECTION to list of $sections in pre_checkin.sh
+(note however that the order of sections in pre_checkin.sh must be the same as
+they are found in the spec files)
 
 pre_checkin.sh also finds the newest python tarball in the source directory and
 updates versions in all specfiles to match it. Therefore, you usually don't 
need




Reply via email to