[Bug 1219411] Review Request: python34 - Version 3 of the Python programming language aka Python 3000

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1219411



--- Comment #2 from Aurelien Bompard <aurelien@xxxxxxxxxxx> ---
Since there's already a python3 package in Fedora, I'll comment on the diff
between the current master and this package.
My comments are inlined in the diff below, and start with "--> "

@@ -16,3 +16,3 @@

-%global with_rewheel 1
+%global with_rewheel 0

@@ -23,2 +23,10 @@

+# is this the EPEL 7 main Python 3?
+%if "%python3_pkgversion" == "%pyshortver"
+%global main_python3 1
+%else
+%global main_python3 0
+%endif
+
+
 %global pylibdir %{_libdir}/python%{pybasever}

--> The with_rewheel flag should be set to 1 in the final package, as it is in
the current master.
--> I don't understand this main_python3 package flag. This package will never
be the main Python3 package, because it's from EPEL and RHEL will always ship
the main python3 package.

@@ -140,5 +148,5 @@
 Summary: Version 3 of the Python programming language aka Python 3000
-Name: python3
-Version: %{pybasever}.2
-Release: 4%{?dist}
+Name: python%{pyshortver}
+Version: %{pybasever}.3
+Release: 1%{?dist}
 License: Python
@@ -201,4 +209,4 @@
 %if 0%{?with_rewheel}
-BuildRequires: python3-setuptools
-BuildRequires: python3-pip
+BuildRequires: python%{pyshortver}-setuptools
+BuildRequires: python%{pyshortver}-pip
 %endif
@@ -220,3 +228,3 @@
 #  __python3, python3_sitelib, python3_sitearch
-Source2: macros.python3
+Source2: macros.python%{pybasever}

@@ -225,3 +233,3 @@
 # with different Python runtimes as necessary:
-Source3: macros.pybytecompile
+Source3: macros.pybytecompile%{pybasever}

--> No problem with that

@@ -446,4 +454,4 @@
 # which values are printed as "v@entry" rather than just "v":
-# Not yet sent upstream
-Patch153: 00153-fix-test_gdb-noise.patch
+# Upstream as of 3.4.3
+# Patch153: 00153-fix-test_gdb-noise.patch

@@ -463,4 +471,4 @@
 # suite to ensure that it can load our -gdb.py script (rhbz#817072):
-# Not yet sent upstream
-Patch156: 00156-gdb-autoload-safepath.patch
+# Upstream as of 3.4.3
+# Patch156: 00156-gdb-autoload-safepath.patch

--> Upstreamed patches, nice! :-)

@@ -710,3 +718,4 @@
 # Issue: http://bugs.python.org/issue22638 Upstream discussion about SSLv3 in
Python
-Patch199: 00199-alter-tests-to-reflect-sslv3-disabled.patch
+# OpenSSL in RHEL has SSLv3 enabled
+#Patch199: 00199-alter-tests-to-reflect-sslv3-disabled.patch

--> Also a good thing

@@ -724,2 +733,9 @@

+# 00202 #
+# Fixes undefined behaviour in faulthandler which caused tests to hang in on
x86_64
+# http://bugs.python.org/issue23433
+Patch202: 00202-fix-undefined-behaviour-in-faulthandler.patch
+
+# test_threading fails in koji dues to it's handling of signals
+Patch203: 00203-disable-threading-test-koji.patch

--> Those patches look OK to me.

@@ -764,4 +780,4 @@
 %if 0%{with_rewheel}
-Requires: python3-setuptools
-Requires: python3-pip
+Requires: python%{pyshortver}-setuptools
+Requires: python%{pyshortver}-pip
 %endif
@@ -828,3 +844,3 @@

-You might want to install the python3-test package if you're developing
+You might want to install the python%{pyshortver}-test package if you're
developing
 python 3 code that uses more than just unittest and/or test_support.py.
@@ -847,3 +863,3 @@
 %description debug
-python3-debug provides a version of the Python 3 runtime with numerous
debugging
+python%{pyshortver}-debug provides a version of the Python 3 runtime with
numerous debugging
 features enabled, aimed at advanced Python users, such as developers of Python
@@ -954,6 +970,6 @@
 # 00152: upstream as of Python 3.3.0b2
-%patch153 -p0
+# 00153: upstream as of Python 3.4.3
 # 00154: not for this branch
 %patch155 -p1
-%patch156 -p1
+# 00156: upstream as of 3.4.3
 %patch157 -p1
@@ -1003,3 +1019,6 @@
 # 00197: upstream as of Python 3.4.2
-%patch199 -p1
+# 00199: doesn't apply to RHEL 7
+%patch202 -p1
+%patch203 -p1
+

--> OK as reviewed before

@@ -1066,2 +1085,3 @@
   PathFixWithThisBinary=$5
+  MoreCFlags=$6

@@ -1103,4 +1123,3 @@
   # Invoke the build:
-  # TODO: it seems that 3.4.0a4 fails with %{?_smp_flags}, have to figure out
why
-  make EXTRA_CFLAGS="$CFLAGS"
+  make EXTRA_CFLAGS="$CFLAGS $MoreCFlags" %{?_smp_mflags}


--> So, the build now works with smp_mflags? Nice.

@@ -1121,3 +1140,4 @@
 %endif
-  false
+  false \
+  -O1
 %endif # with_debug_build

--> What's the reason for adding the O1 flag?

@@ -1143,2 +1163,3 @@
   PyInstSoName=$2
+  MoreCFlags=$3

@@ -1151,3 +1172,8 @@

-make install DESTDIR=%{buildroot} INSTALL="install -p"
+%if 0%{?main_python3}
+make install \
+%else
+make altinstall \
+%endif
+  DESTDIR=%{buildroot} INSTALL="install -p" EXTRA_CFLAGS="$MoreCFlags"

@@ -1194,3 +1220,13 @@
 InstallPython debug \
-  %{py_INSTSONAME_debug}
+  %{py_INSTSONAME_debug} \
+  -O1
+
+%if ! 0%{?main_python3}
+# altinstall only creates pkgconfig/python-3.4.pc, not the version with
ABIFAGS,
+#  so we need to move the debug .pc file to not overwrite it by optimized
install
+mv \
+  %{buildroot}%{_libdir}/pkgconfig/python-%{pybasever}.pc \
+  %{buildroot}%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
+%endif
+
 %endif # with_debug_build

--> Looks good

@@ -1203,3 +1239,6 @@

-mv ${RPM_BUILD_ROOT}%{_bindir}/2to3 ${RPM_BUILD_ROOT}%{_bindir}/python3-2to3
+%if 0%{main_python3}
+#TODO: use 2to3-3 in Fedora as well instead of python3-2to3
+mv ${RPM_BUILD_ROOT}%{_bindir}/2to3 ${RPM_BUILD_ROOT}%{_bindir}/2to3-3
+%endif

@@ -1380,4 +1419,10 @@
   %{_bindir}/python%{LDVERSION_debug} \
+  %{buildroot}%{_bindir}/python%{pybasever}-debug
+
+%if 0%{main_python3}
+ln -s \
+  %{_bindir}/python%{pybasever}-debug \
   %{buildroot}%{_bindir}/python3-debug
 %endif
+%endif


--> See the comment on the main_python3 package at the top of the review.

@@ -1409,3 +1454,3 @@
    -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" \
-   -e 's|"python3"|"python3-debug"|' \
+   -e 's|"python3"|"python%{pybasever}-debug"|' \
    %{_sourcedir}/libpython.stp \

--> Normal.

@@ -1424,2 +1469,20 @@

+%if ! 0%{?main_python3}
+# make altinstall doesn't create python3.X-config, but we want it
+#  (we don't want to have just python3.Xm-config, that's a bit confusing)
+ln -s \
+  %{_bindir}/python%{LDVERSION_optimized}-config \
+  %{buildroot}%{_bindir}/python%{pybasever}-config
+# make altinstall doesn't create python-3.4m.pc, only python-3.4.pc, but we
want both
+ln -s \
+  %{_libdir}/pkgconfig/python-%{pybasever}.pc \
+  %{buildroot}%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
+%endif
+
+# remove libpython3.so in EPEL python to not cause collision between python3X
and
+#  python3X+1 stacks... I don't see any way in which this would be useful
+#  Gentoo does this, as well... TODO: there's a sysconfig variable pointing
+#  to this, maybe we should do something about it?
+rm -f %{buildroot}%{_libdir}/libpython3.so
+
 # ======================================================

--> Looks good to me, I don't know about the sysconfig variable, can you
elaborate on that?

@@ -1456,2 +1519,3 @@
     --verbose --findleaks \
+    -x test_distutils \
     %ifarch ppc64le aarch64

--> What's the reason for that?

@@ -1500,6 +1564,10 @@
 %{_bindir}/pydoc*
+%if 0%{?main_python3}
 %{_bindir}/python3
+%endif
 %{_bindir}/python%{pybasever}
 %{_bindir}/python%{pybasever}m
+%if 0%{?main_python3}
 %{_bindir}/pyvenv
+%endif
 %{_bindir}/pyvenv-%{pybasever}
@@ -1709,4 +1777,7 @@
 %{_libdir}/%{py_INSTSONAME_optimized}
-%{_libdir}/libpython3.so
+# removed in EPEL, see explanation in install section
+#%%{_libdir}/libpython3.so
 %if 0%{?with_systemtap}
+%dir %(dirname %{tapsetdir})
+%dir %{tapsetdir}
 %{tapsetdir}/%{libpython_stp_optimized}
@@ -1722,3 +1793,5 @@
 %doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
+%if 0%{?main_python3}
 %{_bindir}/python3-config
+%endif
 %{_bindir}/python%{pybasever}-config
@@ -1729,5 +1802,7 @@
 %{_libdir}/pkgconfig/python-%{pybasever}.pc
+%if 0%{?main_python3}
 %{_libdir}/pkgconfig/python3.pc
-%{_rpmconfigdir}/macros.d/macros.python3
-%{_rpmconfigdir}/macros.d/macros.pybytecompile
+%endif
+%{_rpmconfigdir}/macros.d/macros.python%{pybasever}
+%{_rpmconfigdir}/macros.d/macros.pybytecompile%{pybasever}

@@ -1735,3 +1810,5 @@
 %defattr(-,root,root,755)
-%{_bindir}/python3-2to3
+%if 0%{?main_python3}
+%{_bindir}/2to3-3
+%endif
 %{_bindir}/2to3-%{pybasever}
@@ -1781,3 +1858,6 @@
 %{_bindir}/python%{LDVERSION_debug}
+%if 0%{?main_python3}
 %{_bindir}/python3-debug
+%endif
+%{_bindir}/python%{pybasever}-debug

@@ -1848,2 +1928,4 @@
 %if 0%{?with_systemtap}
+%dir %(dirname %{tapsetdir})
+%dir %{tapsetdir}
 %{tapsetdir}/%{libpython_stp_debug}

--> See comments about the main_python3 variable, but in general it looks good
to me.

END OF DIFF

I tried to review the other changes in the sources but the SRPM file seems
corrupt, I get:
error: unpacking of archive failed on file
/home/abompard/devel/rpms/RPMS/python34/Python-3.4.3.tar.xz;55658a3b: cpio:
read
error: python34-3.4.3-1.fc21.src.rpm cannot be installed
Please upload a fixed version so I can continue the review, and answer the few
questions I have asked here in the meantime.
Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]