From 69f6bc98cc740fc897f05517ef926f770fec0c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 20 Nov 2013 21:07:12 +0100 Subject: [PATCH 001/180] - up to 3.3.3 --- python3-CVE-2013-4238.patch | 255 -------------------------------- python3-noarch_to_datadir.patch | 4 +- python3.spec | 9 +- 3 files changed, 5 insertions(+), 263 deletions(-) delete mode 100644 python3-CVE-2013-4238.patch diff --git a/python3-CVE-2013-4238.patch b/python3-CVE-2013-4238.patch deleted file mode 100644 index 2de2ed4..0000000 --- a/python3-CVE-2013-4238.patch +++ /dev/null @@ -1,255 +0,0 @@ - -# HG changeset patch -# User Christian Heimes -# Date 1376693687 -7200 -# Node ID c9f073e593b037e8a29e386326859537691bcf62 -# Parent 3105b78d34346ea36c52a3b7e635954f4b444120 -Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes -inside subjectAltName correctly. Formerly the module has used OpenSSL's -GENERAL_NAME_print() function to get the string represention of ASN.1 -strings for rfc822Name (email), dNSName (DNS) and -uniformResourceIdentifier (URI). - -diff --git a/Lib/test/nullbytecert.pem b/Lib/test/nullbytecert.pem -new file mode 100644 ---- /dev/null -+++ b/Lib/test/nullbytecert.pem -@@ -0,0 +1,90 @@ -+Certificate: -+ Data: -+ Version: 3 (0x2) -+ Serial Number: 0 (0x0) -+ Signature Algorithm: sha1WithRSAEncryption -+ Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org -+ Validity -+ Not Before: Aug 7 13:11:52 2013 GMT -+ Not After : Aug 7 13:12:52 2013 GMT -+ Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org -+ Subject Public Key Info: -+ Public Key Algorithm: rsaEncryption -+ Public-Key: (2048 bit) -+ Modulus: -+ 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3: -+ 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97: -+ 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2: -+ 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1: -+ 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4: -+ 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8: -+ a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02: -+ 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75: -+ ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91: -+ 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d: -+ 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30: -+ 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7: -+ f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12: -+ f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5: -+ ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb: -+ d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f: -+ 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da: -+ 2f:85 -+ Exponent: 65537 (0x10001) -+ X509v3 extensions: -+ X509v3 Basic Constraints: critical -+ CA:FALSE -+ X509v3 Subject Key Identifier: -+ 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C -+ X509v3 Key Usage: -+ Digital Signature, Non Repudiation, Key Encipherment -+ X509v3 Subject Alternative Name: -+ ************************************************************* -+ WARNING: The values for DNS, email and URI are WRONG. OpenSSL -+ doesn't print the text after a NULL byte. -+ ************************************************************* -+ DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1 -+ Signature Algorithm: sha1WithRSAEncryption -+ ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5: -+ a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44: -+ 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37: -+ 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3: -+ 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86: -+ de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac: -+ 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4: -+ 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60: -+ d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5: -+ 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60: -+ 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6: -+ 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d: -+ 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e: -+ 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6: -+ c1:ca:a9:94 -+-----BEGIN CERTIFICATE----- -+MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx -+DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ -+eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg -+RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y -+ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw -+NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI -+DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv -+ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt -+ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq -+hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB -+BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j -+pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P -+vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv -+KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA -+oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL -+08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV -+HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E -+BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu -+Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251 -+bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA -+AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9 -+i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j -+HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk -+kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx -+VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW -+RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ= -+-----END CERTIFICATE----- -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -55,6 +55,7 @@ BADCERT = data_file("badcert.pem") - WRONGCERT = data_file("XXXnonexisting.pem") - BADKEY = data_file("badkey.pem") - NOKIACERT = data_file("nokia.pem") -+NULLBYTECERT = data_file("nullbytecert.pem") - - DHFILE = data_file("dh512.pem") - BYTES_DHFILE = os.fsencode(DHFILE) -@@ -162,6 +163,27 @@ class BasicSocketTests(unittest.TestCase - ('DNS', 'projects.forum.nokia.com')) - ) - -+ def test_parse_cert_CVE_2013_4238(self): -+ p = ssl._ssl._test_decode_cert(NULLBYTECERT) -+ if support.verbose: -+ sys.stdout.write("\n" + pprint.pformat(p) + "\n") -+ subject = ((('countryName', 'US'),), -+ (('stateOrProvinceName', 'Oregon'),), -+ (('localityName', 'Beaverton'),), -+ (('organizationName', 'Python Software Foundation'),), -+ (('organizationalUnitName', 'Python Core Development'),), -+ (('commonName', 'null.python.org\x00example.org'),), -+ (('emailAddress', 'python-dev@python.org'),)) -+ self.assertEqual(p['subject'], subject) -+ self.assertEqual(p['issuer'], subject) -+ self.assertEqual(p['subjectAltName'], -+ (('DNS', 'altnull.python.org\x00example.com'), -+ ('email', 'null@python.org\x00user@example.org'), -+ ('URI', 'http://null.python.org\x00http://example.org'), -+ ('IP Address', '192.0.2.1'), -+ ('IP Address', '2001:DB8:0:0:0:0:0:1\n')) -+ ) -+ - def test_DER_to_PEM(self): - with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f: - pem = f.read() -@@ -294,6 +316,13 @@ class BasicSocketTests(unittest.TestCase - fail(cert, 'foo.a.com') - fail(cert, 'bar.foo.com') - -+ # NULL bytes are bad, CVE-2013-4073 -+ cert = {'subject': ((('commonName', -+ 'null.python.org\x00example.org'),),)} -+ ok(cert, 'null.python.org\x00example.org') # or raise an error? -+ fail(cert, 'example.org') -+ fail(cert, 'null.python.org') -+ - # Slightly fake real-world example - cert = {'notAfter': 'Jun 26 21:41:46 2011 GMT', - 'subject': ((('commonName', 'linuxfrz.org'),),), -diff --git a/Modules/_ssl.c b/Modules/_ssl.c ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -771,12 +771,14 @@ static PyObject * - ext->value->length)); - - for(j = 0; j < sk_GENERAL_NAME_num(names); j++) { -- - /* get a rendering of each name in the set of names */ -+ int gntype; -+ ASN1_STRING *as = NULL; - - name = sk_GENERAL_NAME_value(names, j); -- if (name->type == GEN_DIRNAME) { -- -+ gntype = name-> type; -+ switch (gntype) { -+ case GEN_DIRNAME: - /* we special-case DirName as a tuple of - tuples of attributes */ - -@@ -798,11 +800,62 @@ static PyObject * - goto fail; - } - PyTuple_SET_ITEM(t, 1, v); -+ break; - -- } else { -+ case GEN_EMAIL: -+ case GEN_DNS: -+ case GEN_URI: -+ /* GENERAL_NAME_print() doesn't handle NULL bytes in ASN1_string -+ correctly, CVE-2013-4238 */ -+ t = PyTuple_New(2); -+ if (t == NULL) -+ goto fail; -+ switch (gntype) { -+ case GEN_EMAIL: -+ v = PyUnicode_FromString("email"); -+ as = name->d.rfc822Name; -+ break; -+ case GEN_DNS: -+ v = PyUnicode_FromString("DNS"); -+ as = name->d.dNSName; -+ break; -+ case GEN_URI: -+ v = PyUnicode_FromString("URI"); -+ as = name->d.uniformResourceIdentifier; -+ break; -+ } -+ if (v == NULL) { -+ Py_DECREF(t); -+ goto fail; -+ } -+ PyTuple_SET_ITEM(t, 0, v); -+ v = PyUnicode_FromStringAndSize((char *)ASN1_STRING_data(as), -+ ASN1_STRING_length(as)); -+ if (v == NULL) { -+ Py_DECREF(t); -+ goto fail; -+ } -+ PyTuple_SET_ITEM(t, 1, v); -+ break; - -+ default: - /* for everything else, we use the OpenSSL print form */ -- -+ switch (gntype) { -+ /* check for new general name type */ -+ case GEN_OTHERNAME: -+ case GEN_X400: -+ case GEN_EDIPARTY: -+ case GEN_IPADD: -+ case GEN_RID: -+ break; -+ default: -+ if (PyErr_WarnFormat(PyExc_RuntimeWarning, 1, -+ "Unknown general name type %d", -+ gntype) == -1) { -+ goto fail; -+ } -+ break; -+ } - (void) BIO_reset(biobuf); - GENERAL_NAME_print(biobuf, name); - len = BIO_gets(biobuf, buf, sizeof(buf)-1); -@@ -829,6 +882,7 @@ static PyObject * - goto fail; - } - PyTuple_SET_ITEM(t, 1, v); -+ break; - } - - /* and add that rendering to the list */ - diff --git a/python3-noarch_to_datadir.patch b/python3-noarch_to_datadir.patch index 8520db6..4c0810a 100644 --- a/python3-noarch_to_datadir.patch +++ b/python3-noarch_to_datadir.patch @@ -151,10 +151,10 @@ diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c joinpath(prefix, LANDMARK); if (ismodule(prefix)) return 1; -@@ -320,7 +322,7 @@ - +@@ -379,7 +379,7 @@ /* Look at configure's PREFIX */ wcsncpy(prefix, _prefix, MAXPATHLEN); + prefix[MAXPATHLEN] = L'\0'; - joinpath(prefix, lib_python); + joinpath(prefix, share_python); joinpath(prefix, LANDMARK); diff --git a/python3.spec b/python3.spec index 37bb5c5..5a41d13 100644 --- a/python3.spec +++ b/python3.spec @@ -37,13 +37,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.2 -Release: 2 +Version: %{py_ver}.3 +Release: 1 Epoch: 1 License: PSF Group: Applications Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: c94b78ea3b68a9bbc9906af4d5b4fdc7 +# Source0-md5: 4ca001c5586eb0744e3174bc75c6fba8 Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-lib64.patch @@ -52,7 +52,6 @@ Patch4: %{name}-no_cmdline_tests.patch Patch5: %{name}-makefile-location.patch Patch6: libc-cloexec.patch Patch7: python-distro.patch -Patch8: %{name}-CVE-2013-4238.patch URL: http://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: bluez-libs-devel @@ -456,7 +455,6 @@ Przykłady te są dla Pythona 2.3.4, nie %{version}. %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat @@ -1117,7 +1115,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_scriptdir}/venv/scripts %dir %{py_scriptdir}/venv/scripts/posix %{py_scriptdir}/venv/scripts/posix/activate -%{py_scriptdir}/venv/scripts/posix/pydoc %dir %{py_scriptdir}/wsgiref %{py_scriptdir}/wsgiref/__pycache__ From 7bc67fbfa8705cb8076b2f5996044f17ac47c888 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 21 Nov 2013 20:15:22 +0100 Subject: [PATCH 002/180] - added db patch (support db 6.0) --- python3-db.patch | 11 +++++++++++ python3.spec | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 python3-db.patch diff --git a/python3-db.patch b/python3-db.patch new file mode 100644 index 0000000..34939ee --- /dev/null +++ b/python3-db.patch @@ -0,0 +1,11 @@ +--- Python-3.3.3/setup.py.orig 2013-11-21 18:36:59.259841950 +0100 ++++ Python-3.3.3/setup.py 2013-11-21 19:07:23.173098741 +0100 +@@ -835,7 +835,7 @@ + # a release. Most open source OSes come with one or more + # versions of BerkeleyDB already installed. + +- max_db_ver = (5, 3) ++ max_db_ver = (6, 0) + min_db_ver = (3, 3) + db_setup_debug = False # verbose debug prints from this script? + diff --git a/python3.spec b/python3.spec index 5a41d13..c1979bf 100644 --- a/python3.spec +++ b/python3.spec @@ -52,6 +52,7 @@ Patch4: %{name}-no_cmdline_tests.patch Patch5: %{name}-makefile-location.patch Patch6: libc-cloexec.patch Patch7: python-distro.patch +Patch8: %{name}-db.patch URL: http://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: bluez-libs-devel @@ -455,6 +456,7 @@ Przykłady te są dla Pythona 2.3.4, nie %{version}. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat From 629c57e2a269134cac1af4a70ce1812feeaf4d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 11 Feb 2014 11:21:41 +0100 Subject: [PATCH 003/180] - up to 3.3.4; fixes CVE-2013-1752 and misc things --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index c1979bf..902a9eb 100644 --- a/python3.spec +++ b/python3.spec @@ -37,13 +37,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.3 +Version: %{py_ver}.4 Release: 1 Epoch: 1 License: PSF Group: Applications Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 4ca001c5586eb0744e3174bc75c6fba8 +# Source0-md5: 8fb961a20600aafafd249537af3ac637 Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-lib64.patch From 9a22bc7df9d94624aea3376abc5574a9a192c5e8 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Fri, 21 Feb 2014 16:19:01 +0100 Subject: [PATCH 004/180] 'test' subpackage added The test modules may be useful. --- python3.spec | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/python3.spec b/python3.spec index 902a9eb..1e95e9e 100644 --- a/python3.spec +++ b/python3.spec @@ -446,6 +446,17 @@ Przykładowe programy w Pythonie. Przykłady te są dla Pythona 2.3.4, nie %{version}. +%package test +Summary: Test modules for Python +Summary(pl.UTF-8): Moduły testowe dla Pythona +Group: Development/Languages/Python + +%description test +Test modules for Python. + +%description test -l pl.UTF-8 +Moduły testowe dla Pythona. + %prep %setup -q -n Python-%{version} %patch0 -p1 @@ -582,16 +593,6 @@ sed 's/=/ /' \ install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver} # just to cut the noise, as they are not packaged (now) -# first tests (probably could be packaged) -%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/test -%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/test -%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/distutils/tests -%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/lib2to3/tests -%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/sqlite3/test -%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/tkinter/test -%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/unittest/test - -# other files %{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/plat-*/regen %{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/macholib/fetch_macholib* %{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/site-packages/README @@ -1085,6 +1086,8 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/http/__pycache__ %{py_scriptdir}/http/*.py +%dir %{py_scriptdir}/idlelib + %dir %{py_scriptdir}/importlib %{py_scriptdir}/importlib/__pycache__ %{py_scriptdir}/importlib/*.py @@ -1105,7 +1108,10 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/multiprocessing/dummy/*.py %{py_scriptdir}/turtledemo -%{py_scriptdir}/unittest + +%dir %{py_scriptdir}/unittest +%{py_scriptdir}/unittest/__pycache__ +%{py_scriptdir}/unittest/*.py %dir %{py_scriptdir}/urllib %{py_scriptdir}/urllib/__pycache__ @@ -1162,7 +1168,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/idle3 %attr(755,root,root) %{_bindir}/idle3.3 -%dir %{py_scriptdir}/idlelib %dir %{py_scriptdir}/idlelib/Icons %{py_scriptdir}/idlelib/__pycache__ %{py_scriptdir}/idlelib/*.py @@ -1225,6 +1230,16 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %{_examplesdir}/%{name}-%{version} +%files test +%{py_scriptdir}/idlelib/idle_test +%{py_scriptdir}/test +%{py_scriptdir}/ctypes/test +%{py_scriptdir}/distutils/tests +%{py_scriptdir}/lib2to3/tests +%{py_scriptdir}/sqlite3/test +%{py_scriptdir}/tkinter/test +%{py_scriptdir}/unittest/test + %if %{with info} %files doc-info %defattr(644,root,root,755) From 04b427b211cb0a2bf7aa210312f1ed1bf94c1be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 21 Feb 2014 19:21:54 +0100 Subject: [PATCH 005/180] - rel 2; rework options to avoid case when part of object files were built with one flags (eg with -DNDEBUG) and part without (without -DNDEBUG); drop vars for crossbuild (weren't tested for years) --- python3.spec | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/python3.spec b/python3.spec index 1e95e9e..fa69f31 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.4 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Applications @@ -492,8 +492,10 @@ if ! grep -q "tmpfs" /proc/self/mounts; then fi %{__autoconf} -CPPFLAGS="-I/usr/include/ncursesw %{rpmcppflags} -Wall %{!?debug:-DNDEBUG=1}"; export CPPFLAGS %configure \ + OPT="%{rpmcflags} -fno-caller-saves" \ + CPPFLAGS="%{rpmcppflags}" \ + LDFLAGS="%{rpmldflags}" \ ac_cv_posix_semaphores_enabled=yes \ ac_cv_broken_sem_getvalue=no \ %{?with_debug:--with-pydebug} \ @@ -511,13 +513,8 @@ CPPFLAGS="-I/usr/include/ncursesw %{rpmcppflags} -Wall %{!?debug:-DNDEBUG=1}"; e --with-system-expat \ --with-system-ffi \ --with-computed-gotos \ - LINKCC='$(PURIFY) $(CXX)' \ - LDSHARED='$(CC) $(CFLAGS) -shared' \ - BLDSHARED='$(CC) $(CFLAGS) -shared' \ - LDFLAGS="%{rpmcflags} %{rpmldflags}" -%{__make} \ - OPT="%{rpmcflags} %{rpmcppflags} -fno-caller-saves" 2>&1 | awk ' +%{__make} 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } { if ($0 ~ /\*\*\* WARNING:/) { From 790ee82d7576f1d3487cd7a8e6ac92bf497cedab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 21 Feb 2014 23:41:36 +0100 Subject: [PATCH 006/180] - drop conflicting test option (-l, conflicts with internally used -j) --- python3.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index fa69f31..cc28396 100644 --- a/python3.spec +++ b/python3.spec @@ -83,9 +83,9 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define specflags_ppc64 -D__ppc64__=1 %if %{with verbose_tests} -%define test_flags -v -l -x +%define test_flags -v -x %else -%define test_flags -w -l -x +%define test_flags -w -x %endif %ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664} @@ -529,6 +529,7 @@ LC_ALL=C export LC_ALL %if %{with tests} binlibdir=`echo build/lib.*` +# -l and -j don't go together! and -j is brought up by Tools/scripts/run_tests.py %{__make} test \ TESTOPTS="%{test_flags} %{test_list}" \ TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/$binlibdir ./python -tt" From 2ac4156558f02b98e0df291fde5f360da3782718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 16 Mar 2014 16:19:11 +0100 Subject: [PATCH 007/180] - up to 3.3.5 --- python3.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index cc28396..dd60088 100644 --- a/python3.spec +++ b/python3.spec @@ -37,13 +37,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.4 -Release: 2 +Version: %{py_ver}.5 +Release: 1 Epoch: 1 License: PSF Group: Applications Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 8fb961a20600aafafd249537af3ac637 +# Source0-md5: b2a4df195d934e5b229e8328ca864960 Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-lib64.patch From 5d538a85cc379c53414691f9b98cdff75cef926e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 1 Jun 2014 18:40:00 +0200 Subject: [PATCH 008/180] - tcl rebuild - release 2 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index dd60088..ee9e4b6 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.5 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Applications From 38874ce85d41b0d5db725b4b882909cf4e64fac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 19 Oct 2014 01:18:52 +0200 Subject: [PATCH 009/180] - up to 3.4.2; what to do with PIP? --- python3-lib64.patch | 40 ++++++++++++------------ python3-noarch_to_datadir.patch | 50 ++++++------------------------ python3-pythonpath.patch | 11 ------- python3.spec | 55 +++++++++++++++++++++++++-------- 4 files changed, 72 insertions(+), 84 deletions(-) diff --git a/python3-lib64.patch b/python3-lib64.patch index e61ea0e..2faac0d 100644 --- a/python3-lib64.patch +++ b/python3-lib64.patch @@ -56,15 +56,15 @@ PyAPI_FUNC(const char *) Py_GetBuildInfo(void); --- Python-3.2.1.orig/Lib/distutils/command/install.py 2011-07-09 07:58:46.000000000 +0100 +++ Python-3.2.1/Lib/distutils/command/install.py 2011-07-12 22:20:12.000000000 +0100 -@@ -27,6 +27,8 @@ - from site import USER_SITE - HAS_USER_SITE = True +@@ -19,6 +19,8 @@ from site import USER_BASE + from site import USER_SITE + HAS_USER_SITE = True +libname = sys.lib + - if sys.version < "2.2": - WINDOWS_SCHEME = { - 'purelib': '$base', + WINDOWS_SCHEME = { + 'purelib': '$base/Lib/site-packages', + 'platlib': '$base/Lib/site-packages', @@ -47,14 +49,14 @@ INSTALL_SCHEMES = { 'unix_prefix': { @@ -113,10 +113,10 @@ os.path.join(destination, "include", "python", "foopkg")) --- Python-3.2.1.orig/Lib/site.py 2011-07-09 07:58:49.000000000 +0100 +++ Python-3.2.1/Lib/site.py 2011-07-12 22:20:12.000000000 +0100 -@@ -285,13 +285,16 @@ - if sys.platform in ('os2emx', 'riscos'): - sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) - elif os.sep == '/': +@@ -304,13 +304,16 @@ def getsitepackages(prefixes=None): + seen.add(prefix) + + if os.sep == '/': - sitepackages.append(os.path.join(prefix, "lib", + sitepackages.append(os.path.join(prefix, sys.lib, "python" + sys.version[:3], @@ -200,9 +200,9 @@ +#ifndef LIB_PYTHON +#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) -+#define LIB_PYTHON L"lib64/python" ++#define LIB_PYTHON "lib64/python" +#else -+#define LIB_PYTHON L"lib/python" ++#define LIB_PYTHON "lib/python" +#endif +#endif + @@ -214,15 +214,15 @@ #endif #ifndef LANDMARK -@@ -135,7 +143,7 @@ - static wchar_t progpath[MAXPATHLEN+1]; - static wchar_t *module_search_path = NULL; - static int module_search_path_malloced = 0; --static wchar_t *lib_python = L"lib/python" VERSION; -++static wchar_t *lib_python = LIB_PYTHON VERSION; +@@ -502,7 +502,7 @@ calculate_path(void) + _pythonpath = _Py_char2wchar(PYTHONPATH, NULL); + _prefix = _Py_char2wchar(PREFIX, NULL); + _exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL); +- lib_python = _Py_char2wchar("lib/python" VERSION, NULL); ++ lib_python = _Py_char2wchar(LIB_PYTHON VERSION, NULL); - static void - reduce(wchar_t *dir) + if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { + Py_FatalError( --- Python-3.2.1.orig/Python/getplatform.c 2011-07-09 07:58:56.000000000 +0100 +++ Python-3.2.1/Python/getplatform.c 2011-07-12 22:20:12.000000000 +0100 @@ -10,3 +10,23 @@ diff --git a/python3-noarch_to_datadir.patch b/python3-noarch_to_datadir.patch index 4c0810a..f913f5b 100644 --- a/python3-noarch_to_datadir.patch +++ b/python3-noarch_to_datadir.patch @@ -123,58 +123,28 @@ diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c #endif #ifndef LANDMARK -@@ -143,7 +144,8 @@ - static wchar_t progpath[MAXPATHLEN+1]; - static wchar_t *module_search_path = NULL; - static int module_search_path_malloced = 0; --+static wchar_t *lib_python = LIB_PYTHON VERSION; -+static wchar_t *lib_python = LIB_PYTHON VERSION; -+static wchar_t share_python[] = L"share/python" VERSION; - - static void - reduce(wchar_t *dir) -@@ -284,7 +286,7 @@ - delim = wcschr(prefix, DELIM); - if (delim) - *delim = L'\0'; -- joinpath(prefix, lib_python); -+ joinpath(prefix, share_python); - joinpath(prefix, LANDMARK); - return 1; +@@ -673,13 +673,13 @@ calculate_path(void) + } } -@@ -310,7 +312,7 @@ - copy_absolute(prefix, argv0_path, MAXPATHLEN+1); - do { - n = wcslen(prefix); -- joinpath(prefix, lib_python); -+ joinpath(prefix, share_python); - joinpath(prefix, LANDMARK); - if (ismodule(prefix)) - return 1; -@@ -379,7 +379,7 @@ - /* Look at configure's PREFIX */ - wcsncpy(prefix, _prefix, MAXPATHLEN); - prefix[MAXPATHLEN] = L'\0'; -- joinpath(prefix, lib_python); -+ joinpath(prefix, share_python); - joinpath(prefix, LANDMARK); - if (ismodule(prefix)) - return 1; -@@ -578,7 +580,7 @@ + +- pfound = search_for_prefix(argv0_path, home, _prefix, lib_python); ++ pfound = search_for_prefix(argv0_path, home, _prefix, L"share/python"); + if (!pfound) { + if (!Py_FrozenFlag) fprintf(stderr, "Could not find platform independent libraries \n"); wcsncpy(prefix, _prefix, MAXPATHLEN); - joinpath(prefix, lib_python); -+ joinpath(prefix, share_python); ++ joinpath(prefix, L"share/python"); } else reduce(prefix); -@@ -591,7 +593,7 @@ +@@ -691,7 +693,7 @@ } else wcsncpy(zip_path, _prefix, MAXPATHLEN); - joinpath(zip_path, L"lib/python00.zip"); -+ joinpath(zip_path, LIB_PYTHON "00.zip"); ++ joinpath(zip_path, L"" LIB_PYTHON "00.zip"); bufsz = wcslen(zip_path); /* Replace "00" with version */ zip_path[bufsz - 6] = VERSION[0]; zip_path[bufsz - 5] = VERSION[2]; diff --git a/python3-pythonpath.patch b/python3-pythonpath.patch index fe5e48e..69be183 100644 --- a/python3-pythonpath.patch +++ b/python3-pythonpath.patch @@ -58,14 +58,3 @@ '/usr/bin/env python', line) print(filename, ':', repr(line)) f = open(filename, "w") ---- Python-3.0.1/Doc/README.txt.wiget 2009-02-13 00:46:00.000000000 +0100 -+++ Python-3.0.1/Doc/README.txt 2009-03-14 18:12:32.000000000 +0100 -@@ -37,7 +37,7 @@ the top-level index `build/html/index.ht - To use a Python interpreter that's not called ``python``, use the standard - way to set Makefile variables, using e.g. :: - -- make html PYTHON=/usr/bin/python2.5 -+ make html PYTHON=/usr/bin/python3 - - Available make targets are: - diff --git a/python3.spec b/python3.spec index ee9e4b6..aef61a7 100644 --- a/python3.spec +++ b/python3.spec @@ -20,7 +20,7 @@ # test_gdb: fails, as the gdb uses old python version %define broken_tests test_httpservers test_distutils test_cmd_line test_pydoc test_telnetlib test_zlib test_gdb test_site -%define py_ver 3.3 +%define py_ver 3.4 %define py_abi %{py_ver}m %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} @@ -37,13 +37,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.5 -Release: 2 +Version: %{py_ver}.2 +Release: 1 Epoch: 1 License: PSF Group: Applications Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: b2a4df195d934e5b229e8328ca864960 +# Source0-md5: 36fc7327c02c6f12fa24fc9ba78039e3 Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-lib64.patch @@ -476,13 +476,13 @@ for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx; do %{__rm} -r Modules/_ctypes/$SUBDIR done +%if "%{pld_release}" == "ac" files="md5module.c sha1module.c" -%if !0%(pkg-config openssl --atleast-version=0.9.8; echo $?) files="$files sha256module.c sha512module.c" -%endif for f in $files; do %{__rm} Modules/$f done +%endif %build if ! grep -q "tmpfs" /proc/self/mounts; then @@ -720,14 +720,17 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) /etc/shrc.d/python*-modules* %attr(755,root,root) %{_bindir}/pyvenv -%attr(755,root,root) %{_bindir}/pyvenv-3.3 +%attr(755,root,root) %{_bindir}/pyvenv-3.4 %{py_scriptdir}/__future__.py %{py_scriptdir}/__phello__.foo.py +%{py_scriptdir}/_bootlocale.py +%{py_scriptdir}/_collections_abc.py %{py_scriptdir}/_compat_pickle.py %{py_scriptdir}/_dummy_thread.py %{py_scriptdir}/_markupbase.py %{py_scriptdir}/_osx_support.py %{py_scriptdir}/_pyio.py +%{py_scriptdir}/_sitebuiltins.py %{py_scriptdir}/_strptime.py %{py_scriptdir}/_threading_local.py %{py_scriptdir}/aifc.py @@ -761,6 +764,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/dis.py %{py_scriptdir}/doctest.py %{py_scriptdir}/dummy_threading.py +%{py_scriptdir}/enum.py %{py_scriptdir}/filecmp.py %{py_scriptdir}/fileinput.py %{py_scriptdir}/fnmatch.py @@ -792,8 +796,9 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/nturl2path.py %{py_scriptdir}/numbers.py %{py_scriptdir}/opcode.py +%{py_scriptdir}/operator.py %{py_scriptdir}/optparse.py -%{py_scriptdir}/os2emxpath.py +%{py_scriptdir}/pathlib.py %{py_scriptdir}/pickle.py %{py_scriptdir}/pickletools.py %{py_scriptdir}/pipes.py @@ -811,6 +816,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/rlcompleter.py %{py_scriptdir}/runpy.py %{py_scriptdir}/sched.py +%{py_scriptdir}/selectors.py %{py_scriptdir}/shelve.py %{py_scriptdir}/shlex.py %{py_scriptdir}/shutil.py @@ -820,6 +826,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/socket.py %{py_scriptdir}/socketserver.py %{py_scriptdir}/ssl.py +%{py_scriptdir}/statistics.py %{py_scriptdir}/string.py %{py_scriptdir}/stringprep.py %{py_scriptdir}/struct.py @@ -835,6 +842,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/this.py %{py_scriptdir}/threading.py %{py_scriptdir}/trace.py +%{py_scriptdir}/tracemalloc.py %{py_scriptdir}/tty.py %{py_scriptdir}/turtle.py %{py_scriptdir}/uu.py @@ -846,11 +854,14 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/zipfile.py %{py_scriptdir}/__pycache__/__future__.cpython-*.py[co] %{py_scriptdir}/__pycache__/__phello__.cpython-*.py[co] +%{py_scriptdir}/__pycache__/_bootlocale.cpython-*.py[co] +%{py_scriptdir}/__pycache__/_collections_abc.cpython-*.py[co] %{py_scriptdir}/__pycache__/_compat_pickle.cpython-*.py[co] %{py_scriptdir}/__pycache__/_dummy_thread.cpython-*.py[co] %{py_scriptdir}/__pycache__/_markupbase.cpython-*.py[co] %{py_scriptdir}/__pycache__/_osx_support.cpython-*.py[co] %{py_scriptdir}/__pycache__/_pyio.cpython-*.py[co] +%{py_scriptdir}/__pycache__/_sitebuiltins.cpython-*.py[co] %{py_scriptdir}/__pycache__/_strptime.cpython-*.py[co] %{py_scriptdir}/__pycache__/_threading_local.cpython-*.py[co] %{py_scriptdir}/__pycache__/aifc.cpython-*.py[co] @@ -884,6 +895,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/dis.cpython-*.py[co] %{py_scriptdir}/__pycache__/doctest.cpython-*.py[co] %{py_scriptdir}/__pycache__/dummy_threading.cpython-*.py[co] +%{py_scriptdir}/__pycache__/enum.cpython-*.py[co] %{py_scriptdir}/__pycache__/filecmp.cpython-*.py[co] %{py_scriptdir}/__pycache__/fileinput.cpython-*.py[co] %{py_scriptdir}/__pycache__/fnmatch.cpython-*.py[co] @@ -915,8 +927,9 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/nturl2path.cpython-*.py[co] %{py_scriptdir}/__pycache__/numbers.cpython-*.py[co] %{py_scriptdir}/__pycache__/opcode.cpython-*.py[co] +%{py_scriptdir}/__pycache__/operator.cpython-*.py[co] %{py_scriptdir}/__pycache__/optparse.cpython-*.py[co] -%{py_scriptdir}/__pycache__/os2emxpath.cpython-*.py[co] +%{py_scriptdir}/__pycache__/pathlib.cpython-*.py[co] %{py_scriptdir}/__pycache__/pickle.cpython-*.py[co] %{py_scriptdir}/__pycache__/pickletools.cpython-*.py[co] %{py_scriptdir}/__pycache__/pipes.cpython-*.py[co] @@ -934,6 +947,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/rlcompleter.cpython-*.py[co] %{py_scriptdir}/__pycache__/runpy.cpython-*.py[co] %{py_scriptdir}/__pycache__/sched.cpython-*.py[co] +%{py_scriptdir}/__pycache__/selectors.cpython-*.py[co] %{py_scriptdir}/__pycache__/shelve.cpython-*.py[co] %{py_scriptdir}/__pycache__/shlex.cpython-*.py[co] %{py_scriptdir}/__pycache__/shutil.cpython-*.py[co] @@ -943,6 +957,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/socket.cpython-*.py[co] %{py_scriptdir}/__pycache__/socketserver.cpython-*.py[co] %{py_scriptdir}/__pycache__/ssl.cpython-*.py[co] +%{py_scriptdir}/__pycache__/statistics.cpython-*.py[co] %{py_scriptdir}/__pycache__/string.cpython-*.py[co] %{py_scriptdir}/__pycache__/stringprep.cpython-*.py[co] %{py_scriptdir}/__pycache__/struct.cpython-*.py[co] @@ -958,6 +973,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/this.cpython-*.py[co] %{py_scriptdir}/__pycache__/threading.cpython-*.py[co] %{py_scriptdir}/__pycache__/trace.cpython-*.py[co] +%{py_scriptdir}/__pycache__/tracemalloc.cpython-*.py[co] %{py_scriptdir}/__pycache__/tty.cpython-*.py[co] %{py_scriptdir}/__pycache__/turtle.cpython-*.py[co] %{py_scriptdir}/__pycache__/uu.cpython-*.py[co] @@ -997,24 +1013,27 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_json.cpython-*.so %attr(755,root,root) %{py_dyndir}/_lsprof.cpython-*.so %attr(755,root,root) %{py_dyndir}/_lzma.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_md5.cpython-*.so %attr(755,root,root) %{py_dyndir}/_multibytecodec.cpython-*.so %attr(755,root,root) %{py_dyndir}/_multiprocessing.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_opcode.cpython-*.so %attr(755,root,root) %{py_dyndir}/_pickle.cpython-*.so %attr(755,root,root) %{py_dyndir}/_posixsubprocess.cpython-*.so %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_sha1.cpython-*.so %attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so # for openssl < 0.9.8 package sha256 and sha512 modules -%if 0%(pkg-config openssl --atleast-version=0.9.8; echo $?) +%if "%{pld_release}" != "ac" %attr(755,root,root) %{py_dyndir}/_sha256.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha512.cpython-*.so %endif %attr(755,root,root) %{py_dyndir}/array.cpython-*.so -%attr(755,root,root) %{py_dyndir}/atexit.cpython-*.so %attr(755,root,root) %{py_dyndir}/audioop.cpython-*.so %attr(755,root,root) %{py_dyndir}/binascii.cpython-*.so %attr(755,root,root) %{py_dyndir}/cmath.cpython-*.so @@ -1040,6 +1059,10 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/plat-*/__pycache__ %{py_scriptdir}/plat-*/*.py +%dir %{py_scriptdir}/asyncio +%{py_scriptdir}/asyncio/__pycache__ +%{py_scriptdir}/asyncio/*.py + %{py_scriptdir}/concurrent %dir %{py_scriptdir}/ctypes @@ -1076,6 +1099,11 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/email/*.py %{py_scriptdir}/email/mime/*.py +%dir %{py_scriptdir}/ensurepip +%{py_scriptdir}/ensurepip/__pycache__ +%{py_scriptdir}/ensurepip/*.py +%{py_scriptdir}/ensurepip/_bundled + %dir %{py_scriptdir}/html %{py_scriptdir}/html/*.py %{py_scriptdir}/html/__pycache__ @@ -1154,7 +1182,7 @@ rm -rf $RPM_BUILD_ROOT %files -n pydoc3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/pydoc3 -%attr(755,root,root) %{_bindir}/pydoc3.3 +%attr(755,root,root) %{_bindir}/pydoc3.4 %{py_scriptdir}/pydoc.py %{py_scriptdir}/__pycache__/pydoc.cpython-*.py[co] %dir %{py_scriptdir}/pydoc_data @@ -1165,7 +1193,7 @@ rm -rf $RPM_BUILD_ROOT %files -n idle3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/idle3 -%attr(755,root,root) %{_bindir}/idle3.3 +%attr(755,root,root) %{_bindir}/idle3.4 %dir %{py_scriptdir}/idlelib/Icons %{py_scriptdir}/idlelib/__pycache__ %{py_scriptdir}/idlelib/*.py @@ -1189,6 +1217,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/config-%{py_abi}/config.c %{py_libdir}/config-%{py_abi}/config.c.in %{py_libdir}/config-%{py_abi}/python.o +%{py_libdir}/config-%{py_abi}/python-config.py %{_pkgconfigdir}/python-%{py_ver}.pc %{_pkgconfigdir}/python-%{py_abi}.pc %{_pkgconfigdir}/python3.pc From cc48ca6b2b540b5fe1a092dc486516764e980356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 19 Oct 2014 11:05:22 +0200 Subject: [PATCH 010/180] - versioned /usr/share/pythonX.X --- python3-noarch_to_datadir.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3-noarch_to_datadir.patch b/python3-noarch_to_datadir.patch index f913f5b..38a2424 100644 --- a/python3-noarch_to_datadir.patch +++ b/python3-noarch_to_datadir.patch @@ -128,7 +128,7 @@ diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c } - pfound = search_for_prefix(argv0_path, home, _prefix, lib_python); -+ pfound = search_for_prefix(argv0_path, home, _prefix, L"share/python"); ++ pfound = search_for_prefix(argv0_path, home, _prefix, L"share/python" VERSION); if (!pfound) { if (!Py_FrozenFlag) fprintf(stderr, From 25ba474b56fb44b5573a261d5fe4d7b39b8aae03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 19 Oct 2014 11:32:12 +0200 Subject: [PATCH 011/180] - move libs that are needed in base package --- python3.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python3.spec b/python3.spec index aef61a7..7565615 100644 --- a/python3.spec +++ b/python3.spec @@ -649,6 +649,8 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_struct.cpython-*.so # modules required by python library +%{py_scriptdir}/_collections_abc.py +%{py_scriptdir}/_sitebuiltins.py %{py_scriptdir}/_sysconfigdata.py %{py_scriptdir}/_weakrefset.py %{py_scriptdir}/abc.py @@ -676,11 +678,13 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/os.py # needed by the dynamic sys.lib patch %{py_scriptdir}/types.py +%{py_scriptdir}/__pycache__/_sitebuiltins.cpython-*.py[co] %{py_scriptdir}/__pycache__/_sysconfigdata.cpython-*.py[co] %{py_scriptdir}/__pycache__/_weakrefset.cpython-*.py[co] %{py_scriptdir}/__pycache__/abc.cpython-*.py[co] %{py_scriptdir}/__pycache__/bisect.cpython-*.py[co] %{py_scriptdir}/__pycache__/codecs.cpython-*.py[co] +%{py_scriptdir}/__pycache__/_collections_abc.cpython-*.py[co] %{py_scriptdir}/__pycache__/copyreg.cpython-*.py[co] %{py_scriptdir}/__pycache__/functools.cpython-*.py[co] %{py_scriptdir}/__pycache__/genericpath.cpython-*.py[co] @@ -724,13 +728,11 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__future__.py %{py_scriptdir}/__phello__.foo.py %{py_scriptdir}/_bootlocale.py -%{py_scriptdir}/_collections_abc.py %{py_scriptdir}/_compat_pickle.py %{py_scriptdir}/_dummy_thread.py %{py_scriptdir}/_markupbase.py %{py_scriptdir}/_osx_support.py %{py_scriptdir}/_pyio.py -%{py_scriptdir}/_sitebuiltins.py %{py_scriptdir}/_strptime.py %{py_scriptdir}/_threading_local.py %{py_scriptdir}/aifc.py @@ -855,13 +857,11 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/__future__.cpython-*.py[co] %{py_scriptdir}/__pycache__/__phello__.cpython-*.py[co] %{py_scriptdir}/__pycache__/_bootlocale.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_collections_abc.cpython-*.py[co] %{py_scriptdir}/__pycache__/_compat_pickle.cpython-*.py[co] %{py_scriptdir}/__pycache__/_dummy_thread.cpython-*.py[co] %{py_scriptdir}/__pycache__/_markupbase.cpython-*.py[co] %{py_scriptdir}/__pycache__/_osx_support.cpython-*.py[co] %{py_scriptdir}/__pycache__/_pyio.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_sitebuiltins.cpython-*.py[co] %{py_scriptdir}/__pycache__/_strptime.cpython-*.py[co] %{py_scriptdir}/__pycache__/_threading_local.cpython-*.py[co] %{py_scriptdir}/__pycache__/aifc.cpython-*.py[co] From accaf63f7e455896595e7b78429fcbc3e0044fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 19 Oct 2014 12:02:36 +0200 Subject: [PATCH 012/180] - drop obsolete patch --- libc-cloexec.patch | 18 ------------------ python3.spec | 4 ++-- 2 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 libc-cloexec.patch diff --git a/libc-cloexec.patch b/libc-cloexec.patch deleted file mode 100644 index 6175228..0000000 --- a/libc-cloexec.patch +++ /dev/null @@ -1,18 +0,0 @@ -see also -http://serverfault.com/questions/388865/building-python3-on-a-redhat-5-machine - -upstream fix: -http://hg.python.org/cpython/rev/fe1dfc066a38 - ---- Python-3.2.3/Modules/_posixsubprocess.c~ 2012-04-11 09:54:07.000000000 +0300 -+++ Python-3.2.3/Modules/_posixsubprocess.c 2012-07-26 10:58:29.616131665 +0300 -@@ -37,6 +37,9 @@ - - #define POSIX_CALL(call) if ((call) == -1) goto error - -+#ifndef O_CLOEXEC -+#define O_CLOEXEC 02000000 /* set close_on_exec */ -+#endif - - /* Maximum file descriptor, initialized on module load. */ - static long max_fd; diff --git a/python3.spec b/python3.spec index 7565615..3d32ced 100644 --- a/python3.spec +++ b/python3.spec @@ -50,7 +50,7 @@ Patch2: %{name}-lib64.patch Patch3: %{name}-noarch_to_datadir.patch Patch4: %{name}-no_cmdline_tests.patch Patch5: %{name}-makefile-location.patch -Patch6: libc-cloexec.patch + Patch7: python-distro.patch Patch8: %{name}-db.patch URL: http://www.python.org/ @@ -465,7 +465,7 @@ Moduły testowe dla Pythona. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 + %patch7 -p1 %patch8 -p1 From cab985caccf132f796bd291870b96d5c6d355f20 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 21 Oct 2014 16:36:32 +0200 Subject: [PATCH 013/180] - use system mpdecimal library by default - clean up setuptools and pip files (since they are not packaged here, but in separate specs) --- python3.spec | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/python3.spec b/python3.spec index 3d32ced..62720ba 100644 --- a/python3.spec +++ b/python3.spec @@ -2,10 +2,10 @@ # - fix lib64 and noarch/datadir patches as the 2nd one overrides some # changes made by the first one; propose patches to python team as they # seem to be duplicated by fedora as well -# - --with-system-libmpdec when new version released [BR: mpdecimal-devel > 2.3] # # Conditional build: %bcond_with info # info pages (requires emacs) +%bcond_without system_mpdecimal # system libmpdec library %bcond_without tkinter # disables tkinter module building %bcond_with tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode @@ -65,6 +65,7 @@ BuildRequires: gdbm-devel >= 1.8.3 BuildRequires: gmp-devel >= 4.0 BuildRequires: libffi-devel BuildRequires: libstdc++-devel +%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.4.1} BuildRequires: ncurses-ext-devel >= 5.2 BuildRequires: openssl-devel >= 0.9.7 BuildRequires: readline-devel >= 5.0 @@ -217,6 +218,7 @@ Summary: Python modules Summary(pl.UTF-8): Moduły języka Python Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} +%{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.1} Obsoletes: python3-modules-sqlite %description modules @@ -498,21 +500,22 @@ fi LDFLAGS="%{rpmldflags}" \ ac_cv_posix_semaphores_enabled=yes \ ac_cv_broken_sem_getvalue=no \ - %{?with_debug:--with-pydebug} \ - --with-cxx-main="%{__cxx}" \ - --enable-shared \ --enable-ipv6 \ + --enable-shared \ + --with-computed-gotos \ + --with-cxx-main="%{__cxx}" \ --with-dbmliborder=gdbm:bdb \ - --with-signal-module \ -%ifarch %{ix86} %{x8664} ppc ppc64 - --with-tsc \ -%endif - --with-threads \ --with-doc-strings \ --with-fpectl \ + %{?with_debug:--with-pydebug} \ + --with-signal-module \ --with-system-expat \ --with-system-ffi \ - --with-computed-gotos \ + %{?with_system_mpdecimal:--with-system-libmpdec} \ + --with-threads \ +%ifarch %{ix86} %{x8664} ppc ppc64 + --with-tsc +%endif %{__make} 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } @@ -601,6 +604,16 @@ install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver} # currently provided by python-2to3, consider switching to this one %{__rm} $RPM_BUILD_ROOT%{_bindir}/2to3 +# packaged separately (python-setuptools.spec) +%{__rm} $RPM_BUILD_ROOT%{_bindir}/easy_install-3.4 \ + $RPM_BUILD_ROOT%{py_sitescriptdir}/{easy_install.py,pkg_resources.py} \ + $RPM_BUILD_ROOT%{py_sitescriptdir}/__pycache__/{easy_install,pkg_resources}.*.pyc +%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/{_markerlib,setuptools,setuptools-2.1.dist-info} + +# packaged separately (python-pip.spec) +%{__rm} $RPM_BUILD_ROOT%{_bindir}/{pip3,pip3.4} +%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/{pip,pip-1.5.6.dist-info} + # that seems to be only an empty extension template, # which seems to be built only {with tests} %{__rm} -f $RPM_BUILD_ROOT%{py_dyndir}/xxlimited.*.so From 6e059f2e42d4596dd739e5e2d7fa4ddc555dd971 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 21 Oct 2014 18:51:47 +0200 Subject: [PATCH 014/180] - avoid /usr/bin/env shebang, use direct python3 path --- python3.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python3.spec b/python3.spec index 62720ba..64917bd 100644 --- a/python3.spec +++ b/python3.spec @@ -486,6 +486,8 @@ for f in $files; do done %endif +find . -name '*.py' | xargs -r grep -El '^#! */usr/bin/env python3?' | xargs %{__sed} -i -e '1s,^#! */usr/bin/env python3\?,#!/usr/bin/python3,' + %build if ! grep -q "tmpfs" /proc/self/mounts; then echo "You need to have /dev/shm mounted in order to build this package!" >&2 From 25e3a83cfbee4f35175ae231e37a0eb15c30a644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 10 Nov 2014 18:18:15 +0100 Subject: [PATCH 015/180] - rel 2; put reindent script into devel-tools --- python3.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 64917bd..3590181 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Applications @@ -595,6 +595,9 @@ sed 's/=/ /' \ # pygettext.py is provided for compatibility install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver} +# reindent python code +install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ver} + # just to cut the noise, as they are not packaged (now) %{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/plat-*/regen %{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/macholib/fetch_macholib* @@ -1241,6 +1244,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) /etc/shrc.d/python*-devel* %attr(755,root,root) %{_bindir}/pygettext%{py_ver} +%attr(755,root,root) %{_bindir}/pyreindent%{py_ver} %{py_scriptdir}/pdb.py %{py_scriptdir}/profile.py %{py_scriptdir}/pstats.py From 4f87a49d2266e3650d846d3f0a7e0fff8491017b Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 13 Nov 2014 18:54:11 +0100 Subject: [PATCH 016/180] - disable setuptools and pip installation by --without-ensurepip --- python3.spec | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/python3.spec b/python3.spec index 3590181..4febd68 100644 --- a/python3.spec +++ b/python3.spec @@ -508,6 +508,7 @@ fi --with-cxx-main="%{__cxx}" \ --with-dbmliborder=gdbm:bdb \ --with-doc-strings \ + --without-ensurepip \ --with-fpectl \ %{?with_debug:--with-pydebug} \ --with-signal-module \ @@ -609,16 +610,6 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve # currently provided by python-2to3, consider switching to this one %{__rm} $RPM_BUILD_ROOT%{_bindir}/2to3 -# packaged separately (python-setuptools.spec) -%{__rm} $RPM_BUILD_ROOT%{_bindir}/easy_install-3.4 \ - $RPM_BUILD_ROOT%{py_sitescriptdir}/{easy_install.py,pkg_resources.py} \ - $RPM_BUILD_ROOT%{py_sitescriptdir}/__pycache__/{easy_install,pkg_resources}.*.pyc -%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/{_markerlib,setuptools,setuptools-2.1.dist-info} - -# packaged separately (python-pip.spec) -%{__rm} $RPM_BUILD_ROOT%{_bindir}/{pip3,pip3.4} -%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/{pip,pip-1.5.6.dist-info} - # that seems to be only an empty extension template, # which seems to be built only {with tests} %{__rm} -f $RPM_BUILD_ROOT%{py_dyndir}/xxlimited.*.so From b9e9dec0e48961c1492c606150dd3841cd5cd9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 13 Nov 2014 19:27:14 +0100 Subject: [PATCH 017/180] - release 3 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 4febd68..4ea0569 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Applications From c42a4664b02c66a08906be25a0b33f1e4fab23f5 Mon Sep 17 00:00:00 2001 From: Mateusz Korniak Date: Thu, 20 Nov 2014 15:39:29 +0100 Subject: [PATCH 018/180] - rel 4: P/O: python3-enum as is official module in 3.4 --- python3.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 4ea0569..3a7cee7 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 3 +Release: 4 Epoch: 1 License: PSF Group: Applications @@ -220,6 +220,8 @@ Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} %{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.1} Obsoletes: python3-modules-sqlite +Obsoletes: python3-enum +Provides: python3-enum %description modules Python officially distributed modules. From d629116d8f6644eba00d649d8e09aa7ecf88af5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 6 Dec 2014 23:12:46 +0100 Subject: [PATCH 019/180] - libffi rebuild - release 5 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 3a7cee7..1c9fe7b 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 4 +Release: 5 Epoch: 1 License: PSF Group: Applications From 58274b367a88030a28abc30a9d8bdac1efb7961b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Tue, 23 Dec 2014 07:53:15 +0000 Subject: [PATCH 020/180] - fixes for x32 arch - added xz BR --- python3-lib64.patch | 11 +++++++++-- python3.spec | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/python3-lib64.patch b/python3-lib64.patch index 2faac0d..a6c13e6 100644 --- a/python3-lib64.patch +++ b/python3-lib64.patch @@ -1,6 +1,6 @@ --- Python-3.3.1/configure.ac.orig 2013-04-18 16:31:07.244030129 +0200 +++ Python-3.3.1/configure.ac 2013-04-18 17:30:31.800622500 +0200 -@@ -769,6 +768,42 @@ +@@ -769,6 +768,45 @@ MULTIARCH=$($CC --print-multiarch 2>/dev/null) AC_SUBST(MULTIARCH) @@ -34,6 +34,9 @@ +powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) + LIB="lib64" + ;; ++x86_64:no) ++ LIB="libx32" ++ ;; +*:*) + LIB="lib" + ;; @@ -194,13 +197,17 @@ $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c --- Python-3.2.1.orig/Modules/getpath.c 2011-07-09 07:58:54.000000000 +0100 +++ Python-3.2.1/Modules/getpath.c 2011-07-12 22:21:48.000000000 +0100 -@@ -121,9 +121,17 @@ +@@ -121,9 +121,21 @@ #define EXEC_PREFIX PREFIX #endif +#ifndef LIB_PYTHON +#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) ++#if defined(__ILP32__) ++#define LIB_PYTHON "libx32/python" ++#else +#define LIB_PYTHON "lib64/python" ++#endif +#else +#define LIB_PYTHON "lib/python" +#endif diff --git a/python3.spec b/python3.spec index 1c9fe7b..eec25f4 100644 --- a/python3.spec +++ b/python3.spec @@ -76,6 +76,7 @@ BuildRequires: tar >= 1:1.22 %{?with_info:BuildRequires: tetex-makeindex} %{?with_tkinter:BuildRequires: tix-devel >= 1:8.1.4-4} %{?with_tkinter:BuildRequires: tk-devel >= 8.4.3} +BuildRequires: xz-devel BuildRequires: zlib-devel Requires: %{name}-libs = %{epoch}:%{version}-%{release} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -499,6 +500,7 @@ fi %{__autoconf} %configure \ + CC="%{__cc}" \ OPT="%{rpmcflags} -fno-caller-saves" \ CPPFLAGS="%{rpmcppflags}" \ LDFLAGS="%{rpmldflags}" \ From 5949bea9e73322d94d6838c7bd1ca373ce177e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Tue, 24 Feb 2015 22:38:43 +0100 Subject: [PATCH 021/180] - x32 rebuild - release 6 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index eec25f4..528ac7d 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 5 +Release: 6 Epoch: 1 License: PSF Group: Applications From 34c3e9e3b0bb70e88e1c6ee8f7726d274eee2c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 13 Mar 2015 22:52:27 +0100 Subject: [PATCH 022/180] - up to 3.4.3 --- python3.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python3.spec b/python3.spec index 528ac7d..c0b394c 100644 --- a/python3.spec +++ b/python3.spec @@ -37,13 +37,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.2 -Release: 6 +Version: %{py_ver}.3 +Release: 1 Epoch: 1 License: PSF Group: Applications Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 36fc7327c02c6f12fa24fc9ba78039e3 +# Source0-md5: 7d092d1bba6e17f0d9bd21b49e441dd5 Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-lib64.patch @@ -478,7 +478,7 @@ Moduły testowe dla Pythona. %{__rm} -r Modules/expat for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx; do - %{__rm} -r Modules/_ctypes/$SUBDIR + %{__rm} -r Modules/_ctypes/$SUBDIR/* done %if "%{pld_release}" == "ac" @@ -868,7 +868,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/xdrlib.py %{py_scriptdir}/zipfile.py %{py_scriptdir}/__pycache__/__future__.cpython-*.py[co] -%{py_scriptdir}/__pycache__/__phello__.cpython-*.py[co] +%{py_scriptdir}/__pycache__/__phello__.foo.cpython-*.py[co] %{py_scriptdir}/__pycache__/_bootlocale.cpython-*.py[co] %{py_scriptdir}/__pycache__/_compat_pickle.cpython-*.py[co] %{py_scriptdir}/__pycache__/_dummy_thread.cpython-*.py[co] From 6c32bfd4f9ae9f18fd0451bad9a93242ffd8b798 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 15 Mar 2015 21:04:00 +0100 Subject: [PATCH 023/180] - fix _ctypes module build: run aclocal (needed for PKG_PROG_PKG_CONFIG macro), BR: pkg-config --- python3.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python3.spec b/python3.spec index c0b394c..32e8851 100644 --- a/python3.spec +++ b/python3.spec @@ -55,6 +55,7 @@ Patch7: python-distro.patch Patch8: %{name}-db.patch URL: http://www.python.org/ BuildRequires: autoconf >= 2.65 +BuildRequires: automake BuildRequires: bluez-libs-devel BuildRequires: bzip2-devel BuildRequires: db-devel >= 4 @@ -68,6 +69,7 @@ BuildRequires: libstdc++-devel %{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.4.1} BuildRequires: ncurses-ext-devel >= 5.2 BuildRequires: openssl-devel >= 0.9.7 +BuildRequires: pkgconfig BuildRequires: readline-devel >= 5.0 BuildRequires: rpm-pythonprov BuildRequires: sed >= 4.0 @@ -498,6 +500,7 @@ if ! grep -q "tmpfs" /proc/self/mounts; then exit 1 fi +%{__aclocal} %{__autoconf} %configure \ CC="%{__cc}" \ From aa28f5ed1c2f276d6841a13fb2a97a789ff5a687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 15 Mar 2015 22:13:28 +0100 Subject: [PATCH 024/180] - rel 2 --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 32e8851..c4942da 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.3 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Applications From a749e51a9f7b0134df080e81e62a2c966e2647e3 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Mon, 16 Mar 2015 15:35:48 +0100 Subject: [PATCH 025/180] - adjusted db patch to cover db6.1 --- python3-db.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3-db.patch b/python3-db.patch index 34939ee..63b011d 100644 --- a/python3-db.patch +++ b/python3-db.patch @@ -5,7 +5,7 @@ # versions of BerkeleyDB already installed. - max_db_ver = (5, 3) -+ max_db_ver = (6, 0) ++ max_db_ver = (6, 1) min_db_ver = (3, 3) db_setup_debug = False # verbose debug prints from this script? From ac674191e88a3faab97ce56dd43cb6e8cb4bdd19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 13 Sep 2015 21:28:35 +0200 Subject: [PATCH 026/180] - up to 3.5.0 --- python3-ac_fixes.patch | 16 ++++++++++------ python3-lib64.patch | 26 ++++++++++++-------------- python3-no_cmdline_tests.patch | 6 +++--- python3-noarch_to_datadir.patch | 28 ++++++++++++++-------------- python3.spec | 28 ++++++++++++++++++++-------- 5 files changed, 59 insertions(+), 45 deletions(-) diff --git a/python3-ac_fixes.patch b/python3-ac_fixes.patch index a7f5530..e7611ed 100644 --- a/python3-ac_fixes.patch +++ b/python3-ac_fixes.patch @@ -1,11 +1,15 @@ ---- Python-3.2b1/configure.ac.orig 2010-12-12 16:18:42.000000000 +0000 -+++ Python-3.2b1/configure.ac 2010-12-12 16:20:34.000000000 +0000 -@@ -879,13 +879,13 @@ - if test "$Py_DEBUG" = 'true' ; then +--- Python-3.5.0/configure.ac~ 2015-09-13 13:41:26.000000000 +0200 ++++ Python-3.5.0/configure.ac 2015-09-13 20:06:11.597280920 +0200 +@@ -1258,16 +1258,16 @@ then # Optimization messes up debuggers, so turn it off for # debug builds. -- OPT="-g -O0 -Wall $STRICT_PROTO" -+ OPT="-g $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" + if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then +- OPT="-g -Og -Wall $STRICT_PROTO" ++ OPT="-g $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" + else +- OPT="-g -O0 -Wall $STRICT_PROTO" ++ OPT="-g $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" + fi else - OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" + OPT="-g $WRAP $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" diff --git a/python3-lib64.patch b/python3-lib64.patch index a6c13e6..50bca29 100644 --- a/python3-lib64.patch +++ b/python3-lib64.patch @@ -1,6 +1,6 @@ --- Python-3.3.1/configure.ac.orig 2013-04-18 16:31:07.244030129 +0200 +++ Python-3.3.1/configure.ac 2013-04-18 17:30:31.800622500 +0200 -@@ -769,6 +768,45 @@ +@@ -769,6 +769,45 @@ MULTIARCH=$($CC --print-multiarch 2>/dev/null) AC_SUBST(MULTIARCH) @@ -46,9 +46,9 @@ AC_SUBST(LIBRARY) AC_MSG_CHECKING(LIBRARY) ---- Python-3.2.1.orig/Include/pythonrun.h 2011-07-09 07:58:46.000000000 +0100 -+++ Python-3.2.1/Include/pythonrun.h 2011-07-12 22:20:12.000000000 +0100 -@@ -175,6 +175,8 @@ +--- Python-3.5.0/Include/pylifecycle.h~ 2015-09-13 13:41:20.000000000 +0200 ++++ Python-3.5.0/Include/pylifecycle.h 2015-09-13 20:08:24.017308537 +0200 +@@ -65,6 +65,8 @@ int _Py_CheckPython3(); /* In their own files */ PyAPI_FUNC(const char *) Py_GetVersion(void); PyAPI_FUNC(const char *) Py_GetPlatform(void); @@ -116,7 +116,7 @@ os.path.join(destination, "include", "python", "foopkg")) --- Python-3.2.1.orig/Lib/site.py 2011-07-09 07:58:49.000000000 +0100 +++ Python-3.2.1/Lib/site.py 2011-07-12 22:20:12.000000000 +0100 -@@ -304,13 +304,16 @@ def getsitepackages(prefixes=None): +@@ -304,12 +304,15 @@ def getsitepackages(prefixes=None): seen.add(prefix) if os.sep == '/': @@ -124,11 +124,9 @@ + sitepackages.append(os.path.join(prefix, sys.lib, "python" + sys.version[:3], "site-packages")) -- sitepackages.append(os.path.join(prefix, "lib", "site-python")) + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) + if sys.lib != 'lib': + sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) -+ sitepackages.append(os.path.join(prefix, "lib", "site-python")) else: sitepackages.append(prefix) - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) @@ -221,12 +219,12 @@ #endif #ifndef LANDMARK -@@ -502,7 +502,7 @@ calculate_path(void) - _pythonpath = _Py_char2wchar(PYTHONPATH, NULL); - _prefix = _Py_char2wchar(PREFIX, NULL); - _exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL); -- lib_python = _Py_char2wchar("lib/python" VERSION, NULL); -+ lib_python = _Py_char2wchar(LIB_PYTHON VERSION, NULL); +@@ -502,7 +514,7 @@ calculate_path(void) + _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); + _prefix = Py_DecodeLocale(PREFIX, NULL); + _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); +- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL); ++ lib_python = Py_DecodeLocale(LIB_PYTHON VERSION, NULL); if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { Py_FatalError( @@ -281,7 +279,7 @@ ] inc_dirs = self.compiler.include_dirs + ['/usr/include'] exts = [] -@@ -643,11 +643,11 @@ +@@ -643,11 +642,11 @@ elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(lib_dirs + diff --git a/python3-no_cmdline_tests.patch b/python3-no_cmdline_tests.patch index ad01727..7a39622 100644 --- a/python3-no_cmdline_tests.patch +++ b/python3-no_cmdline_tests.patch @@ -22,9 +22,9 @@ diff -Nur Python-3.3.1.orig/Lib/test/test_compileall.py Python-3.3.1/Lib/test/te class CommandLineTests(unittest.TestCase): """Test compileall's CLI.""" -diff -Nur Python-3.3.1.orig/Lib/test/test_warnings.py Python-3.3.1/Lib/test/test_warnings.py ---- Python-3.3.1.orig/Lib/test/test_warnings.py 2013-04-06 08:41:46.000000000 +0100 -+++ Python-3.3.1/Lib/test/test_warnings.py 2013-04-07 19:41:25.529164545 +0100 +diff -Nur Python-3.3.1.orig/Lib/test/test_warnings/__init__.py Python-3.3.1/Lib/test/test_warnings/__init__.py +--- Python-3.3.1.orig/Lib/test/test_warnings/__init__.py 2013-04-06 08:41:46.000000000 +0100 ++++ Python-3.3.1/Lib/test/test_warnings/__init__.py 2013-04-07 19:41:25.529164545 +0100 @@ -717,6 +717,7 @@ module = py_warnings diff --git a/python3-noarch_to_datadir.patch b/python3-noarch_to_datadir.patch index 38a2424..63a1f00 100644 --- a/python3-noarch_to_datadir.patch +++ b/python3-noarch_to_datadir.patch @@ -54,15 +54,13 @@ diff -dur Python-3.2.1.orig/Lib/distutils/tests/test_install.py Python-3.2.1/Lib diff -dur Python-3.2.1.orig/Lib/site.py Python-3.2.1/Lib/site.py --- Python-3.2.1.orig/Lib/site.py 2011-07-15 20:16:35.529557475 +0200 +++ Python-3.2.1/Lib/site.py 2011-07-15 20:17:09.134405059 +0200 -@@ -289,9 +289,8 @@ +@@ -289,8 +289,7 @@ "python" + sys.version[:3], "site-packages")) sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) - if sys.lib != 'lib': - sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) -- sitepackages.append(os.path.join(prefix, "lib", "site-python")) + sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) -+ sitepackages.append(os.path.join(prefix, "share", "site-python")) else: sitepackages.append(prefix) sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) @@ -78,6 +76,17 @@ diff -dur Python-3.2.1.orig/Lib/sysconfig.py Python-3.2.1/Lib/sysconfig.py 'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages', 'include': '{base}/include/python{py_version_short}{abiflags}', +--- Python-3.5.0/configure.ac~ 2015-09-13 20:18:04.000000000 +0200 ++++ Python-3.5.0/configure.ac 2015-09-13 20:21:35.887422670 +0200 +@@ -4370,7 +4370,7 @@ AC_MSG_RESULT($LDVERSION) + + dnl define LIBPL after ABIFLAGS and LDVERSION is defined. + AC_SUBST(PY_ENABLE_SHARED) +-LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" ++LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}" + AC_SUBST(LIBPL) + + # Check whether right shifting a negative integer extends the sign bit diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in --- Python-3.2.1.orig/Makefile.pre.in 2011-07-15 20:16:35.532890958 +0200 +++ Python-3.2.1/Makefile.pre.in 2011-07-15 20:17:09.134405059 +0200 @@ -90,15 +99,6 @@ diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in ABIFLAGS= @ABIFLAGS@ # Detailed destination directories -@@ -1046,7 +1046,7 @@ - - # Install the library and miscellaneous stuff needed for extending/embedding - # This goes into $(exec_prefix) --LIBPL= $(LIBDEST)/config-$(LDVERSION) -+LIBPL= $(BINLIBDEST)/config-$(LDVERSION) - - # pkgconfig directory - LIBPC= $(LIBDIR)/pkgconfig @@ -1065,8 +1065,8 @@ if test "$(SO)" = .dll; then \ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ @@ -123,7 +123,7 @@ diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c #endif #ifndef LANDMARK -@@ -673,13 +673,13 @@ calculate_path(void) +@@ -673,13 +674,13 @@ calculate_path(void) } } @@ -139,7 +139,7 @@ diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c } else reduce(prefix); -@@ -691,7 +693,7 @@ +@@ -691,7 +692,7 @@ } else wcsncpy(zip_path, _prefix, MAXPATHLEN); diff --git a/python3.spec b/python3.spec index c4942da..f56dc7f 100644 --- a/python3.spec +++ b/python3.spec @@ -20,7 +20,7 @@ # test_gdb: fails, as the gdb uses old python version %define broken_tests test_httpservers test_distutils test_cmd_line test_pydoc test_telnetlib test_zlib test_gdb test_site -%define py_ver 3.4 +%define py_ver 3.5 %define py_abi %{py_ver}m %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} @@ -37,13 +37,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.3 -Release: 2 +Version: %{py_ver}.0 +Release: 1 Epoch: 1 License: PSF Group: Applications Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 7d092d1bba6e17f0d9bd21b49e441dd5 +# Source0-md5: d149d2812f10cbe04c042232e7964171 Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-lib64.patch @@ -740,14 +740,16 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) /etc/shrc.d/python*-modules* %attr(755,root,root) %{_bindir}/pyvenv -%attr(755,root,root) %{_bindir}/pyvenv-3.4 +%attr(755,root,root) %{_bindir}/pyvenv-3.5 %{py_scriptdir}/__future__.py %{py_scriptdir}/__phello__.foo.py %{py_scriptdir}/_bootlocale.py %{py_scriptdir}/_compat_pickle.py +%{py_scriptdir}/_compression.py %{py_scriptdir}/_dummy_thread.py %{py_scriptdir}/_markupbase.py %{py_scriptdir}/_osx_support.py +%{py_scriptdir}/_pydecimal.py %{py_scriptdir}/_pyio.py %{py_scriptdir}/_strptime.py %{py_scriptdir}/_threading_local.py @@ -833,6 +835,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/random.py %{py_scriptdir}/rlcompleter.py %{py_scriptdir}/runpy.py +%{py_scriptdir}/signal.py %{py_scriptdir}/sched.py %{py_scriptdir}/selectors.py %{py_scriptdir}/shelve.py @@ -863,20 +866,24 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/tracemalloc.py %{py_scriptdir}/tty.py %{py_scriptdir}/turtle.py +%{py_scriptdir}/typing.py %{py_scriptdir}/uu.py %{py_scriptdir}/uuid.py %{py_scriptdir}/warnings.py %{py_scriptdir}/wave.py %{py_scriptdir}/webbrowser.py %{py_scriptdir}/xdrlib.py +%{py_scriptdir}/zipapp.py %{py_scriptdir}/zipfile.py %{py_scriptdir}/__pycache__/__future__.cpython-*.py[co] %{py_scriptdir}/__pycache__/__phello__.foo.cpython-*.py[co] %{py_scriptdir}/__pycache__/_bootlocale.cpython-*.py[co] %{py_scriptdir}/__pycache__/_compat_pickle.cpython-*.py[co] +%{py_scriptdir}/__pycache__/_compression.cpython-*.py[co] %{py_scriptdir}/__pycache__/_dummy_thread.cpython-*.py[co] %{py_scriptdir}/__pycache__/_markupbase.cpython-*.py[co] %{py_scriptdir}/__pycache__/_osx_support.cpython-*.py[co] +%{py_scriptdir}/__pycache__/_pydecimal.cpython-*.py[co] %{py_scriptdir}/__pycache__/_pyio.cpython-*.py[co] %{py_scriptdir}/__pycache__/_strptime.cpython-*.py[co] %{py_scriptdir}/__pycache__/_threading_local.cpython-*.py[co] @@ -967,6 +974,7 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/shelve.cpython-*.py[co] %{py_scriptdir}/__pycache__/shlex.cpython-*.py[co] %{py_scriptdir}/__pycache__/shutil.cpython-*.py[co] +%{py_scriptdir}/__pycache__/signal.cpython-*.py[co] %{py_scriptdir}/__pycache__/smtpd.cpython-*.py[co] %{py_scriptdir}/__pycache__/smtplib.cpython-*.py[co] %{py_scriptdir}/__pycache__/sndhdr.cpython-*.py[co] @@ -992,12 +1000,14 @@ rm -rf $RPM_BUILD_ROOT %{py_scriptdir}/__pycache__/tracemalloc.cpython-*.py[co] %{py_scriptdir}/__pycache__/tty.cpython-*.py[co] %{py_scriptdir}/__pycache__/turtle.cpython-*.py[co] +%{py_scriptdir}/__pycache__/typing.cpython-*.py[co] %{py_scriptdir}/__pycache__/uu.cpython-*.py[co] %{py_scriptdir}/__pycache__/uuid.cpython-*.py[co] %{py_scriptdir}/__pycache__/warnings.cpython-*.py[co] %{py_scriptdir}/__pycache__/wave.cpython-*.py[co] %{py_scriptdir}/__pycache__/webbrowser.cpython-*.py[co] %{py_scriptdir}/__pycache__/xdrlib.cpython-*.py[co] +%{py_scriptdir}/__pycache__/zipapp.cpython-*.py[co] %{py_scriptdir}/__pycache__/zipfile.cpython-*.py[co] # @@ -1042,6 +1052,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so # for openssl < 0.9.8 package sha256 and sha512 modules %if "%{pld_release}" != "ac" @@ -1066,7 +1077,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/select.cpython-*.so %attr(755,root,root) %{py_dyndir}/syslog.cpython-*.so %attr(755,root,root) %{py_dyndir}/termios.cpython-*.so -%attr(755,root,root) %{py_dyndir}/time.cpython-*.so %attr(755,root,root) %{py_dyndir}/spwd.cpython-*.so %attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so @@ -1165,6 +1175,8 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_scriptdir}/venv/scripts %dir %{py_scriptdir}/venv/scripts/posix %{py_scriptdir}/venv/scripts/posix/activate +%{py_scriptdir}/venv/scripts/posix/activate.csh +%{py_scriptdir}/venv/scripts/posix/activate.fish %dir %{py_scriptdir}/wsgiref %{py_scriptdir}/wsgiref/__pycache__ @@ -1198,7 +1210,7 @@ rm -rf $RPM_BUILD_ROOT %files -n pydoc3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/pydoc3 -%attr(755,root,root) %{_bindir}/pydoc3.4 +%attr(755,root,root) %{_bindir}/pydoc3.5 %{py_scriptdir}/pydoc.py %{py_scriptdir}/__pycache__/pydoc.cpython-*.py[co] %dir %{py_scriptdir}/pydoc_data @@ -1209,7 +1221,7 @@ rm -rf $RPM_BUILD_ROOT %files -n idle3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/idle3 -%attr(755,root,root) %{_bindir}/idle3.4 +%attr(755,root,root) %{_bindir}/idle3.5 %dir %{py_scriptdir}/idlelib/Icons %{py_scriptdir}/idlelib/__pycache__ %{py_scriptdir}/idlelib/*.py From 25160146b73399a9830876dd0e8c9c4c93ddf0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 14 Sep 2015 10:39:22 +0300 Subject: [PATCH 027/180] use py_ver macro --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index f56dc7f..2b27057 100644 --- a/python3.spec +++ b/python3.spec @@ -740,7 +740,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) /etc/shrc.d/python*-modules* %attr(755,root,root) %{_bindir}/pyvenv -%attr(755,root,root) %{_bindir}/pyvenv-3.5 +%attr(755,root,root) %{_bindir}/pyvenv-%{py_ver} %{py_scriptdir}/__future__.py %{py_scriptdir}/__phello__.foo.py %{py_scriptdir}/_bootlocale.py From d78d98c2e0a58d3cb4541c3b46045fc8409dc0e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 30 Oct 2015 20:20:15 +0100 Subject: [PATCH 028/180] - rel 2; atomic fixes --- python3-atomic.patch | 78 ++++++++++++++++++++++++++++++++++++++++++++ python3.spec | 6 ++-- 2 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 python3-atomic.patch diff --git a/python3-atomic.patch b/python3-atomic.patch new file mode 100644 index 0000000..be77c2a --- /dev/null +++ b/python3-atomic.patch @@ -0,0 +1,78 @@ + +# HG changeset patch +# User Victor Stinner +# Date 1442581594 -7200 +# Node ID d4fcb362f7c66b25b22ddc0d27db0cc96acc727b +# Parent d04a0954e142f873adee88ec5bc1c1d81cd46bc4 +Issue #25150: Hide the private _Py_atomic_xxx symbols from the public +Python.h header to fix a compilation error with OpenMP. PyThreadState_GET() +becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies. + +It is important that the _PyThreadState_Current variable is always accessed +with the same implementation of pyatomic.h. Use the PyThreadState_Get() +function so extension modules will all reuse the same implementation. + +diff --git a/Include/pyatomic.h b/Include/pyatomic.h +--- a/Include/pyatomic.h ++++ b/Include/pyatomic.h +@@ -1,8 +1,6 @@ +-/* Issue #23644: is incompatible with C++, see: +- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932 */ +-#if !defined(Py_LIMITED_API) && !defined(__cplusplus) + #ifndef Py_ATOMIC_H + #define Py_ATOMIC_H ++#ifdef Py_BUILD_CORE + + #include "dynamic_annotations.h" + +@@ -248,5 +246,5 @@ static __inline__ void + #define _Py_atomic_load_relaxed(ATOMIC_VAL) \ + _Py_atomic_load_explicit(ATOMIC_VAL, _Py_memory_order_relaxed) + ++#endif /* Py_BUILD_CORE */ + #endif /* Py_ATOMIC_H */ +-#endif /* Py_LIMITED_API */ +diff --git a/Include/pystate.h b/Include/pystate.h +--- a/Include/pystate.h ++++ b/Include/pystate.h +@@ -177,20 +177,13 @@ PyAPI_FUNC(int) PyThreadState_SetAsyncEx + /* Variable and macro for in-line access to current thread state */ + + /* Assuming the current thread holds the GIL, this is the +- PyThreadState for the current thread. +- +- Issue #23644: pyatomic.h is incompatible with C++ (yet). Disable +- PyThreadState_GET() optimization: declare it as an alias to +- PyThreadState_Get(), as done for limited API. */ +-#if !defined(Py_LIMITED_API) && !defined(__cplusplus) ++ PyThreadState for the current thread. */ ++#ifdef Py_BUILD_CORE + PyAPI_DATA(_Py_atomic_address) _PyThreadState_Current; +-#endif +- +-#if defined(Py_DEBUG) || defined(Py_LIMITED_API) || defined(__cplusplus) +-#define PyThreadState_GET() PyThreadState_Get() ++# define PyThreadState_GET() \ ++ ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) + #else +-#define PyThreadState_GET() \ +- ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) ++# define PyThreadState_GET() PyThreadState_Get() + #endif + + typedef +diff --git a/Misc/NEWS b/Misc/NEWS +--- a/Misc/NEWS ++++ b/Misc/NEWS +@@ -11,6 +11,10 @@ Release date: TBA + Core and Builtins + ----------------- + ++- Issue #25150: Hide the private _Py_atomic_xxx symbols from the public ++ Python.h header to fix a compilation error with OpenMP. PyThreadState_GET() ++ becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies. ++ + Library + ------- + + diff --git a/python3.spec b/python3.spec index 2b27057..86f2223 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Applications @@ -50,7 +50,7 @@ Patch2: %{name}-lib64.patch Patch3: %{name}-noarch_to_datadir.patch Patch4: %{name}-no_cmdline_tests.patch Patch5: %{name}-makefile-location.patch - +Patch6: python3-atomic.patch Patch7: python-distro.patch Patch8: %{name}-db.patch URL: http://www.python.org/ @@ -472,7 +472,7 @@ Moduły testowe dla Pythona. %patch3 -p1 %patch4 -p1 %patch5 -p1 - +%patch6 -p1 %patch7 -p1 %patch8 -p1 From f50f21b8527261aa86aea0cb1e358bc9d4b14cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 31 Oct 2015 08:31:55 +0100 Subject: [PATCH 029/180] - rel 3; don't use g++ for linking, shouldn't be needed on elf/linux - http://thread.gmane.org/gmane.comp.python.devel/69651 --- python3.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 86f2223..a6f1f4f 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Applications @@ -512,7 +512,6 @@ fi --enable-ipv6 \ --enable-shared \ --with-computed-gotos \ - --with-cxx-main="%{__cxx}" \ --with-dbmliborder=gdbm:bdb \ --with-doc-strings \ --without-ensurepip \ From 4212268eab29ae6a4094ed0b3193c9fe395509e1 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Wed, 25 Nov 2015 18:57:53 +0100 Subject: [PATCH 030/180] Use /usr/local as distutils default inst. prefix Release: 4 --- python3-install_prefix.patch | 48 ++++++++++++++++++++++++++++++++++++ python3.spec | 4 ++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 python3-install_prefix.patch diff --git a/python3-install_prefix.patch b/python3-install_prefix.patch new file mode 100644 index 0000000..1b5a45c --- /dev/null +++ b/python3-install_prefix.patch @@ -0,0 +1,48 @@ +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py +--- Python-3.5.0.orig/Lib/distutils/command/install.py 2015-11-25 17:54:32.000000000 +0100 ++++ Python-3.5.0/Lib/distutils/command/install.py 2015-11-25 18:06:33.876268151 +0100 +@@ -9,6 +9,7 @@ + from distutils.core import Command + from distutils.debug import DEBUG + from distutils.sysconfig import get_config_vars ++from distutils.sysconfig import PREFIX, EXEC_PREFIX + from distutils.errors import DistutilsPlatformError + from distutils.file_util import write_file + from distutils.util import convert_path, subst_vars, change_root +@@ -418,8 +419,8 @@ + raise DistutilsOptionError( + "must not supply exec-prefix without prefix") + +- self.prefix = os.path.normpath(sys.prefix) +- self.exec_prefix = os.path.normpath(sys.exec_prefix) ++ self.prefix = PREFIX ++ self.exec_prefix = EXEC_PREFIX + + else: + if self.exec_prefix is None: +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py +--- Python-3.5.0.orig/Lib/distutils/sysconfig.py 2015-11-25 17:54:32.000000000 +0100 ++++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-11-25 18:03:39.338573134 +0100 +@@ -17,8 +17,8 @@ + from .errors import DistutilsPlatformError + + # These are needed in a couple of spots, so just compute them once. +-PREFIX = os.path.normpath(sys.prefix) +-EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++PREFIX = "/usr/local" ++EXEC_PREFIX = PREFIX + BASE_PREFIX = os.path.normpath(sys.base_prefix) + BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) + +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py +--- Python-3.5.0.orig/Lib/site.py 2015-11-25 17:54:32.000000000 +0100 ++++ Python-3.5.0/Lib/site.py 2015-11-25 17:56:39.979513073 +0100 +@@ -74,7 +74,7 @@ + import _sitebuiltins + + # Prefixes for site-packages; add additional prefixes like /usr/local here +-PREFIXES = [sys.prefix, sys.exec_prefix] ++PREFIXES = ["/usr/local", sys.prefix, sys.exec_prefix] + # Enable per user site-packages directory + # set it to False to disable the feature or True to force the feature + ENABLE_USER_SITE = None diff --git a/python3.spec b/python3.spec index a6f1f4f..85bbc54 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 3 +Release: 4 Epoch: 1 License: PSF Group: Applications @@ -53,6 +53,7 @@ Patch5: %{name}-makefile-location.patch Patch6: python3-atomic.patch Patch7: python-distro.patch Patch8: %{name}-db.patch +Patch9: %{name}-install_prefix.patch URL: http://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -475,6 +476,7 @@ Moduły testowe dla Pythona. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat From ed03fb352d2628c7a14e33c195942cf509060957 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Wed, 25 Nov 2015 20:06:57 +0100 Subject: [PATCH 031/180] Suggests: python-pip PEP 0453 recommendation --- python3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python3.spec b/python3.spec index 85bbc54..f51df1f 100644 --- a/python3.spec +++ b/python3.spec @@ -82,6 +82,7 @@ BuildRequires: tar >= 1:1.22 BuildRequires: xz-devel BuildRequires: zlib-devel Requires: %{name}-libs = %{epoch}:%{version}-%{release} +Suggests: python3-pip BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define specflags_ppc -D__ppc__=1 From 2a80ebbf53a6e6a086f691499e59904dc45fbeb9 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Sat, 28 Nov 2015 14:23:08 +0100 Subject: [PATCH 032/180] Suggests: pip Release: 5 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index f51df1f..7448242 100644 --- a/python3.spec +++ b/python3.spec @@ -38,7 +38,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 4 +Release: 5 Epoch: 1 License: PSF Group: Applications @@ -82,7 +82,7 @@ BuildRequires: tar >= 1:1.22 BuildRequires: xz-devel BuildRequires: zlib-devel Requires: %{name}-libs = %{epoch}:%{version}-%{release} -Suggests: python3-pip +Suggests: pip BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define specflags_ppc -D__ppc__=1 From 902c69efd275761f8c5c9bf5651fa3999abaacab Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Tue, 1 Dec 2015 18:35:17 +0100 Subject: [PATCH 033/180] Don't split Python standard library in two parts There is no gain of keeping pure python standard library modules in %{_datadir} and it causes problems with virtualenv. External modules will still be installed in %{_libdir} or %{_datadir} depending on whether it contains architecture-dependant pieces. --- python3-lib64.patch | 13 + python3-noarch_to_datadir.patch | 87 +-- python3.spec | 1010 +++++++++++++++---------------- 3 files changed, 520 insertions(+), 590 deletions(-) diff --git a/python3-lib64.patch b/python3-lib64.patch index 50bca29..ba72b16 100644 --- a/python3-lib64.patch +++ b/python3-lib64.patch @@ -293,3 +293,16 @@ extra_link_args=readline_extra_link_args, libraries=readline_libs) ) else: +diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c +--- Python-3.2.1.orig/Modules/getpath.c 2011-07-15 20:16:35.536224442 +0200 ++++ Python-3.2.1/Modules/getpath.c 2011-07-15 20:17:09.137738543 +0200 +@@ -691,7 +692,7 @@ + } + else + wcsncpy(zip_path, _prefix, MAXPATHLEN); +- joinpath(zip_path, L"lib/python00.zip"); ++ joinpath(zip_path, L"" LIB_PYTHON "00.zip"); + bufsz = wcslen(zip_path); /* Replace "00" with version */ + zip_path[bufsz - 6] = VERSION[0]; + zip_path[bufsz - 5] = VERSION[2]; + diff --git a/python3-noarch_to_datadir.patch b/python3-noarch_to_datadir.patch index 63a1f00..b0352b2 100644 --- a/python3-noarch_to_datadir.patch +++ b/python3-noarch_to_datadir.patch @@ -18,48 +18,15 @@ diff -dur Python-3.2.1.orig/Lib/distutils/command/install.py Python-3.2.1/Lib/di 'platlib': '$base/'+libname+'/python', 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', -diff -dur Python-3.2.1.orig/Lib/distutils/sysconfig.py Python-3.2.1/Lib/distutils/sysconfig.py ---- Python-3.2.1.orig/Lib/distutils/sysconfig.py 2011-07-15 20:16:35.526223992 +0200 -+++ Python-3.2.1/Lib/distutils/sysconfig.py 2011-07-15 20:17:09.131071575 +0200 -@@ -124,12 +124,12 @@ - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -- if plat_specific: -- lib = sys.lib -+ if plat_specific: -+ libpython = os.path.join(prefix, -+ sys.lib, "python" + get_python_version()) - else: -- lib = 'lib' -- libpython = os.path.join(prefix, -- lib, "python" + get_python_version()) -+ libpython = os.path.join(prefix, -+ "share", "python" + get_python_version()) - if standard_lib: - return libpython - else: -diff -dur Python-3.2.1.orig/Lib/distutils/tests/test_install.py Python-3.2.1/Lib/distutils/tests/test_install.py ---- Python-3.2.1.orig/Lib/distutils/tests/test_install.py 2011-07-15 20:16:35.529557475 +0200 -+++ Python-3.2.1/Lib/distutils/tests/test_install.py 2011-07-15 20:17:09.131071575 +0200 -@@ -48,7 +48,7 @@ - expected = os.path.normpath(expected) - self.assertEqual(got, expected) - -- libdir = os.path.join(destination, "lib", "python") -+ libdir = os.path.join(destination, "share", "python") - platlibdir = os.path.join(destination, sys.lib, "python") - check_path(cmd.install_lib, libdir) - check_path(cmd.install_platlib, platlibdir) diff -dur Python-3.2.1.orig/Lib/site.py Python-3.2.1/Lib/site.py --- Python-3.2.1.orig/Lib/site.py 2011-07-15 20:16:35.529557475 +0200 +++ Python-3.2.1/Lib/site.py 2011-07-15 20:17:09.134405059 +0200 -@@ -289,8 +289,7 @@ +@@ -289,8 +289,9 @@ "python" + sys.version[:3], "site-packages")) sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) -- if sys.lib != 'lib': -- sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) + if sys.lib != 'lib': + sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) + sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) else: sitepackages.append(prefix) @@ -90,15 +57,6 @@ diff -dur Python-3.2.1.orig/Lib/sysconfig.py Python-3.2.1/Lib/sysconfig.py diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in --- Python-3.2.1.orig/Makefile.pre.in 2011-07-15 20:16:35.532890958 +0200 +++ Python-3.2.1/Makefile.pre.in 2011-07-15 20:17:09.134405059 +0200 -@@ -108,7 +108,7 @@ - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/$(LIB) -+SCRIPTDIR= $(prefix)/share - ABIFLAGS= @ABIFLAGS@ - - # Detailed destination directories @@ -1065,8 +1065,8 @@ if test "$(SO)" = .dll; then \ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ @@ -110,41 +68,4 @@ diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in fi; \ else \ echo Skip install of $(LIBRARY) - use make frameworkinstall; \ -diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c ---- Python-3.2.1.orig/Modules/getpath.c 2011-07-15 20:16:35.536224442 +0200 -+++ Python-3.2.1/Modules/getpath.c 2011-07-15 20:17:09.137738543 +0200 -@@ -131,7 +131,8 @@ - - #ifndef PYTHONPATH - #define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \ -- EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" -+ EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" \ -+ PREFIX "/share/python" VERSION - #endif - - #ifndef LANDMARK -@@ -673,13 +674,13 @@ calculate_path(void) - } - } - -- pfound = search_for_prefix(argv0_path, home, _prefix, lib_python); -+ pfound = search_for_prefix(argv0_path, home, _prefix, L"share/python" VERSION); - if (!pfound) { - if (!Py_FrozenFlag) - fprintf(stderr, - "Could not find platform independent libraries \n"); - wcsncpy(prefix, _prefix, MAXPATHLEN); -- joinpath(prefix, lib_python); -+ joinpath(prefix, L"share/python"); - } - else - reduce(prefix); -@@ -691,7 +692,7 @@ - } - else - wcsncpy(zip_path, _prefix, MAXPATHLEN); -- joinpath(zip_path, L"lib/python00.zip"); -+ joinpath(zip_path, L"" LIB_PYTHON "00.zip"); - bufsz = wcslen(zip_path); /* Replace "00" with version */ - zip_path[bufsz - 6] = VERSION[0]; - zip_path[bufsz - 5] = VERSION[2]; + diff --git a/python3.spec b/python3.spec index 7448242..47e6c0d 100644 --- a/python3.spec +++ b/python3.spec @@ -1,7 +1,3 @@ -# TODO: -# - fix lib64 and noarch/datadir patches as the 2nd one overrides some -# changes made by the first one; propose patches to python team as they -# seem to be duplicated by fedora as well # # Conditional build: %bcond_with info # info pages (requires emacs) @@ -609,12 +605,12 @@ install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver} install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ver} # just to cut the noise, as they are not packaged (now) -%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/plat-*/regen -%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/macholib/fetch_macholib* -%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/site-packages/README -%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/distutils/command/wininst*.exe -%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/idlelib/*.bat -%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/idlelib/*.pyw +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib* +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/wininst*.exe +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.bat +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.pyw # currently provided by python-2to3, consider switching to this one %{__rm} $RPM_BUILD_ROOT%{_bindir}/2to3 @@ -624,7 +620,7 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve %{__rm} -f $RPM_BUILD_ROOT%{py_dyndir}/xxlimited.*.so # already in %%doc -%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/LICENSE.txt +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/LICENSE.txt %clean rm -rf $RPM_BUILD_ROOT @@ -658,8 +654,8 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_dyndir} %dir %{py_sitedir} %dir %{py_sitedir}/__pycache__ +%dir %{py_libdir}/__pycache__ %dir %{py_scriptdir} -%dir %{py_scriptdir}/__pycache__ %dir %{py_sitescriptdir} %dir %{py_sitescriptdir}/__pycache__ @@ -667,70 +663,70 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_struct.cpython-*.so # modules required by python library -%{py_scriptdir}/_collections_abc.py -%{py_scriptdir}/_sitebuiltins.py -%{py_scriptdir}/_sysconfigdata.py -%{py_scriptdir}/_weakrefset.py -%{py_scriptdir}/abc.py -%{py_scriptdir}/bisect.py -%{py_scriptdir}/codecs.py -%{py_scriptdir}/copyreg.py -%{py_scriptdir}/functools.py -%{py_scriptdir}/genericpath.py -%{py_scriptdir}/heapq.py -%{py_scriptdir}/keyword.py -%{py_scriptdir}/linecache.py -%{py_scriptdir}/locale.py -%{py_scriptdir}/io.py -%{py_scriptdir}/posixpath.py -%{py_scriptdir}/re.py -%{py_scriptdir}/reprlib.py -%{py_scriptdir}/site.py -%{py_scriptdir}/sre_*.py -%{py_scriptdir}/stat.py -%{py_scriptdir}/sysconfig.py -%{py_scriptdir}/token.py -%{py_scriptdir}/tokenize.py -%{py_scriptdir}/traceback.py -%{py_scriptdir}/weakref.py -%{py_scriptdir}/os.py +%{py_libdir}/_collections_abc.py +%{py_libdir}/_sitebuiltins.py +%{py_libdir}/_sysconfigdata.py +%{py_libdir}/_weakrefset.py +%{py_libdir}/abc.py +%{py_libdir}/bisect.py +%{py_libdir}/codecs.py +%{py_libdir}/copyreg.py +%{py_libdir}/functools.py +%{py_libdir}/genericpath.py +%{py_libdir}/heapq.py +%{py_libdir}/keyword.py +%{py_libdir}/linecache.py +%{py_libdir}/locale.py +%{py_libdir}/io.py +%{py_libdir}/posixpath.py +%{py_libdir}/re.py +%{py_libdir}/reprlib.py +%{py_libdir}/site.py +%{py_libdir}/sre_*.py +%{py_libdir}/stat.py +%{py_libdir}/sysconfig.py +%{py_libdir}/token.py +%{py_libdir}/tokenize.py +%{py_libdir}/traceback.py +%{py_libdir}/weakref.py +%{py_libdir}/os.py # needed by the dynamic sys.lib patch -%{py_scriptdir}/types.py -%{py_scriptdir}/__pycache__/_sitebuiltins.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_sysconfigdata.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_weakrefset.cpython-*.py[co] -%{py_scriptdir}/__pycache__/abc.cpython-*.py[co] -%{py_scriptdir}/__pycache__/bisect.cpython-*.py[co] -%{py_scriptdir}/__pycache__/codecs.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_collections_abc.cpython-*.py[co] -%{py_scriptdir}/__pycache__/copyreg.cpython-*.py[co] -%{py_scriptdir}/__pycache__/functools.cpython-*.py[co] -%{py_scriptdir}/__pycache__/genericpath.cpython-*.py[co] -%{py_scriptdir}/__pycache__/heapq.cpython-*.py[co] -%{py_scriptdir}/__pycache__/keyword.cpython-*.py[co] -%{py_scriptdir}/__pycache__/linecache.cpython-*.py[co] -%{py_scriptdir}/__pycache__/locale.cpython-*.py[co] -%{py_scriptdir}/__pycache__/io.cpython-*.py[co] -%{py_scriptdir}/__pycache__/posixpath.cpython-*.py[co] -%{py_scriptdir}/__pycache__/re.cpython-*.py[co] -%{py_scriptdir}/__pycache__/reprlib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/site.cpython-*.py[co] -%{py_scriptdir}/__pycache__/sre_*.cpython-*.py[co] -%{py_scriptdir}/__pycache__/stat.cpython-*.py[co] -%{py_scriptdir}/__pycache__/sysconfig.cpython-*.py[co] -%{py_scriptdir}/__pycache__/token.cpython-*.py[co] -%{py_scriptdir}/__pycache__/tokenize.cpython-*.py[co] -%{py_scriptdir}/__pycache__/traceback.cpython-*.py[co] -%{py_scriptdir}/__pycache__/weakref.cpython-*.py[co] -%{py_scriptdir}/__pycache__/os.cpython-*.py[co] -%{py_scriptdir}/__pycache__/types.cpython-*.py[co] - -%{py_scriptdir}/collections +%{py_libdir}/types.py +%{py_libdir}/__pycache__/_sitebuiltins.cpython-*.py[co] +%{py_libdir}/__pycache__/_sysconfigdata.cpython-*.py[co] +%{py_libdir}/__pycache__/_weakrefset.cpython-*.py[co] +%{py_libdir}/__pycache__/abc.cpython-*.py[co] +%{py_libdir}/__pycache__/bisect.cpython-*.py[co] +%{py_libdir}/__pycache__/codecs.cpython-*.py[co] +%{py_libdir}/__pycache__/_collections_abc.cpython-*.py[co] +%{py_libdir}/__pycache__/copyreg.cpython-*.py[co] +%{py_libdir}/__pycache__/functools.cpython-*.py[co] +%{py_libdir}/__pycache__/genericpath.cpython-*.py[co] +%{py_libdir}/__pycache__/heapq.cpython-*.py[co] +%{py_libdir}/__pycache__/keyword.cpython-*.py[co] +%{py_libdir}/__pycache__/linecache.cpython-*.py[co] +%{py_libdir}/__pycache__/locale.cpython-*.py[co] +%{py_libdir}/__pycache__/io.cpython-*.py[co] +%{py_libdir}/__pycache__/posixpath.cpython-*.py[co] +%{py_libdir}/__pycache__/re.cpython-*.py[co] +%{py_libdir}/__pycache__/reprlib.cpython-*.py[co] +%{py_libdir}/__pycache__/site.cpython-*.py[co] +%{py_libdir}/__pycache__/sre_*.cpython-*.py[co] +%{py_libdir}/__pycache__/stat.cpython-*.py[co] +%{py_libdir}/__pycache__/sysconfig.cpython-*.py[co] +%{py_libdir}/__pycache__/token.cpython-*.py[co] +%{py_libdir}/__pycache__/tokenize.cpython-*.py[co] +%{py_libdir}/__pycache__/traceback.cpython-*.py[co] +%{py_libdir}/__pycache__/weakref.cpython-*.py[co] +%{py_libdir}/__pycache__/os.cpython-*.py[co] +%{py_libdir}/__pycache__/types.cpython-*.py[co] + +%{py_libdir}/collections # encodings required by python library -%dir %{py_scriptdir}/encodings -%{py_scriptdir}/encodings/__pycache__ -%{py_scriptdir}/encodings/*.py +%dir %{py_libdir}/encodings +%{py_libdir}/encodings/__pycache__ +%{py_libdir}/encodings/*.py %dir %{py_libdir}/config-%{py_abi} %{py_libdir}/config-%{py_abi}/Makefile @@ -743,274 +739,274 @@ rm -rf $RPM_BUILD_ROOT /etc/shrc.d/python*-modules* %attr(755,root,root) %{_bindir}/pyvenv %attr(755,root,root) %{_bindir}/pyvenv-%{py_ver} -%{py_scriptdir}/__future__.py -%{py_scriptdir}/__phello__.foo.py -%{py_scriptdir}/_bootlocale.py -%{py_scriptdir}/_compat_pickle.py -%{py_scriptdir}/_compression.py -%{py_scriptdir}/_dummy_thread.py -%{py_scriptdir}/_markupbase.py -%{py_scriptdir}/_osx_support.py -%{py_scriptdir}/_pydecimal.py -%{py_scriptdir}/_pyio.py -%{py_scriptdir}/_strptime.py -%{py_scriptdir}/_threading_local.py -%{py_scriptdir}/aifc.py -%{py_scriptdir}/antigravity.py -%{py_scriptdir}/argparse.py -%{py_scriptdir}/ast.py -%{py_scriptdir}/asynchat.py -%{py_scriptdir}/asyncore.py -%{py_scriptdir}/base64.py -%{py_scriptdir}/bdb.py -%{py_scriptdir}/binhex.py -%{py_scriptdir}/bz2.py -%{py_scriptdir}/cProfile.py -%{py_scriptdir}/calendar.py -%{py_scriptdir}/cgi.py -%{py_scriptdir}/cgitb.py -%{py_scriptdir}/chunk.py -%{py_scriptdir}/cmd.py -%{py_scriptdir}/code.py -%{py_scriptdir}/codeop.py -%{py_scriptdir}/colorsys.py -%{py_scriptdir}/compileall.py -%{py_scriptdir}/configparser.py -%{py_scriptdir}/contextlib.py -%{py_scriptdir}/copy.py -%{py_scriptdir}/crypt.py -%{py_scriptdir}/csv.py -%{py_scriptdir}/datetime.py -%{py_scriptdir}/decimal.py -%{py_scriptdir}/difflib.py -%{py_scriptdir}/dis.py -%{py_scriptdir}/doctest.py -%{py_scriptdir}/dummy_threading.py -%{py_scriptdir}/enum.py -%{py_scriptdir}/filecmp.py -%{py_scriptdir}/fileinput.py -%{py_scriptdir}/fnmatch.py -%{py_scriptdir}/formatter.py -%{py_scriptdir}/fractions.py -%{py_scriptdir}/ftplib.py -%{py_scriptdir}/getopt.py -%{py_scriptdir}/getpass.py -%{py_scriptdir}/gettext.py -%{py_scriptdir}/glob.py -%{py_scriptdir}/gzip.py -%{py_scriptdir}/hashlib.py -%{py_scriptdir}/hmac.py -%{py_scriptdir}/imaplib.py -%{py_scriptdir}/imghdr.py -%{py_scriptdir}/imp.py -%{py_scriptdir}/inspect.py -%{py_scriptdir}/ipaddress.py -%{py_scriptdir}/lzma.py -%{py_scriptdir}/macpath.py -%{py_scriptdir}/macurl2path.py -%{py_scriptdir}/mailbox.py -%{py_scriptdir}/mailcap.py -%{py_scriptdir}/mimetypes.py -%{py_scriptdir}/modulefinder.py -%{py_scriptdir}/netrc.py -%{py_scriptdir}/nntplib.py -%{py_scriptdir}/ntpath.py -%{py_scriptdir}/nturl2path.py -%{py_scriptdir}/numbers.py -%{py_scriptdir}/opcode.py -%{py_scriptdir}/operator.py -%{py_scriptdir}/optparse.py -%{py_scriptdir}/pathlib.py -%{py_scriptdir}/pickle.py -%{py_scriptdir}/pickletools.py -%{py_scriptdir}/pipes.py -%{py_scriptdir}/pkgutil.py -%{py_scriptdir}/platform.py -%{py_scriptdir}/plistlib.py -%{py_scriptdir}/poplib.py -%{py_scriptdir}/pprint.py -%{py_scriptdir}/pty.py -%{py_scriptdir}/py_compile.py -%{py_scriptdir}/pyclbr.py -%{py_scriptdir}/queue.py -%{py_scriptdir}/quopri.py -%{py_scriptdir}/random.py -%{py_scriptdir}/rlcompleter.py -%{py_scriptdir}/runpy.py -%{py_scriptdir}/signal.py -%{py_scriptdir}/sched.py -%{py_scriptdir}/selectors.py -%{py_scriptdir}/shelve.py -%{py_scriptdir}/shlex.py -%{py_scriptdir}/shutil.py -%{py_scriptdir}/smtpd.py -%{py_scriptdir}/smtplib.py -%{py_scriptdir}/sndhdr.py -%{py_scriptdir}/socket.py -%{py_scriptdir}/socketserver.py -%{py_scriptdir}/ssl.py -%{py_scriptdir}/statistics.py -%{py_scriptdir}/string.py -%{py_scriptdir}/stringprep.py -%{py_scriptdir}/struct.py -%{py_scriptdir}/subprocess.py -%{py_scriptdir}/sunau.py -%{py_scriptdir}/symbol.py -%{py_scriptdir}/symtable.py -%{py_scriptdir}/tabnanny.py -%{py_scriptdir}/tarfile.py -%{py_scriptdir}/telnetlib.py -%{py_scriptdir}/tempfile.py -%{py_scriptdir}/textwrap.py -%{py_scriptdir}/this.py -%{py_scriptdir}/threading.py -%{py_scriptdir}/trace.py -%{py_scriptdir}/tracemalloc.py -%{py_scriptdir}/tty.py -%{py_scriptdir}/turtle.py -%{py_scriptdir}/typing.py -%{py_scriptdir}/uu.py -%{py_scriptdir}/uuid.py -%{py_scriptdir}/warnings.py -%{py_scriptdir}/wave.py -%{py_scriptdir}/webbrowser.py -%{py_scriptdir}/xdrlib.py -%{py_scriptdir}/zipapp.py -%{py_scriptdir}/zipfile.py -%{py_scriptdir}/__pycache__/__future__.cpython-*.py[co] -%{py_scriptdir}/__pycache__/__phello__.foo.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_bootlocale.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_compat_pickle.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_compression.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_dummy_thread.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_markupbase.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_osx_support.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_pydecimal.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_pyio.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_strptime.cpython-*.py[co] -%{py_scriptdir}/__pycache__/_threading_local.cpython-*.py[co] -%{py_scriptdir}/__pycache__/aifc.cpython-*.py[co] -%{py_scriptdir}/__pycache__/antigravity.cpython-*.py[co] -%{py_scriptdir}/__pycache__/argparse.cpython-*.py[co] -%{py_scriptdir}/__pycache__/ast.cpython-*.py[co] -%{py_scriptdir}/__pycache__/asynchat.cpython-*.py[co] -%{py_scriptdir}/__pycache__/asyncore.cpython-*.py[co] -%{py_scriptdir}/__pycache__/base64.cpython-*.py[co] -%{py_scriptdir}/__pycache__/bdb.cpython-*.py[co] -%{py_scriptdir}/__pycache__/binhex.cpython-*.py[co] -%{py_scriptdir}/__pycache__/bz2.cpython-*.py[co] -%{py_scriptdir}/__pycache__/cProfile.cpython-*.py[co] -%{py_scriptdir}/__pycache__/calendar.cpython-*.py[co] -%{py_scriptdir}/__pycache__/cgi.cpython-*.py[co] -%{py_scriptdir}/__pycache__/cgitb.cpython-*.py[co] -%{py_scriptdir}/__pycache__/chunk.cpython-*.py[co] -%{py_scriptdir}/__pycache__/cmd.cpython-*.py[co] -%{py_scriptdir}/__pycache__/code.cpython-*.py[co] -%{py_scriptdir}/__pycache__/codeop.cpython-*.py[co] -%{py_scriptdir}/__pycache__/colorsys.cpython-*.py[co] -%{py_scriptdir}/__pycache__/compileall.cpython-*.py[co] -%{py_scriptdir}/__pycache__/configparser.cpython-*.py[co] -%{py_scriptdir}/__pycache__/contextlib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/copy.cpython-*.py[co] -%{py_scriptdir}/__pycache__/crypt.cpython-*.py[co] -%{py_scriptdir}/__pycache__/csv.cpython-*.py[co] -%{py_scriptdir}/__pycache__/datetime.cpython-*.py[co] -%{py_scriptdir}/__pycache__/decimal.cpython-*.py[co] -%{py_scriptdir}/__pycache__/difflib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/dis.cpython-*.py[co] -%{py_scriptdir}/__pycache__/doctest.cpython-*.py[co] -%{py_scriptdir}/__pycache__/dummy_threading.cpython-*.py[co] -%{py_scriptdir}/__pycache__/enum.cpython-*.py[co] -%{py_scriptdir}/__pycache__/filecmp.cpython-*.py[co] -%{py_scriptdir}/__pycache__/fileinput.cpython-*.py[co] -%{py_scriptdir}/__pycache__/fnmatch.cpython-*.py[co] -%{py_scriptdir}/__pycache__/formatter.cpython-*.py[co] -%{py_scriptdir}/__pycache__/fractions.cpython-*.py[co] -%{py_scriptdir}/__pycache__/ftplib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/getopt.cpython-*.py[co] -%{py_scriptdir}/__pycache__/getpass.cpython-*.py[co] -%{py_scriptdir}/__pycache__/gettext.cpython-*.py[co] -%{py_scriptdir}/__pycache__/glob.cpython-*.py[co] -%{py_scriptdir}/__pycache__/gzip.cpython-*.py[co] -%{py_scriptdir}/__pycache__/hashlib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/hmac.cpython-*.py[co] -%{py_scriptdir}/__pycache__/imaplib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/imghdr.cpython-*.py[co] -%{py_scriptdir}/__pycache__/imp.cpython-*.py[co] -%{py_scriptdir}/__pycache__/inspect.cpython-*.py[co] -%{py_scriptdir}/__pycache__/ipaddress.cpython-*.py[co] -%{py_scriptdir}/__pycache__/lzma.cpython-*.py[co] -%{py_scriptdir}/__pycache__/macpath.cpython-*.py[co] -%{py_scriptdir}/__pycache__/macurl2path.cpython-*.py[co] -%{py_scriptdir}/__pycache__/mailbox.cpython-*.py[co] -%{py_scriptdir}/__pycache__/mailcap.cpython-*.py[co] -%{py_scriptdir}/__pycache__/mimetypes.cpython-*.py[co] -%{py_scriptdir}/__pycache__/modulefinder.cpython-*.py[co] -%{py_scriptdir}/__pycache__/netrc.cpython-*.py[co] -%{py_scriptdir}/__pycache__/nntplib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/ntpath.cpython-*.py[co] -%{py_scriptdir}/__pycache__/nturl2path.cpython-*.py[co] -%{py_scriptdir}/__pycache__/numbers.cpython-*.py[co] -%{py_scriptdir}/__pycache__/opcode.cpython-*.py[co] -%{py_scriptdir}/__pycache__/operator.cpython-*.py[co] -%{py_scriptdir}/__pycache__/optparse.cpython-*.py[co] -%{py_scriptdir}/__pycache__/pathlib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/pickle.cpython-*.py[co] -%{py_scriptdir}/__pycache__/pickletools.cpython-*.py[co] -%{py_scriptdir}/__pycache__/pipes.cpython-*.py[co] -%{py_scriptdir}/__pycache__/pkgutil.cpython-*.py[co] -%{py_scriptdir}/__pycache__/platform.cpython-*.py[co] -%{py_scriptdir}/__pycache__/plistlib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/poplib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/pprint.cpython-*.py[co] -%{py_scriptdir}/__pycache__/pty.cpython-*.py[co] -%{py_scriptdir}/__pycache__/py_compile.cpython-*.py[co] -%{py_scriptdir}/__pycache__/pyclbr.cpython-*.py[co] -%{py_scriptdir}/__pycache__/queue.cpython-*.py[co] -%{py_scriptdir}/__pycache__/quopri.cpython-*.py[co] -%{py_scriptdir}/__pycache__/random.cpython-*.py[co] -%{py_scriptdir}/__pycache__/rlcompleter.cpython-*.py[co] -%{py_scriptdir}/__pycache__/runpy.cpython-*.py[co] -%{py_scriptdir}/__pycache__/sched.cpython-*.py[co] -%{py_scriptdir}/__pycache__/selectors.cpython-*.py[co] -%{py_scriptdir}/__pycache__/shelve.cpython-*.py[co] -%{py_scriptdir}/__pycache__/shlex.cpython-*.py[co] -%{py_scriptdir}/__pycache__/shutil.cpython-*.py[co] -%{py_scriptdir}/__pycache__/signal.cpython-*.py[co] -%{py_scriptdir}/__pycache__/smtpd.cpython-*.py[co] -%{py_scriptdir}/__pycache__/smtplib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/sndhdr.cpython-*.py[co] -%{py_scriptdir}/__pycache__/socket.cpython-*.py[co] -%{py_scriptdir}/__pycache__/socketserver.cpython-*.py[co] -%{py_scriptdir}/__pycache__/ssl.cpython-*.py[co] -%{py_scriptdir}/__pycache__/statistics.cpython-*.py[co] -%{py_scriptdir}/__pycache__/string.cpython-*.py[co] -%{py_scriptdir}/__pycache__/stringprep.cpython-*.py[co] -%{py_scriptdir}/__pycache__/struct.cpython-*.py[co] -%{py_scriptdir}/__pycache__/subprocess.cpython-*.py[co] -%{py_scriptdir}/__pycache__/sunau.cpython-*.py[co] -%{py_scriptdir}/__pycache__/symbol.cpython-*.py[co] -%{py_scriptdir}/__pycache__/symtable.cpython-*.py[co] -%{py_scriptdir}/__pycache__/tabnanny.cpython-*.py[co] -%{py_scriptdir}/__pycache__/tarfile.cpython-*.py[co] -%{py_scriptdir}/__pycache__/telnetlib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/tempfile.cpython-*.py[co] -%{py_scriptdir}/__pycache__/textwrap.cpython-*.py[co] -%{py_scriptdir}/__pycache__/this.cpython-*.py[co] -%{py_scriptdir}/__pycache__/threading.cpython-*.py[co] -%{py_scriptdir}/__pycache__/trace.cpython-*.py[co] -%{py_scriptdir}/__pycache__/tracemalloc.cpython-*.py[co] -%{py_scriptdir}/__pycache__/tty.cpython-*.py[co] -%{py_scriptdir}/__pycache__/turtle.cpython-*.py[co] -%{py_scriptdir}/__pycache__/typing.cpython-*.py[co] -%{py_scriptdir}/__pycache__/uu.cpython-*.py[co] -%{py_scriptdir}/__pycache__/uuid.cpython-*.py[co] -%{py_scriptdir}/__pycache__/warnings.cpython-*.py[co] -%{py_scriptdir}/__pycache__/wave.cpython-*.py[co] -%{py_scriptdir}/__pycache__/webbrowser.cpython-*.py[co] -%{py_scriptdir}/__pycache__/xdrlib.cpython-*.py[co] -%{py_scriptdir}/__pycache__/zipapp.cpython-*.py[co] -%{py_scriptdir}/__pycache__/zipfile.cpython-*.py[co] +%{py_libdir}/__future__.py +%{py_libdir}/__phello__.foo.py +%{py_libdir}/_bootlocale.py +%{py_libdir}/_compat_pickle.py +%{py_libdir}/_compression.py +%{py_libdir}/_dummy_thread.py +%{py_libdir}/_markupbase.py +%{py_libdir}/_osx_support.py +%{py_libdir}/_pydecimal.py +%{py_libdir}/_pyio.py +%{py_libdir}/_strptime.py +%{py_libdir}/_threading_local.py +%{py_libdir}/aifc.py +%{py_libdir}/antigravity.py +%{py_libdir}/argparse.py +%{py_libdir}/ast.py +%{py_libdir}/asynchat.py +%{py_libdir}/asyncore.py +%{py_libdir}/base64.py +%{py_libdir}/bdb.py +%{py_libdir}/binhex.py +%{py_libdir}/bz2.py +%{py_libdir}/cProfile.py +%{py_libdir}/calendar.py +%{py_libdir}/cgi.py +%{py_libdir}/cgitb.py +%{py_libdir}/chunk.py +%{py_libdir}/cmd.py +%{py_libdir}/code.py +%{py_libdir}/codeop.py +%{py_libdir}/colorsys.py +%{py_libdir}/compileall.py +%{py_libdir}/configparser.py +%{py_libdir}/contextlib.py +%{py_libdir}/copy.py +%{py_libdir}/crypt.py +%{py_libdir}/csv.py +%{py_libdir}/datetime.py +%{py_libdir}/decimal.py +%{py_libdir}/difflib.py +%{py_libdir}/dis.py +%{py_libdir}/doctest.py +%{py_libdir}/dummy_threading.py +%{py_libdir}/enum.py +%{py_libdir}/filecmp.py +%{py_libdir}/fileinput.py +%{py_libdir}/fnmatch.py +%{py_libdir}/formatter.py +%{py_libdir}/fractions.py +%{py_libdir}/ftplib.py +%{py_libdir}/getopt.py +%{py_libdir}/getpass.py +%{py_libdir}/gettext.py +%{py_libdir}/glob.py +%{py_libdir}/gzip.py +%{py_libdir}/hashlib.py +%{py_libdir}/hmac.py +%{py_libdir}/imaplib.py +%{py_libdir}/imghdr.py +%{py_libdir}/imp.py +%{py_libdir}/inspect.py +%{py_libdir}/ipaddress.py +%{py_libdir}/lzma.py +%{py_libdir}/macpath.py +%{py_libdir}/macurl2path.py +%{py_libdir}/mailbox.py +%{py_libdir}/mailcap.py +%{py_libdir}/mimetypes.py +%{py_libdir}/modulefinder.py +%{py_libdir}/netrc.py +%{py_libdir}/nntplib.py +%{py_libdir}/ntpath.py +%{py_libdir}/nturl2path.py +%{py_libdir}/numbers.py +%{py_libdir}/opcode.py +%{py_libdir}/operator.py +%{py_libdir}/optparse.py +%{py_libdir}/pathlib.py +%{py_libdir}/pickle.py +%{py_libdir}/pickletools.py +%{py_libdir}/pipes.py +%{py_libdir}/pkgutil.py +%{py_libdir}/platform.py +%{py_libdir}/plistlib.py +%{py_libdir}/poplib.py +%{py_libdir}/pprint.py +%{py_libdir}/pty.py +%{py_libdir}/py_compile.py +%{py_libdir}/pyclbr.py +%{py_libdir}/queue.py +%{py_libdir}/quopri.py +%{py_libdir}/random.py +%{py_libdir}/rlcompleter.py +%{py_libdir}/runpy.py +%{py_libdir}/signal.py +%{py_libdir}/sched.py +%{py_libdir}/selectors.py +%{py_libdir}/shelve.py +%{py_libdir}/shlex.py +%{py_libdir}/shutil.py +%{py_libdir}/smtpd.py +%{py_libdir}/smtplib.py +%{py_libdir}/sndhdr.py +%{py_libdir}/socket.py +%{py_libdir}/socketserver.py +%{py_libdir}/ssl.py +%{py_libdir}/statistics.py +%{py_libdir}/string.py +%{py_libdir}/stringprep.py +%{py_libdir}/struct.py +%{py_libdir}/subprocess.py +%{py_libdir}/sunau.py +%{py_libdir}/symbol.py +%{py_libdir}/symtable.py +%{py_libdir}/tabnanny.py +%{py_libdir}/tarfile.py +%{py_libdir}/telnetlib.py +%{py_libdir}/tempfile.py +%{py_libdir}/textwrap.py +%{py_libdir}/this.py +%{py_libdir}/threading.py +%{py_libdir}/trace.py +%{py_libdir}/tracemalloc.py +%{py_libdir}/tty.py +%{py_libdir}/turtle.py +%{py_libdir}/typing.py +%{py_libdir}/uu.py +%{py_libdir}/uuid.py +%{py_libdir}/warnings.py +%{py_libdir}/wave.py +%{py_libdir}/webbrowser.py +%{py_libdir}/xdrlib.py +%{py_libdir}/zipapp.py +%{py_libdir}/zipfile.py +%{py_libdir}/__pycache__/__future__.cpython-*.py[co] +%{py_libdir}/__pycache__/__phello__.foo.cpython-*.py[co] +%{py_libdir}/__pycache__/_bootlocale.cpython-*.py[co] +%{py_libdir}/__pycache__/_compat_pickle.cpython-*.py[co] +%{py_libdir}/__pycache__/_compression.cpython-*.py[co] +%{py_libdir}/__pycache__/_dummy_thread.cpython-*.py[co] +%{py_libdir}/__pycache__/_markupbase.cpython-*.py[co] +%{py_libdir}/__pycache__/_osx_support.cpython-*.py[co] +%{py_libdir}/__pycache__/_pydecimal.cpython-*.py[co] +%{py_libdir}/__pycache__/_pyio.cpython-*.py[co] +%{py_libdir}/__pycache__/_strptime.cpython-*.py[co] +%{py_libdir}/__pycache__/_threading_local.cpython-*.py[co] +%{py_libdir}/__pycache__/aifc.cpython-*.py[co] +%{py_libdir}/__pycache__/antigravity.cpython-*.py[co] +%{py_libdir}/__pycache__/argparse.cpython-*.py[co] +%{py_libdir}/__pycache__/ast.cpython-*.py[co] +%{py_libdir}/__pycache__/asynchat.cpython-*.py[co] +%{py_libdir}/__pycache__/asyncore.cpython-*.py[co] +%{py_libdir}/__pycache__/base64.cpython-*.py[co] +%{py_libdir}/__pycache__/bdb.cpython-*.py[co] +%{py_libdir}/__pycache__/binhex.cpython-*.py[co] +%{py_libdir}/__pycache__/bz2.cpython-*.py[co] +%{py_libdir}/__pycache__/cProfile.cpython-*.py[co] +%{py_libdir}/__pycache__/calendar.cpython-*.py[co] +%{py_libdir}/__pycache__/cgi.cpython-*.py[co] +%{py_libdir}/__pycache__/cgitb.cpython-*.py[co] +%{py_libdir}/__pycache__/chunk.cpython-*.py[co] +%{py_libdir}/__pycache__/cmd.cpython-*.py[co] +%{py_libdir}/__pycache__/code.cpython-*.py[co] +%{py_libdir}/__pycache__/codeop.cpython-*.py[co] +%{py_libdir}/__pycache__/colorsys.cpython-*.py[co] +%{py_libdir}/__pycache__/compileall.cpython-*.py[co] +%{py_libdir}/__pycache__/configparser.cpython-*.py[co] +%{py_libdir}/__pycache__/contextlib.cpython-*.py[co] +%{py_libdir}/__pycache__/copy.cpython-*.py[co] +%{py_libdir}/__pycache__/crypt.cpython-*.py[co] +%{py_libdir}/__pycache__/csv.cpython-*.py[co] +%{py_libdir}/__pycache__/datetime.cpython-*.py[co] +%{py_libdir}/__pycache__/decimal.cpython-*.py[co] +%{py_libdir}/__pycache__/difflib.cpython-*.py[co] +%{py_libdir}/__pycache__/dis.cpython-*.py[co] +%{py_libdir}/__pycache__/doctest.cpython-*.py[co] +%{py_libdir}/__pycache__/dummy_threading.cpython-*.py[co] +%{py_libdir}/__pycache__/enum.cpython-*.py[co] +%{py_libdir}/__pycache__/filecmp.cpython-*.py[co] +%{py_libdir}/__pycache__/fileinput.cpython-*.py[co] +%{py_libdir}/__pycache__/fnmatch.cpython-*.py[co] +%{py_libdir}/__pycache__/formatter.cpython-*.py[co] +%{py_libdir}/__pycache__/fractions.cpython-*.py[co] +%{py_libdir}/__pycache__/ftplib.cpython-*.py[co] +%{py_libdir}/__pycache__/getopt.cpython-*.py[co] +%{py_libdir}/__pycache__/getpass.cpython-*.py[co] +%{py_libdir}/__pycache__/gettext.cpython-*.py[co] +%{py_libdir}/__pycache__/glob.cpython-*.py[co] +%{py_libdir}/__pycache__/gzip.cpython-*.py[co] +%{py_libdir}/__pycache__/hashlib.cpython-*.py[co] +%{py_libdir}/__pycache__/hmac.cpython-*.py[co] +%{py_libdir}/__pycache__/imaplib.cpython-*.py[co] +%{py_libdir}/__pycache__/imghdr.cpython-*.py[co] +%{py_libdir}/__pycache__/imp.cpython-*.py[co] +%{py_libdir}/__pycache__/inspect.cpython-*.py[co] +%{py_libdir}/__pycache__/ipaddress.cpython-*.py[co] +%{py_libdir}/__pycache__/lzma.cpython-*.py[co] +%{py_libdir}/__pycache__/macpath.cpython-*.py[co] +%{py_libdir}/__pycache__/macurl2path.cpython-*.py[co] +%{py_libdir}/__pycache__/mailbox.cpython-*.py[co] +%{py_libdir}/__pycache__/mailcap.cpython-*.py[co] +%{py_libdir}/__pycache__/mimetypes.cpython-*.py[co] +%{py_libdir}/__pycache__/modulefinder.cpython-*.py[co] +%{py_libdir}/__pycache__/netrc.cpython-*.py[co] +%{py_libdir}/__pycache__/nntplib.cpython-*.py[co] +%{py_libdir}/__pycache__/ntpath.cpython-*.py[co] +%{py_libdir}/__pycache__/nturl2path.cpython-*.py[co] +%{py_libdir}/__pycache__/numbers.cpython-*.py[co] +%{py_libdir}/__pycache__/opcode.cpython-*.py[co] +%{py_libdir}/__pycache__/operator.cpython-*.py[co] +%{py_libdir}/__pycache__/optparse.cpython-*.py[co] +%{py_libdir}/__pycache__/pathlib.cpython-*.py[co] +%{py_libdir}/__pycache__/pickle.cpython-*.py[co] +%{py_libdir}/__pycache__/pickletools.cpython-*.py[co] +%{py_libdir}/__pycache__/pipes.cpython-*.py[co] +%{py_libdir}/__pycache__/pkgutil.cpython-*.py[co] +%{py_libdir}/__pycache__/platform.cpython-*.py[co] +%{py_libdir}/__pycache__/plistlib.cpython-*.py[co] +%{py_libdir}/__pycache__/poplib.cpython-*.py[co] +%{py_libdir}/__pycache__/pprint.cpython-*.py[co] +%{py_libdir}/__pycache__/pty.cpython-*.py[co] +%{py_libdir}/__pycache__/py_compile.cpython-*.py[co] +%{py_libdir}/__pycache__/pyclbr.cpython-*.py[co] +%{py_libdir}/__pycache__/queue.cpython-*.py[co] +%{py_libdir}/__pycache__/quopri.cpython-*.py[co] +%{py_libdir}/__pycache__/random.cpython-*.py[co] +%{py_libdir}/__pycache__/rlcompleter.cpython-*.py[co] +%{py_libdir}/__pycache__/runpy.cpython-*.py[co] +%{py_libdir}/__pycache__/sched.cpython-*.py[co] +%{py_libdir}/__pycache__/selectors.cpython-*.py[co] +%{py_libdir}/__pycache__/shelve.cpython-*.py[co] +%{py_libdir}/__pycache__/shlex.cpython-*.py[co] +%{py_libdir}/__pycache__/shutil.cpython-*.py[co] +%{py_libdir}/__pycache__/signal.cpython-*.py[co] +%{py_libdir}/__pycache__/smtpd.cpython-*.py[co] +%{py_libdir}/__pycache__/smtplib.cpython-*.py[co] +%{py_libdir}/__pycache__/sndhdr.cpython-*.py[co] +%{py_libdir}/__pycache__/socket.cpython-*.py[co] +%{py_libdir}/__pycache__/socketserver.cpython-*.py[co] +%{py_libdir}/__pycache__/ssl.cpython-*.py[co] +%{py_libdir}/__pycache__/statistics.cpython-*.py[co] +%{py_libdir}/__pycache__/string.cpython-*.py[co] +%{py_libdir}/__pycache__/stringprep.cpython-*.py[co] +%{py_libdir}/__pycache__/struct.cpython-*.py[co] +%{py_libdir}/__pycache__/subprocess.cpython-*.py[co] +%{py_libdir}/__pycache__/sunau.cpython-*.py[co] +%{py_libdir}/__pycache__/symbol.cpython-*.py[co] +%{py_libdir}/__pycache__/symtable.cpython-*.py[co] +%{py_libdir}/__pycache__/tabnanny.cpython-*.py[co] +%{py_libdir}/__pycache__/tarfile.cpython-*.py[co] +%{py_libdir}/__pycache__/telnetlib.cpython-*.py[co] +%{py_libdir}/__pycache__/tempfile.cpython-*.py[co] +%{py_libdir}/__pycache__/textwrap.cpython-*.py[co] +%{py_libdir}/__pycache__/this.cpython-*.py[co] +%{py_libdir}/__pycache__/threading.cpython-*.py[co] +%{py_libdir}/__pycache__/trace.cpython-*.py[co] +%{py_libdir}/__pycache__/tracemalloc.cpython-*.py[co] +%{py_libdir}/__pycache__/tty.cpython-*.py[co] +%{py_libdir}/__pycache__/turtle.cpython-*.py[co] +%{py_libdir}/__pycache__/typing.cpython-*.py[co] +%{py_libdir}/__pycache__/uu.cpython-*.py[co] +%{py_libdir}/__pycache__/uuid.cpython-*.py[co] +%{py_libdir}/__pycache__/warnings.cpython-*.py[co] +%{py_libdir}/__pycache__/wave.cpython-*.py[co] +%{py_libdir}/__pycache__/webbrowser.cpython-*.py[co] +%{py_libdir}/__pycache__/xdrlib.cpython-*.py[co] +%{py_libdir}/__pycache__/zipapp.cpython-*.py[co] +%{py_libdir}/__pycache__/zipfile.cpython-*.py[co] # # list .so modules to be sure that all of them are built @@ -1083,154 +1079,154 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so -%dir %{py_scriptdir}/plat-* -%{py_scriptdir}/plat-*/__pycache__ -%{py_scriptdir}/plat-*/*.py - -%dir %{py_scriptdir}/asyncio -%{py_scriptdir}/asyncio/__pycache__ -%{py_scriptdir}/asyncio/*.py - -%{py_scriptdir}/concurrent - -%dir %{py_scriptdir}/ctypes -%dir %{py_scriptdir}/ctypes/macholib -%{py_scriptdir}/ctypes/__pycache__ -%{py_scriptdir}/ctypes/macholib/__pycache__ - -%{py_scriptdir}/ctypes/*.py -%{py_scriptdir}/ctypes/macholib/*.py -%doc %{py_scriptdir}/ctypes/macholib/README.ctypes - -%dir %{py_scriptdir}/curses -%{py_scriptdir}/curses/__pycache__ -%{py_scriptdir}/curses/*.py - -%dir %{py_scriptdir}/dbm -%{py_scriptdir}/dbm/__pycache__ -%{py_scriptdir}/dbm/*.py - -%dir %{py_scriptdir}/distutils -%dir %{py_scriptdir}/distutils/command -%doc %{py_scriptdir}/distutils/README -%{py_scriptdir}/distutils/__pycache__ -%{py_scriptdir}/distutils/command/__pycache__ -%{py_scriptdir}/distutils/*.py -%{py_scriptdir}/distutils/command/*.py -%{py_scriptdir}/distutils/command/command_template - -%dir %{py_scriptdir}/email -%dir %{py_scriptdir}/email/mime -%{py_scriptdir}/email/__pycache__ -%{py_scriptdir}/email/mime/__pycache__ -%{py_scriptdir}/email/architecture.rst -%{py_scriptdir}/email/*.py -%{py_scriptdir}/email/mime/*.py - -%dir %{py_scriptdir}/ensurepip -%{py_scriptdir}/ensurepip/__pycache__ -%{py_scriptdir}/ensurepip/*.py -%{py_scriptdir}/ensurepip/_bundled - -%dir %{py_scriptdir}/html -%{py_scriptdir}/html/*.py -%{py_scriptdir}/html/__pycache__ - -%dir %{py_scriptdir}/http -%{py_scriptdir}/http/__pycache__ -%{py_scriptdir}/http/*.py - -%dir %{py_scriptdir}/idlelib - -%dir %{py_scriptdir}/importlib -%{py_scriptdir}/importlib/__pycache__ -%{py_scriptdir}/importlib/*.py - -%dir %{py_scriptdir}/json -%{py_scriptdir}/json/__pycache__ -%{py_scriptdir}/json/*.py - -%dir %{py_scriptdir}/logging -%{py_scriptdir}/logging/__pycache__ -%{py_scriptdir}/logging/*.py - -%dir %{py_scriptdir}/multiprocessing -%{py_scriptdir}/multiprocessing/__pycache__ -%{py_scriptdir}/multiprocessing/*.py -%dir %{py_scriptdir}/multiprocessing/dummy -%{py_scriptdir}/multiprocessing/dummy/__pycache__ -%{py_scriptdir}/multiprocessing/dummy/*.py - -%{py_scriptdir}/turtledemo - -%dir %{py_scriptdir}/unittest -%{py_scriptdir}/unittest/__pycache__ -%{py_scriptdir}/unittest/*.py - -%dir %{py_scriptdir}/urllib -%{py_scriptdir}/urllib/__pycache__ -%{py_scriptdir}/urllib/*.py - -%dir %{py_scriptdir}/venv -%{py_scriptdir}/venv/__pycache__ -%{py_scriptdir}/venv/*.py -%dir %{py_scriptdir}/venv/scripts -%dir %{py_scriptdir}/venv/scripts/posix -%{py_scriptdir}/venv/scripts/posix/activate -%{py_scriptdir}/venv/scripts/posix/activate.csh -%{py_scriptdir}/venv/scripts/posix/activate.fish - -%dir %{py_scriptdir}/wsgiref -%{py_scriptdir}/wsgiref/__pycache__ -%{py_scriptdir}/wsgiref/*.py - -%dir %{py_scriptdir}/xml -%dir %{py_scriptdir}/xml/dom -%dir %{py_scriptdir}/xml/etree -%dir %{py_scriptdir}/xml/parsers -%dir %{py_scriptdir}/xml/sax -%{py_scriptdir}/xml/__pycache__ -%{py_scriptdir}/xml/dom/__pycache__ -%{py_scriptdir}/xml/etree/__pycache__ -%{py_scriptdir}/xml/parsers/__pycache__ -%{py_scriptdir}/xml/sax/__pycache__ -%{py_scriptdir}/xml/*.py -%{py_scriptdir}/xml/dom/*.py -%{py_scriptdir}/xml/etree/*.py -%{py_scriptdir}/xml/parsers/*.py -%{py_scriptdir}/xml/sax/*.py - -%dir %{py_scriptdir}/xmlrpc -%{py_scriptdir}/xmlrpc/__pycache__ -%{py_scriptdir}/xmlrpc/*.py +%dir %{py_libdir}/plat-* +%{py_libdir}/plat-*/__pycache__ +%{py_libdir}/plat-*/*.py + +%dir %{py_libdir}/asyncio +%{py_libdir}/asyncio/__pycache__ +%{py_libdir}/asyncio/*.py + +%{py_libdir}/concurrent + +%dir %{py_libdir}/ctypes +%dir %{py_libdir}/ctypes/macholib +%{py_libdir}/ctypes/__pycache__ +%{py_libdir}/ctypes/macholib/__pycache__ + +%{py_libdir}/ctypes/*.py +%{py_libdir}/ctypes/macholib/*.py +%doc %{py_libdir}/ctypes/macholib/README.ctypes + +%dir %{py_libdir}/curses +%{py_libdir}/curses/__pycache__ +%{py_libdir}/curses/*.py + +%dir %{py_libdir}/dbm +%{py_libdir}/dbm/__pycache__ +%{py_libdir}/dbm/*.py + +%dir %{py_libdir}/distutils +%dir %{py_libdir}/distutils/command +%doc %{py_libdir}/distutils/README +%{py_libdir}/distutils/__pycache__ +%{py_libdir}/distutils/command/__pycache__ +%{py_libdir}/distutils/*.py +%{py_libdir}/distutils/command/*.py +%{py_libdir}/distutils/command/command_template + +%dir %{py_libdir}/email +%dir %{py_libdir}/email/mime +%{py_libdir}/email/__pycache__ +%{py_libdir}/email/mime/__pycache__ +%{py_libdir}/email/architecture.rst +%{py_libdir}/email/*.py +%{py_libdir}/email/mime/*.py + +%dir %{py_libdir}/ensurepip +%{py_libdir}/ensurepip/__pycache__ +%{py_libdir}/ensurepip/*.py +%{py_libdir}/ensurepip/_bundled + +%dir %{py_libdir}/html +%{py_libdir}/html/*.py +%{py_libdir}/html/__pycache__ + +%dir %{py_libdir}/http +%{py_libdir}/http/__pycache__ +%{py_libdir}/http/*.py + +%dir %{py_libdir}/idlelib + +%dir %{py_libdir}/importlib +%{py_libdir}/importlib/__pycache__ +%{py_libdir}/importlib/*.py + +%dir %{py_libdir}/json +%{py_libdir}/json/__pycache__ +%{py_libdir}/json/*.py + +%dir %{py_libdir}/logging +%{py_libdir}/logging/__pycache__ +%{py_libdir}/logging/*.py + +%dir %{py_libdir}/multiprocessing +%{py_libdir}/multiprocessing/__pycache__ +%{py_libdir}/multiprocessing/*.py +%dir %{py_libdir}/multiprocessing/dummy +%{py_libdir}/multiprocessing/dummy/__pycache__ +%{py_libdir}/multiprocessing/dummy/*.py + +%{py_libdir}/turtledemo + +%dir %{py_libdir}/unittest +%{py_libdir}/unittest/__pycache__ +%{py_libdir}/unittest/*.py + +%dir %{py_libdir}/urllib +%{py_libdir}/urllib/__pycache__ +%{py_libdir}/urllib/*.py + +%dir %{py_libdir}/venv +%{py_libdir}/venv/__pycache__ +%{py_libdir}/venv/*.py +%dir %{py_libdir}/venv/scripts +%dir %{py_libdir}/venv/scripts/posix +%{py_libdir}/venv/scripts/posix/activate +%{py_libdir}/venv/scripts/posix/activate.csh +%{py_libdir}/venv/scripts/posix/activate.fish + +%dir %{py_libdir}/wsgiref +%{py_libdir}/wsgiref/__pycache__ +%{py_libdir}/wsgiref/*.py + +%dir %{py_libdir}/xml +%dir %{py_libdir}/xml/dom +%dir %{py_libdir}/xml/etree +%dir %{py_libdir}/xml/parsers +%dir %{py_libdir}/xml/sax +%{py_libdir}/xml/__pycache__ +%{py_libdir}/xml/dom/__pycache__ +%{py_libdir}/xml/etree/__pycache__ +%{py_libdir}/xml/parsers/__pycache__ +%{py_libdir}/xml/sax/__pycache__ +%{py_libdir}/xml/*.py +%{py_libdir}/xml/dom/*.py +%{py_libdir}/xml/etree/*.py +%{py_libdir}/xml/parsers/*.py +%{py_libdir}/xml/sax/*.py + +%dir %{py_libdir}/xmlrpc +%{py_libdir}/xmlrpc/__pycache__ +%{py_libdir}/xmlrpc/*.py %attr(755,root,root) %{py_dyndir}/_sqlite3.cpython-*.so -%dir %{py_scriptdir}/sqlite3 -%{py_scriptdir}/sqlite3/__pycache__ -%{py_scriptdir}/sqlite3/*.py +%dir %{py_libdir}/sqlite3 +%{py_libdir}/sqlite3/__pycache__ +%{py_libdir}/sqlite3/*.py %files -n pydoc3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/pydoc3 %attr(755,root,root) %{_bindir}/pydoc3.5 -%{py_scriptdir}/pydoc.py -%{py_scriptdir}/__pycache__/pydoc.cpython-*.py[co] -%dir %{py_scriptdir}/pydoc_data -%{py_scriptdir}/pydoc_data/__pycache__ -%{py_scriptdir}/pydoc_data/*.py -%{py_scriptdir}/pydoc_data/*.css +%{py_libdir}/pydoc.py +%{py_libdir}/__pycache__/pydoc.cpython-*.py[co] +%dir %{py_libdir}/pydoc_data +%{py_libdir}/pydoc_data/__pycache__ +%{py_libdir}/pydoc_data/*.py +%{py_libdir}/pydoc_data/*.css %files -n idle3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/idle3 %attr(755,root,root) %{_bindir}/idle3.5 -%dir %{py_scriptdir}/idlelib/Icons -%{py_scriptdir}/idlelib/__pycache__ -%{py_scriptdir}/idlelib/*.py -%doc %{py_scriptdir}/idlelib/*.txt -%doc %{py_scriptdir}/idlelib/ChangeLog -%{py_scriptdir}/idlelib/Icons/* -%{py_scriptdir}/idlelib/*.def +%dir %{py_libdir}/idlelib/Icons +%{py_libdir}/idlelib/__pycache__ +%{py_libdir}/idlelib/*.py +%doc %{py_libdir}/idlelib/*.txt +%doc %{py_libdir}/idlelib/ChangeLog +%{py_libdir}/idlelib/Icons/* +%{py_libdir}/idlelib/*.def %files devel %defattr(644,root,root,755) @@ -1257,28 +1253,28 @@ rm -rf $RPM_BUILD_ROOT /etc/shrc.d/python*-devel* %attr(755,root,root) %{_bindir}/pygettext%{py_ver} %attr(755,root,root) %{_bindir}/pyreindent%{py_ver} -%{py_scriptdir}/pdb.py -%{py_scriptdir}/profile.py -%{py_scriptdir}/pstats.py -%{py_scriptdir}/timeit.py -%{py_scriptdir}/__pycache__/pdb.cpython-*.py[co] -%{py_scriptdir}/__pycache__/profile.cpython-*.py[co] -%{py_scriptdir}/__pycache__/pstats.cpython-*.py[co] -%{py_scriptdir}/__pycache__/timeit.cpython-*.py[co] +%{py_libdir}/pdb.py +%{py_libdir}/profile.py +%{py_libdir}/pstats.py +%{py_libdir}/timeit.py +%{py_libdir}/__pycache__/pdb.cpython-*.py[co] +%{py_libdir}/__pycache__/profile.cpython-*.py[co] +%{py_libdir}/__pycache__/pstats.cpython-*.py[co] +%{py_libdir}/__pycache__/timeit.cpython-*.py[co] %files 2to3 %attr(755,root,root) %{_bindir}/2to3-%{py_ver} -%dir %{py_scriptdir}/lib2to3 -%{py_scriptdir}/lib2to3/__pycache__ -%{py_scriptdir}/lib2to3/*.txt -%{py_scriptdir}/lib2to3/*.pickle -%{py_scriptdir}/lib2to3/*.py -%dir %{py_scriptdir}/lib2to3/fixes -%{py_scriptdir}/lib2to3/fixes/__pycache__ -%{py_scriptdir}/lib2to3/fixes/*.py -%dir %{py_scriptdir}/lib2to3/pgen2 -%{py_scriptdir}/lib2to3/pgen2/__pycache__ -%{py_scriptdir}/lib2to3/pgen2/*.py +%dir %{py_libdir}/lib2to3 +%{py_libdir}/lib2to3/__pycache__ +%{py_libdir}/lib2to3/*.txt +%{py_libdir}/lib2to3/*.pickle +%{py_libdir}/lib2to3/*.py +%dir %{py_libdir}/lib2to3/fixes +%{py_libdir}/lib2to3/fixes/__pycache__ +%{py_libdir}/lib2to3/fixes/*.py +%dir %{py_libdir}/lib2to3/pgen2 +%{py_libdir}/lib2to3/pgen2/__pycache__ +%{py_libdir}/lib2to3/pgen2/*.py %files static %defattr(644,root,root,755) @@ -1289,14 +1285,14 @@ rm -rf $RPM_BUILD_ROOT %{_examplesdir}/%{name}-%{version} %files test -%{py_scriptdir}/idlelib/idle_test -%{py_scriptdir}/test -%{py_scriptdir}/ctypes/test -%{py_scriptdir}/distutils/tests -%{py_scriptdir}/lib2to3/tests -%{py_scriptdir}/sqlite3/test -%{py_scriptdir}/tkinter/test -%{py_scriptdir}/unittest/test +%{py_libdir}/idlelib/idle_test +%{py_libdir}/test +%{py_libdir}/ctypes/test +%{py_libdir}/distutils/tests +%{py_libdir}/lib2to3/tests +%{py_libdir}/sqlite3/test +%{py_libdir}/tkinter/test +%{py_libdir}/unittest/test %if %{with info} %files doc-info @@ -1307,8 +1303,8 @@ rm -rf $RPM_BUILD_ROOT %if %{with tkinter} %files tkinter %defattr(644,root,root,755) -%dir %{py_scriptdir}/tkinter -%{py_scriptdir}/tkinter/__pycache__ -%{py_scriptdir}/tkinter/*.py +%dir %{py_libdir}/tkinter +%{py_libdir}/tkinter/__pycache__ +%{py_libdir}/tkinter/*.py %attr(755,root,root) %{py_dyndir}/_tkinter.cpython-*.so %endif From 595077ba8eae216947807a50d9c89739b428ab9e Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Tue, 1 Dec 2015 18:47:30 +0100 Subject: [PATCH 034/180] sys.prefix as default install prefix if not /usr virtualenv expects sys.prefix change to affect distutils default installation prefix. --- python3-install_prefix.patch | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python3-install_prefix.patch b/python3-install_prefix.patch index 1b5a45c..a643c08 100644 --- a/python3-install_prefix.patch +++ b/python3-install_prefix.patch @@ -23,14 +23,16 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py --- Python-3.5.0.orig/Lib/distutils/sysconfig.py 2015-11-25 17:54:32.000000000 +0100 +++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-11-25 18:03:39.338573134 +0100 -@@ -17,8 +17,8 @@ +@@ -17,8 +17,12 @@ from .errors import DistutilsPlatformError # These are needed in a couple of spots, so just compute them once. --PREFIX = os.path.normpath(sys.prefix) --EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+PREFIX = "/usr/local" -+EXEC_PREFIX = PREFIX + PREFIX = os.path.normpath(sys.prefix) + EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++if PREFIX == "/usr": ++ PREFIX = "/usr/local" ++if EXEC_PREFIX == "/usr": ++ EXEC_PREFIX = "/usr/local" BASE_PREFIX = os.path.normpath(sys.base_prefix) BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) From d71cea9f76b2bc470dfaf5bfb24d2fa00f45b5f8 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Tue, 1 Dec 2015 18:50:07 +0100 Subject: [PATCH 035/180] Release: 6 --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 47e6c0d..0cd9445 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 5 +Release: 6 Epoch: 1 License: PSF Group: Applications From ea93f05f440c8c9451c8d1983ea41def2ac397de Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Wed, 2 Dec 2015 20:50:17 +0100 Subject: [PATCH 036/180] Do not use $prefix/share in default install scheme The directory for platform-independent code will be provided by our %py_install macro. Also: python3-lib64.patch and python3-noarch_to_datadir.patch merged into single python3-multilib.patch. --- python3-lib64.patch => python3-multilib.patch | 262 ++++++++++-------- python3-noarch_to_datadir.patch | 71 ----- python3.spec | 18 +- 3 files changed, 155 insertions(+), 196 deletions(-) rename python3-lib64.patch => python3-multilib.patch (62%) delete mode 100644 python3-noarch_to_datadir.patch diff --git a/python3-lib64.patch b/python3-multilib.patch similarity index 62% rename from python3-lib64.patch rename to python3-multilib.patch index ba72b16..bea8dcf 100644 --- a/python3-lib64.patch +++ b/python3-multilib.patch @@ -1,54 +1,7 @@ ---- Python-3.3.1/configure.ac.orig 2013-04-18 16:31:07.244030129 +0200 -+++ Python-3.3.1/configure.ac 2013-04-18 17:30:31.800622500 +0200 -@@ -769,6 +769,45 @@ - MULTIARCH=$($CC --print-multiarch 2>/dev/null) - AC_SUBST(MULTIARCH) - -+AC_SUBST(ARCH) -+AC_MSG_CHECKING(ARCH) -+ARCH=`uname -m` -+case $ARCH in -+i?86) ARCH=i386;; -+esac -+AC_MSG_RESULT($ARCH) -+ -+AC_SUBST(LIB) -+AC_MSG_CHECKING(LIB) -+case $ac_sys_system in -+Linux*) -+ # Test if the compiler is 64bit -+ echo 'int i;' > conftest.$ac_ext -+ python_cv_cc_64bit_output=no -+ if AC_TRY_EVAL(ac_compile); then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *"ELF 64"*) -+ python_cv_cc_64bit_output=yes -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+esac -+ -+case $ARCH:$python_cv_cc_64bit_output in -+powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) -+ LIB="lib64" -+ ;; -+x86_64:no) -+ LIB="libx32" -+ ;; -+*:*) -+ LIB="lib" -+ ;; -+esac -+AC_MSG_RESULT($LIB) -+ - - AC_SUBST(LIBRARY) - AC_MSG_CHECKING(LIBRARY) ---- Python-3.5.0/Include/pylifecycle.h~ 2015-09-13 13:41:20.000000000 +0200 -+++ Python-3.5.0/Include/pylifecycle.h 2015-09-13 20:08:24.017308537 +0200 -@@ -65,6 +65,8 @@ int _Py_CheckPython3(); +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Include/pylifecycle.h Python-3.5.0/Include/pylifecycle.h +--- Python-3.5.0.orig/Include/pylifecycle.h 2015-09-13 13:41:20.000000000 +0200 ++++ Python-3.5.0/Include/pylifecycle.h 2015-12-02 20:26:50.853793088 +0100 +@@ -65,6 +65,8 @@ /* In their own files */ PyAPI_FUNC(const char *) Py_GetVersion(void); PyAPI_FUNC(const char *) Py_GetPlatform(void); @@ -57,9 +10,10 @@ PyAPI_FUNC(const char *) Py_GetCopyright(void); PyAPI_FUNC(const char *) Py_GetCompiler(void); PyAPI_FUNC(const char *) Py_GetBuildInfo(void); ---- Python-3.2.1.orig/Lib/distutils/command/install.py 2011-07-09 07:58:46.000000000 +0100 -+++ Python-3.2.1/Lib/distutils/command/install.py 2011-07-12 22:20:12.000000000 +0100 -@@ -19,6 +19,8 @@ from site import USER_BASE +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py +--- Python-3.5.0.orig/Lib/distutils/command/install.py 2015-09-13 13:41:20.000000000 +0200 ++++ Python-3.5.0/Lib/distutils/command/install.py 2015-12-02 20:27:40.150761675 +0100 +@@ -19,6 +19,8 @@ from site import USER_SITE HAS_USER_SITE = True @@ -68,27 +22,31 @@ WINDOWS_SCHEME = { 'purelib': '$base/Lib/site-packages', 'platlib': '$base/Lib/site-packages', -@@ -47,14 +49,14 @@ +@@ -29,15 +31,15 @@ + INSTALL_SCHEMES = { 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', +- 'purelib': '$base/lib/python$py_version_short/site-packages', - 'platlib': '$platbase/lib/python$py_version_short/site-packages', ++ 'purelib': '$base/'+libname+'/python$py_version_short/site-packages', + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', 'scripts': '$base/bin', 'data' : '$base', }, 'unix_home': { - 'purelib': '$base/lib/python', +- 'purelib': '$base/lib/python', - 'platlib': '$base/lib/python', ++ 'purelib': '$base/'+libname+'/python', + 'platlib': '$base/'+libname+'/python', 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', 'data' : '$base', ---- Python-3.2.1.orig/Lib/distutils/sysconfig.py 2011-07-09 07:58:47.000000000 +0100 -+++ Python-3.2.1/Lib/distutils/sysconfig.py 2011-07-12 22:20:12.000000000 +0100 -@@ -124,8 +124,12 @@ - prefix = plat_specific and EXEC_PREFIX or PREFIX +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py +--- Python-3.5.0.orig/Lib/distutils/sysconfig.py 2015-09-13 13:41:21.000000000 +0200 ++++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-12-02 20:26:50.853793088 +0100 +@@ -132,8 +132,12 @@ + prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": + if plat_specific: @@ -101,22 +59,22 @@ if standard_lib: return libpython else: ---- Python-3.2.1.orig/Lib/distutils/tests/test_install.py 2011-07-09 07:58:47.000000000 +0100 -+++ Python-3.2.1/Lib/distutils/tests/test_install.py 2011-07-12 22:20:12.000000000 +0100 -@@ -49,8 +49,9 @@ +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib/distutils/tests/test_install.py +--- Python-3.5.0.orig/Lib/distutils/tests/test_install.py 2015-09-13 13:41:21.000000000 +0200 ++++ Python-3.5.0/Lib/distutils/tests/test_install.py 2015-12-02 20:26:50.853793088 +0100 +@@ -55,7 +55,7 @@ + expected = os.path.normpath(expected) self.assertEqual(got, expected) - libdir = os.path.join(destination, "lib", "python") -+ platlibdir = os.path.join(destination, sys.lib, "python") +- libdir = os.path.join(destination, "lib", "python") ++ libdir = os.path.join(destination, sys.lib, "python") check_path(cmd.install_lib, libdir) -- check_path(cmd.install_platlib, libdir) -+ check_path(cmd.install_platlib, platlibdir) + check_path(cmd.install_platlib, libdir) check_path(cmd.install_purelib, libdir) - check_path(cmd.install_headers, - os.path.join(destination, "include", "python", "foopkg")) ---- Python-3.2.1.orig/Lib/site.py 2011-07-09 07:58:49.000000000 +0100 -+++ Python-3.2.1/Lib/site.py 2011-07-12 22:20:12.000000000 +0100 -@@ -304,12 +304,15 @@ def getsitepackages(prefixes=None): +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py +--- Python-3.5.0.orig/Lib/site.py 2015-09-13 13:41:21.000000000 +0200 ++++ Python-3.5.0/Lib/site.py 2015-12-02 20:28:51.431199018 +0100 +@@ -303,12 +303,16 @@ seen.add(prefix) if os.sep == '/': @@ -127,6 +85,7 @@ + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) + if sys.lib != 'lib': + sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) ++ sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) else: sitepackages.append(prefix) - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) @@ -134,48 +93,52 @@ if sys.platform == "darwin": # for framework builds *only* we add the standard Apple # locations. ---- Python-3.2.1.orig/Lib/sysconfig.py 2011-07-09 07:58:49.000000000 +0100 -+++ Python-3.2.1/Lib/sysconfig.py 2011-07-12 22:20:12.000000000 +0100 -@@ -21,10 +21,10 @@ +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py +--- Python-3.5.0.orig/Lib/sysconfig.py 2015-09-13 13:41:21.000000000 +0200 ++++ Python-3.5.0/Lib/sysconfig.py 2015-12-02 20:26:50.853793088 +0100 +@@ -20,10 +20,10 @@ _INSTALL_SCHEMES = { 'posix_prefix': { - 'stdlib': '{installed_base}/lib/python{py_version_short}', - 'platstdlib': '{platbase}/lib/python{py_version_short}', +- 'purelib': '{base}/lib/python{py_version_short}/site-packages', +- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', + 'stdlib': '{installed_base}/' + sys.lib + '/python{py_version_short}', + 'platstdlib': '{platbase}/' + sys.lib + '/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', ++ 'purelib': '{base}/' + sys.lib + '/python{py_version_short}/site-packages', + 'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages', 'include': '{installed_base}/include/python{py_version_short}{abiflags}', 'platinclude': -@@ -33,10 +33,10 @@ +@@ -32,10 +32,10 @@ 'data': '{base}', }, 'posix_home': { - 'stdlib': '{installed_base}/lib/python', - 'platstdlib': '{base}/lib/python', +- 'purelib': '{base}/lib/python', +- 'platlib': '{base}/lib/python', + 'stdlib': '{installed_base}/' + sys.lib + '/python', + 'platstdlib': '{base}/' + sys.lib + '/python', - 'purelib': '{base}/lib/python', -- 'platlib': '{base}/lib/python', ++ 'purelib': '{base}/' + sys.lib + '/python', + 'platlib': '{base}/' + sys.lib + '/python', 'include': '{installed_base}/include/python', 'platinclude': '{installed_base}/include/python', 'scripts': '{base}/bin', ---- Python-3.2.1.orig/Makefile.pre.in 2011-07-09 07:58:52.000000000 +0100 -+++ Python-3.2.1/Makefile.pre.in 2011-07-12 22:20:12.000000000 +0100 -@@ -90,6 +90,8 @@ +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +--- Python-3.5.0.orig/Makefile.pre.in 2015-09-13 13:41:23.000000000 +0200 ++++ Python-3.5.0/Makefile.pre.in 2015-12-02 20:28:51.434532372 +0100 +@@ -101,6 +101,8 @@ # Machine-dependent subdirectories MACHDEP= @MACHDEP@ +LIB= @LIB@ +ARCH= @ARCH@ - # Install prefix for architecture-independent files - prefix= @prefix@ -@@ -106,7 +108,7 @@ + # Multiarch directory (may be empty) + MULTIARCH= @MULTIARCH@ +@@ -120,7 +122,7 @@ MANDIR= @mandir@ INCLUDEDIR= @includedir@ CONFINCLUDEDIR= $(exec_prefix)/include @@ -184,7 +147,7 @@ ABIFLAGS= @ABIFLAGS@ # Detailed destination directories -@@ -611,7 +613,7 @@ +@@ -796,7 +798,7 @@ Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) Python/getplatform.o: $(srcdir)/Python/getplatform.c @@ -193,9 +156,21 @@ Python/importdl.o: $(srcdir)/Python/importdl.c $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c ---- Python-3.2.1.orig/Modules/getpath.c 2011-07-09 07:58:54.000000000 +0100 -+++ Python-3.2.1/Modules/getpath.c 2011-07-12 22:21:48.000000000 +0100 -@@ -121,9 +121,21 @@ +@@ -1362,8 +1364,8 @@ + if test "$(SHLIB_SUFFIX)" = .dll; then \ + $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ + else \ +- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ +- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ ++ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ ++ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ + fi; \ + else \ + echo Skip install of $(LIBRARY) - use make frameworkinstall; \ +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +--- Python-3.5.0.orig/Modules/getpath.c 2015-09-13 13:41:24.000000000 +0200 ++++ Python-3.5.0/Modules/getpath.c 2015-12-02 20:26:50.857126441 +0100 +@@ -117,9 +117,21 @@ #define EXEC_PREFIX PREFIX #endif @@ -219,7 +194,7 @@ #endif #ifndef LANDMARK -@@ -502,7 +514,7 @@ calculate_path(void) +@@ -511,7 +523,7 @@ _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); _prefix = Py_DecodeLocale(PREFIX, NULL); _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); @@ -228,8 +203,18 @@ if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { Py_FatalError( ---- Python-3.2.1.orig/Python/getplatform.c 2011-07-09 07:58:56.000000000 +0100 -+++ Python-3.2.1/Python/getplatform.c 2011-07-12 22:20:12.000000000 +0100 +@@ -700,7 +712,7 @@ + } + else + wcsncpy(zip_path, _prefix, MAXPATHLEN); +- joinpath(zip_path, L"lib/python00.zip"); ++ joinpath(zip_path, L"" LIB_PYTHON "00.zip"); + bufsz = wcslen(zip_path); /* Replace "00" with version */ + zip_path[bufsz - 6] = VERSION[0]; + zip_path[bufsz - 5] = VERSION[2]; +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Python/getplatform.c Python-3.5.0/Python/getplatform.c +--- Python-3.5.0.orig/Python/getplatform.c 2015-09-13 13:41:26.000000000 +0200 ++++ Python-3.5.0/Python/getplatform.c 2015-12-02 20:26:50.857126441 +0100 @@ -10,3 +10,23 @@ { return PLATFORM; @@ -254,9 +239,10 @@ +{ + return LIB; +} ---- Python-3.2.1.orig/Python/sysmodule.c 2011-07-09 07:58:56.000000000 +0100 -+++ Python-3.2.1/Python/sysmodule.c 2011-07-12 22:20:12.000000000 +0100 -@@ -1560,6 +1560,10 @@ +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c +--- Python-3.5.0.orig/Python/sysmodule.c 2015-09-13 13:41:26.000000000 +0200 ++++ Python-3.5.0/Python/sysmodule.c 2015-12-02 20:26:50.857126441 +0100 +@@ -1767,6 +1767,10 @@ PyUnicode_FromString(Py_GetCopyright())); SET_SYS_FROM_STRING("platform", PyUnicode_FromString(Py_GetPlatform())); @@ -267,9 +253,68 @@ SET_SYS_FROM_STRING("executable", PyUnicode_FromWideChar( Py_GetProgramFullPath(), -1)); ---- Python-3.2.1.orig/setup.py 2011-07-09 07:58:56.000000000 +0100 -+++ Python-3.2.1/setup.py 2011-07-12 22:20:12.000000000 +0100 -@@ -516,8 +516,7 @@ +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0.orig/configure.ac 2015-12-02 20:26:33.157018154 +0100 ++++ Python-3.5.0/configure.ac 2015-12-02 20:28:51.431199018 +0100 +@@ -722,6 +722,45 @@ + ]) + fi + ++AC_SUBST(ARCH) ++AC_MSG_CHECKING(ARCH) ++ARCH=`uname -m` ++case $ARCH in ++i?86) ARCH=i386;; ++esac ++AC_MSG_RESULT($ARCH) ++ ++AC_SUBST(LIB) ++AC_MSG_CHECKING(LIB) ++case $ac_sys_system in ++Linux*) ++ # Test if the compiler is 64bit ++ echo 'int i;' > conftest.$ac_ext ++ python_cv_cc_64bit_output=no ++ if AC_TRY_EVAL(ac_compile); then ++ case `/usr/bin/file conftest.$ac_objext` in ++ *"ELF 64"*) ++ python_cv_cc_64bit_output=yes ++ ;; ++ esac ++ fi ++ rm -rf conftest* ++ ;; ++esac ++ ++case $ARCH:$python_cv_cc_64bit_output in ++powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) ++ LIB="lib64" ++ ;; ++x86_64:no) ++ LIB="libx32" ++ ;; ++*:*) ++ LIB="lib" ++ ;; ++esac ++AC_MSG_RESULT($LIB) ++ + + MULTIARCH=$($CC --print-multiarch 2>/dev/null) + AC_SUBST(MULTIARCH) +@@ -4331,7 +4370,7 @@ + + dnl define LIBPL after ABIFLAGS and LDVERSION is defined. + AC_SUBST(PY_ENABLE_SHARED) +-LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" ++LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}" + AC_SUBST(LIBPL) + + # Check whether right shifting a negative integer extends the sign bit +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/setup.py Python-3.5.0/setup.py +--- Python-3.5.0.orig/setup.py 2015-09-13 13:41:26.000000000 +0200 ++++ Python-3.5.0/setup.py 2015-12-02 20:26:50.857126441 +0100 +@@ -526,8 +526,7 @@ # be assumed that no additional -I,-L directives are needed. if not cross_compiling: lib_dirs = self.compiler.library_dirs + [ @@ -278,8 +323,8 @@ + '/' + sys.lib, '/usr/' + sys.lib ] inc_dirs = self.compiler.include_dirs + ['/usr/include'] - exts = [] -@@ -643,11 +642,11 @@ + else: +@@ -750,11 +749,11 @@ elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(lib_dirs + @@ -293,16 +338,3 @@ extra_link_args=readline_extra_link_args, libraries=readline_libs) ) else: -diff -dur Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c ---- Python-3.2.1.orig/Modules/getpath.c 2011-07-15 20:16:35.536224442 +0200 -+++ Python-3.2.1/Modules/getpath.c 2011-07-15 20:17:09.137738543 +0200 -@@ -691,7 +692,7 @@ - } - else - wcsncpy(zip_path, _prefix, MAXPATHLEN); -- joinpath(zip_path, L"lib/python00.zip"); -+ joinpath(zip_path, L"" LIB_PYTHON "00.zip"); - bufsz = wcslen(zip_path); /* Replace "00" with version */ - zip_path[bufsz - 6] = VERSION[0]; - zip_path[bufsz - 5] = VERSION[2]; - diff --git a/python3-noarch_to_datadir.patch b/python3-noarch_to_datadir.patch deleted file mode 100644 index b0352b2..0000000 --- a/python3-noarch_to_datadir.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -dur Python-3.2.1.orig/Lib/distutils/command/install.py Python-3.2.1/Lib/distutils/command/install.py ---- Python-3.2.1.orig/Lib/distutils/command/install.py 2011-07-15 20:16:35.526223992 +0200 -+++ Python-3.2.1/Lib/distutils/command/install.py 2011-07-15 20:17:09.131071575 +0200 -@@ -48,14 +48,14 @@ - - INSTALL_SCHEMES = { - 'unix_prefix': { -- 'purelib': '$base/lib/python$py_version_short/site-packages', -+ 'purelib': '$base/share/python$py_version_short/site-packages', - 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'unix_home': { -- 'purelib': '$base/lib/python', -+ 'purelib': '$base/share/python', - 'platlib': '$base/'+libname+'/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', -diff -dur Python-3.2.1.orig/Lib/site.py Python-3.2.1/Lib/site.py ---- Python-3.2.1.orig/Lib/site.py 2011-07-15 20:16:35.529557475 +0200 -+++ Python-3.2.1/Lib/site.py 2011-07-15 20:17:09.134405059 +0200 -@@ -289,8 +289,9 @@ - "python" + sys.version[:3], - "site-packages")) - sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) - if sys.lib != 'lib': - sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) -+ sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) - else: - sitepackages.append(prefix) - sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) -diff -dur Python-3.2.1.orig/Lib/sysconfig.py Python-3.2.1/Lib/sysconfig.py ---- Python-3.2.1.orig/Lib/sysconfig.py 2011-07-15 20:16:35.532890958 +0200 -+++ Python-3.2.1/Lib/sysconfig.py 2011-07-15 20:18:27.267925241 +0200 -@@ -23,7 +23,7 @@ - 'posix_prefix': { - 'stdlib': '{base}/' + sys.lib + '/python{py_version_short}', - 'platstdlib': '{platbase}/' + sys.lib + '/python{py_version_short}', -- 'purelib': '{base}/lib/python{py_version_short}/site-packages', -+ 'purelib': '{base}/share/python{py_version_short}/site-packages', - 'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages', - 'include': - '{base}/include/python{py_version_short}{abiflags}', ---- Python-3.5.0/configure.ac~ 2015-09-13 20:18:04.000000000 +0200 -+++ Python-3.5.0/configure.ac 2015-09-13 20:21:35.887422670 +0200 -@@ -4370,7 +4370,7 @@ AC_MSG_RESULT($LDVERSION) - - dnl define LIBPL after ABIFLAGS and LDVERSION is defined. - AC_SUBST(PY_ENABLE_SHARED) --LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" -+LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}" - AC_SUBST(LIBPL) - - # Check whether right shifting a negative integer extends the sign bit -diff -dur Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in ---- Python-3.2.1.orig/Makefile.pre.in 2011-07-15 20:16:35.532890958 +0200 -+++ Python-3.2.1/Makefile.pre.in 2011-07-15 20:17:09.134405059 +0200 -@@ -1065,8 +1065,8 @@ - if test "$(SO)" = .dll; then \ - $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ - else \ -- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ -- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ -+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ -+ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ - fi; \ - else \ - echo Skip install of $(LIBRARY) - use make frameworkinstall; \ - diff --git a/python3.spec b/python3.spec index 0cd9445..946a4cf 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 6 +Release: 6.1 Epoch: 1 License: PSF Group: Applications @@ -42,14 +42,13 @@ Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz # Source0-md5: d149d2812f10cbe04c042232e7964171 Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch -Patch2: %{name}-lib64.patch -Patch3: %{name}-noarch_to_datadir.patch -Patch4: %{name}-no_cmdline_tests.patch -Patch5: %{name}-makefile-location.patch -Patch6: python3-atomic.patch -Patch7: python-distro.patch -Patch8: %{name}-db.patch -Patch9: %{name}-install_prefix.patch +Patch2: %{name}-multilib.patch +Patch3: %{name}-no_cmdline_tests.patch +Patch4: %{name}-makefile-location.patch +Patch5: python3-atomic.patch +Patch6: python-distro.patch +Patch7: %{name}-db.patch +Patch8: %{name}-install_prefix.patch URL: http://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -473,7 +472,6 @@ Moduły testowe dla Pythona. %patch6 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat From a033b4154f0e04badcfa36dad0b431798f531aa3 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Wed, 2 Dec 2015 21:20:30 +0100 Subject: [PATCH 037/180] Platform independent pyconfig.h /usr/include/python3.X/pyconfig.h will include %{_libdir}/python3.X/config-%{py_abi}/pyconfig.h Should allow multilib python-libs installation. --- pyconfig.h.in | 11 ++++++++ python3-multilib.patch | 63 +++++++++++++++++++++++++----------------- python3.spec | 7 ++++- 3 files changed, 55 insertions(+), 26 deletions(-) create mode 100644 pyconfig.h.in diff --git a/pyconfig.h.in b/pyconfig.h.in new file mode 100644 index 0000000..0107653 --- /dev/null +++ b/pyconfig.h.in @@ -0,0 +1,11 @@ +#ifndef Py_PYCONFIG_H +#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) +#if defined(__ILP32__) +#include "@PREFIX@/libx32/python@PY_VER@/config-@PY_ABI@/pyconfig.h" +#else +#include "@PREFIX@/lib64/python@PY_VER@/config-@PY_ABI@/pyconfig.h" +#endif +#else +#include "@PREFIX@/lib/python@PY_VER@/config-@PY_ABI@/pyconfig.h" +#endif +#endif diff --git a/python3-multilib.patch b/python3-multilib.patch index bea8dcf..9bd51a4 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -1,6 +1,6 @@ -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Include/pylifecycle.h Python-3.5.0/Include/pylifecycle.h +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Include/pylifecycle.h Python-3.5.0/Include/pylifecycle.h --- Python-3.5.0.orig/Include/pylifecycle.h 2015-09-13 13:41:20.000000000 +0200 -+++ Python-3.5.0/Include/pylifecycle.h 2015-12-02 20:26:50.853793088 +0100 ++++ Python-3.5.0/Include/pylifecycle.h 2015-12-02 20:55:26.865642310 +0100 @@ -65,6 +65,8 @@ /* In their own files */ PyAPI_FUNC(const char *) Py_GetVersion(void); @@ -10,9 +10,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Include/pylifecycle.h Python-3.5 PyAPI_FUNC(const char *) Py_GetCopyright(void); PyAPI_FUNC(const char *) Py_GetCompiler(void); PyAPI_FUNC(const char *) Py_GetBuildInfo(void); -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py --- Python-3.5.0.orig/Lib/distutils/command/install.py 2015-09-13 13:41:20.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/command/install.py 2015-12-02 20:27:40.150761675 +0100 ++++ Python-3.5.0/Lib/distutils/command/install.py 2015-12-02 20:55:26.865642310 +0100 @@ -19,6 +19,8 @@ from site import USER_SITE HAS_USER_SITE = True @@ -42,9 +42,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', 'data' : '$base', -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py --- Python-3.5.0.orig/Lib/distutils/sysconfig.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-12-02 20:26:50.853793088 +0100 ++++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-12-02 20:55:26.868975666 +0100 @@ -132,8 +132,12 @@ prefix = plat_specific and EXEC_PREFIX or PREFIX @@ -59,9 +59,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Pytho if standard_lib: return libpython else: -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib/distutils/tests/test_install.py +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib/distutils/tests/test_install.py --- Python-3.5.0.orig/Lib/distutils/tests/test_install.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/tests/test_install.py 2015-12-02 20:26:50.853793088 +0100 ++++ Python-3.5.0/Lib/distutils/tests/test_install.py 2015-12-02 20:55:26.868975666 +0100 @@ -55,7 +55,7 @@ expected = os.path.normpath(expected) self.assertEqual(got, expected) @@ -71,9 +71,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/tests/test_install check_path(cmd.install_lib, libdir) check_path(cmd.install_platlib, libdir) check_path(cmd.install_purelib, libdir) -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py --- Python-3.5.0.orig/Lib/site.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/site.py 2015-12-02 20:28:51.431199018 +0100 ++++ Python-3.5.0/Lib/site.py 2015-12-02 20:55:26.868975666 +0100 @@ -303,12 +303,16 @@ seen.add(prefix) @@ -93,9 +93,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/sit if sys.platform == "darwin": # for framework builds *only* we add the standard Apple # locations. -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py --- Python-3.5.0.orig/Lib/sysconfig.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/sysconfig.py 2015-12-02 20:26:50.853793088 +0100 ++++ Python-3.5.0/Lib/sysconfig.py 2015-12-02 20:56:37.266116742 +0100 @@ -20,10 +20,10 @@ _INSTALL_SCHEMES = { @@ -126,9 +126,22 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Li 'include': '{installed_base}/include/python', 'platinclude': '{installed_base}/include/python', 'scripts': '{base}/bin', -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +@@ -459,7 +459,11 @@ + else: + inc_dir = _sys_home or _PROJECT_BASE + else: +- inc_dir = get_path('platinclude') ++ if hasattr(sys, 'abiflags'): ++ config_dir_name = 'config-%s%s' % (_PY_VERSION_SHORT, sys.abiflags) ++ else: ++ config_dir_name = 'config' ++ inc_dir = os.path.join(get_path('stdlib'), config_dir_name) + return os.path.join(inc_dir, 'pyconfig.h') + + +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in --- Python-3.5.0.orig/Makefile.pre.in 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Makefile.pre.in 2015-12-02 20:28:51.434532372 +0100 ++++ Python-3.5.0/Makefile.pre.in 2015-12-02 20:55:26.868975666 +0100 @@ -101,6 +101,8 @@ # Machine-dependent subdirectories @@ -167,9 +180,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Mak fi; \ else \ echo Skip install of $(LIBRARY) - use make frameworkinstall; \ -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c --- Python-3.5.0.orig/Modules/getpath.c 2015-09-13 13:41:24.000000000 +0200 -+++ Python-3.5.0/Modules/getpath.c 2015-12-02 20:26:50.857126441 +0100 ++++ Python-3.5.0/Modules/getpath.c 2015-12-02 20:55:26.868975666 +0100 @@ -117,9 +117,21 @@ #define EXEC_PREFIX PREFIX #endif @@ -212,9 +225,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/M bufsz = wcslen(zip_path); /* Replace "00" with version */ zip_path[bufsz - 6] = VERSION[0]; zip_path[bufsz - 5] = VERSION[2]; -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Python/getplatform.c Python-3.5.0/Python/getplatform.c +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Python/getplatform.c Python-3.5.0/Python/getplatform.c --- Python-3.5.0.orig/Python/getplatform.c 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/Python/getplatform.c 2015-12-02 20:26:50.857126441 +0100 ++++ Python-3.5.0/Python/getplatform.c 2015-12-02 20:55:26.868975666 +0100 @@ -10,3 +10,23 @@ { return PLATFORM; @@ -239,9 +252,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Python/getplatform.c Python-3.5. +{ + return LIB; +} -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c --- Python-3.5.0.orig/Python/sysmodule.c 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/Python/sysmodule.c 2015-12-02 20:26:50.857126441 +0100 ++++ Python-3.5.0/Python/sysmodule.c 2015-12-02 20:55:26.868975666 +0100 @@ -1767,6 +1767,10 @@ PyUnicode_FromString(Py_GetCopyright())); SET_SYS_FROM_STRING("platform", @@ -253,9 +266,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0/ SET_SYS_FROM_STRING("executable", PyUnicode_FromWideChar( Py_GetProgramFullPath(), -1)); -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac ---- Python-3.5.0.orig/configure.ac 2015-12-02 20:26:33.157018154 +0100 -+++ Python-3.5.0/configure.ac 2015-12-02 20:28:51.431199018 +0100 +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0.orig/configure.ac 2015-12-02 20:54:45.102025846 +0100 ++++ Python-3.5.0/configure.ac 2015-12-02 20:55:26.868975666 +0100 @@ -722,6 +722,45 @@ ]) fi @@ -311,9 +324,9 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/configure.ac Python-3.5.0/config AC_SUBST(LIBPL) # Check whether right shifting a negative integer extends the sign bit -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/setup.py Python-3.5.0/setup.py +diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/setup.py Python-3.5.0/setup.py --- Python-3.5.0.orig/setup.py 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/setup.py 2015-12-02 20:26:50.857126441 +0100 ++++ Python-3.5.0/setup.py 2015-12-02 20:55:26.872309022 +0100 @@ -526,8 +526,7 @@ # be assumed that no additional -I,-L directives are needed. if not cross_compiling: diff --git a/python3.spec b/python3.spec index 946a4cf..686c8ce 100644 --- a/python3.spec +++ b/python3.spec @@ -34,12 +34,13 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 6.1 +Release: 6.2 Epoch: 1 License: PSF Group: Applications Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz # Source0-md5: d149d2812f10cbe04c042232e7964171 +Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-multilib.patch @@ -620,6 +621,9 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve # already in %%doc %{__rm} $RPM_BUILD_ROOT%{py_libdir}/LICENSE.txt +mv $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_abi}/pyconfig.h +sed -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_abi}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h + %clean rm -rf $RPM_BUILD_ROOT @@ -731,6 +735,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/config-%{py_abi}/Setup %{py_libdir}/config-%{py_abi}/Setup.config %{py_libdir}/config-%{py_abi}/Setup.local +%{py_libdir}/config-%{py_abi}/pyconfig.h %files modules %defattr(644,root,root,755) From e0b2c81117672beb58ed3a74aef92e3c7b0ffb91 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Wed, 2 Dec 2015 21:21:47 +0100 Subject: [PATCH 038/180] Package compiled py-config.py Those files would be generated anyway the first time root imports this module for whatever reason. --- python3.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python3.spec b/python3.spec index 686c8ce..09d439c 100644 --- a/python3.spec +++ b/python3.spec @@ -1247,6 +1247,8 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/config-%{py_abi}/config.c.in %{py_libdir}/config-%{py_abi}/python.o %{py_libdir}/config-%{py_abi}/python-config.py +%dir %{py_libdir}/config-%{py_abi}/__pycache__ +%{py_libdir}/config-%{py_abi}/__pycache__/python-config.* %{_pkgconfigdir}/python-%{py_ver}.pc %{_pkgconfigdir}/python-%{py_abi}.pc %{_pkgconfigdir}/python3.pc From c7fcbc4e0d06ff058fb1d0ee497f01ecd5a40a5a Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Thu, 3 Dec 2015 17:33:39 +0100 Subject: [PATCH 039/180] fix 'test_user_similar' fail fixes: > FAIL: test_user_similar (test.test_sysconfig.TestSysConfig) --- python3-multilib.patch | 65 ++++++++++++++++++++++++++---------------- python3.spec | 2 +- 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/python3-multilib.patch b/python3-multilib.patch index 9bd51a4..30e0e94 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -1,6 +1,6 @@ -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Include/pylifecycle.h Python-3.5.0/Include/pylifecycle.h +diff -dur Python-3.5.0.orig/Include/pylifecycle.h Python-3.5.0/Include/pylifecycle.h --- Python-3.5.0.orig/Include/pylifecycle.h 2015-09-13 13:41:20.000000000 +0200 -+++ Python-3.5.0/Include/pylifecycle.h 2015-12-02 20:55:26.865642310 +0100 ++++ Python-3.5.0/Include/pylifecycle.h 2015-12-03 17:31:03.874280444 +0100 @@ -65,6 +65,8 @@ /* In their own files */ PyAPI_FUNC(const char *) Py_GetVersion(void); @@ -10,9 +10,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Include/pylifecycle.h Python-3. PyAPI_FUNC(const char *) Py_GetCopyright(void); PyAPI_FUNC(const char *) Py_GetCompiler(void); PyAPI_FUNC(const char *) Py_GetBuildInfo(void); -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py +diff -dur Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py --- Python-3.5.0.orig/Lib/distutils/command/install.py 2015-09-13 13:41:20.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/command/install.py 2015-12-02 20:55:26.865642310 +0100 ++++ Python-3.5.0/Lib/distutils/command/install.py 2015-12-03 17:31:03.874280444 +0100 @@ -19,6 +19,8 @@ from site import USER_SITE HAS_USER_SITE = True @@ -42,9 +42,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.p 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', 'data' : '$base', -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py +diff -dur Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py --- Python-3.5.0.orig/Lib/distutils/sysconfig.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-12-02 20:55:26.868975666 +0100 ++++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-12-03 17:31:03.874280444 +0100 @@ -132,8 +132,12 @@ prefix = plat_specific and EXEC_PREFIX or PREFIX @@ -59,9 +59,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Pyth if standard_lib: return libpython else: -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib/distutils/tests/test_install.py +diff -dur Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib/distutils/tests/test_install.py --- Python-3.5.0.orig/Lib/distutils/tests/test_install.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/tests/test_install.py 2015-12-02 20:55:26.868975666 +0100 ++++ Python-3.5.0/Lib/distutils/tests/test_install.py 2015-12-03 17:31:03.874280444 +0100 @@ -55,7 +55,7 @@ expected = os.path.normpath(expected) self.assertEqual(got, expected) @@ -71,9 +71,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/tests/test_instal check_path(cmd.install_lib, libdir) check_path(cmd.install_platlib, libdir) check_path(cmd.install_purelib, libdir) -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py +diff -dur Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py --- Python-3.5.0.orig/Lib/site.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/site.py 2015-12-02 20:55:26.868975666 +0100 ++++ Python-3.5.0/Lib/site.py 2015-12-03 17:31:03.874280444 +0100 @@ -303,12 +303,16 @@ seen.add(prefix) @@ -93,9 +93,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/si if sys.platform == "darwin": # for framework builds *only* we add the standard Apple # locations. -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py +diff -dur Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py --- Python-3.5.0.orig/Lib/sysconfig.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/sysconfig.py 2015-12-02 20:56:37.266116742 +0100 ++++ Python-3.5.0/Lib/sysconfig.py 2015-12-03 17:31:51.974741432 +0100 @@ -20,10 +20,10 @@ _INSTALL_SCHEMES = { @@ -126,6 +126,21 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/L 'include': '{installed_base}/include/python', 'platinclude': '{installed_base}/include/python', 'scripts': '{base}/bin', +@@ -61,10 +61,10 @@ + 'data': '{userbase}', + }, + 'posix_user': { +- 'stdlib': '{userbase}/lib/python{py_version_short}', +- 'platstdlib': '{userbase}/lib/python{py_version_short}', +- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', +- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'stdlib': '{userbase}/' + sys.lib + '/python{py_version_short}', ++ 'platstdlib': '{userbase}/' + sys.lib + '/python{py_version_short}', ++ 'purelib': '{userbase}/' + sys.lib + '/python{py_version_short}/site-packages', ++ 'platlib': '{userbase}/' + sys.lib + '/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', + 'data': '{userbase}', @@ -459,7 +459,11 @@ else: inc_dir = _sys_home or _PROJECT_BASE @@ -139,9 +154,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/L return os.path.join(inc_dir, 'pyconfig.h') -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in +diff -dur Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in --- Python-3.5.0.orig/Makefile.pre.in 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Makefile.pre.in 2015-12-02 20:55:26.868975666 +0100 ++++ Python-3.5.0/Makefile.pre.in 2015-12-03 17:31:03.874280444 +0100 @@ -101,6 +101,8 @@ # Machine-dependent subdirectories @@ -180,9 +195,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Ma fi; \ else \ echo Skip install of $(LIBRARY) - use make frameworkinstall; \ -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +diff -dur Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c --- Python-3.5.0.orig/Modules/getpath.c 2015-09-13 13:41:24.000000000 +0200 -+++ Python-3.5.0/Modules/getpath.c 2015-12-02 20:55:26.868975666 +0100 ++++ Python-3.5.0/Modules/getpath.c 2015-12-03 17:31:03.874280444 +0100 @@ -117,9 +117,21 @@ #define EXEC_PREFIX PREFIX #endif @@ -225,9 +240,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/ bufsz = wcslen(zip_path); /* Replace "00" with version */ zip_path[bufsz - 6] = VERSION[0]; zip_path[bufsz - 5] = VERSION[2]; -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Python/getplatform.c Python-3.5.0/Python/getplatform.c +diff -dur Python-3.5.0.orig/Python/getplatform.c Python-3.5.0/Python/getplatform.c --- Python-3.5.0.orig/Python/getplatform.c 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/Python/getplatform.c 2015-12-02 20:55:26.868975666 +0100 ++++ Python-3.5.0/Python/getplatform.c 2015-12-03 17:31:03.874280444 +0100 @@ -10,3 +10,23 @@ { return PLATFORM; @@ -252,9 +267,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Python/getplatform.c Python-3.5 +{ + return LIB; +} -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c +diff -dur Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c --- Python-3.5.0.orig/Python/sysmodule.c 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/Python/sysmodule.c 2015-12-02 20:55:26.868975666 +0100 ++++ Python-3.5.0/Python/sysmodule.c 2015-12-03 17:31:03.874280444 +0100 @@ -1767,6 +1767,10 @@ PyUnicode_FromString(Py_GetCopyright())); SET_SYS_FROM_STRING("platform", @@ -266,9 +281,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0 SET_SYS_FROM_STRING("executable", PyUnicode_FromWideChar( Py_GetProgramFullPath(), -1)); -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac ---- Python-3.5.0.orig/configure.ac 2015-12-02 20:54:45.102025846 +0100 -+++ Python-3.5.0/configure.ac 2015-12-02 20:55:26.868975666 +0100 +diff -dur Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac +--- Python-3.5.0.orig/configure.ac 2015-12-03 17:30:32.777292009 +0100 ++++ Python-3.5.0/configure.ac 2015-12-03 17:31:03.877613811 +0100 @@ -722,6 +722,45 @@ ]) fi @@ -324,9 +339,9 @@ diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/configure.ac Python-3.5.0/confi AC_SUBST(LIBPL) # Check whether right shifting a negative integer extends the sign bit -diff -durN -x '*~' -x '*.orig' Python-3.5.0.orig/setup.py Python-3.5.0/setup.py +diff -dur Python-3.5.0.orig/setup.py Python-3.5.0/setup.py --- Python-3.5.0.orig/setup.py 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/setup.py 2015-12-02 20:55:26.872309022 +0100 ++++ Python-3.5.0/setup.py 2015-12-03 17:31:03.877613811 +0100 @@ -526,8 +526,7 @@ # be assumed that no additional -I,-L directives are needed. if not cross_compiling: diff --git a/python3.spec b/python3.spec index 09d439c..d0c442a 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 6.2 +Release: 6.3 Epoch: 1 License: PSF Group: Applications From 3efd6e929663487dd97b21de3018ae6577157099 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Thu, 3 Dec 2015 17:50:40 +0100 Subject: [PATCH 040/180] Omit tests which won't work with $PYTHONPATH set --- python3-tests_with_pythonpath.patch | 76 +++++++++++++++++++++++++++++ python3.spec | 2 + 2 files changed, 78 insertions(+) create mode 100644 python3-tests_with_pythonpath.patch diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch new file mode 100644 index 0000000..55bda54 --- /dev/null +++ b/python3-tests_with_pythonpath.patch @@ -0,0 +1,76 @@ +diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_asyncio/test_tasks.py Python-3.5.0/Lib/test/test_asyncio/test_tasks.py +--- Python-3.5.0.orig/Lib/test/test_asyncio/test_tasks.py 2015-09-13 13:41:23.000000000 +0200 ++++ Python-3.5.0/Lib/test/test_asyncio/test_tasks.py 2015-12-03 17:43:19.313492409 +0100 +@@ -1870,6 +1870,7 @@ + cb.assert_called_once_with(fut) + self.assertEqual(fut.result(), [3, 1, exc, exc2]) + ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_env_var_debug(self): + aio_path = os.path.dirname(os.path.dirname(asyncio.__file__)) + +diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_compileall.py Python-3.5.0/Lib/test/test_compileall.py +--- Python-3.5.0.orig/Lib/test/test_compileall.py 2015-12-03 17:34:50.856171946 +0100 ++++ Python-3.5.0/Lib/test/test_compileall.py 2015-12-03 17:42:47.669939423 +0100 +@@ -206,6 +206,7 @@ + def _cleanup(self): + support.rmtree(self.directory) + ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_no_args_compiles_path(self): + # Note that -l is implied for the no args case. + bazfn = script_helper.make_script(self.directory, 'baz', '') +@@ -214,6 +215,7 @@ + self.assertNotCompiled(self.initfn) + self.assertNotCompiled(self.barfn) + ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_no_args_respects_force_flag(self): + bazfn = script_helper.make_script(self.directory, 'baz', '') + self.assertRunOK(PYTHONPATH=self.directory) +@@ -230,6 +232,7 @@ + mtime2 = os.stat(pycpath).st_mtime + self.assertNotEqual(mtime, mtime2) + ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_no_args_respects_quiet_flag(self): + script_helper.make_script(self.directory, 'baz', '') + noisy = self.assertRunOK(PYTHONPATH=self.directory) +diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_venv.py Python-3.5.0/Lib/test/test_venv.py +--- Python-3.5.0.orig/Lib/test/test_venv.py 2015-09-13 13:41:23.000000000 +0200 ++++ Python-3.5.0/Lib/test/test_venv.py 2015-12-03 17:47:16.138342748 +0100 +@@ -111,6 +111,7 @@ + self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn) + + @skipInVenv ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_prefixes(self): + """ + Test that the prefix values are as expected. +@@ -249,6 +250,7 @@ + # point to the venv being used to run the test, and we lose the link + # to the source build - so Python can't initialise properly. + @skipInVenv ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_executable(self): + """ + Test that the sys.executable value is as expected. +@@ -279,6 +281,7 @@ + + + @skipInVenv ++@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + class EnsurePipTest(BaseTest): + """Test venv module installation of pip.""" + def assert_pip_not_installed(self): +diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_warnings/__init__.py Python-3.5.0/Lib/test/test_warnings/__init__.py +--- Python-3.5.0.orig/Lib/test/test_warnings/__init__.py 2015-12-03 17:34:50.856171946 +0100 ++++ Python-3.5.0/Lib/test/test_warnings/__init__.py 2015-12-03 17:47:52.121893369 +0100 +@@ -918,6 +918,7 @@ + + class BootstrapTest(unittest.TestCase): + @unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled") ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_issue_8766(self): + # "import encodings" emits a warning whereas the warnings is not loaded + # or not completely loaded (warnings imports indirectly encodings by diff --git a/python3.spec b/python3.spec index d0c442a..22a13b2 100644 --- a/python3.spec +++ b/python3.spec @@ -50,6 +50,7 @@ Patch5: python3-atomic.patch Patch6: python-distro.patch Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch +Patch9: %{name}-tests_with_pythonpath.patch URL: http://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -473,6 +474,7 @@ Moduły testowe dla Pythona. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat From 572e2465f914d1c82a416005af9a17cba914d0c6 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Thu, 3 Dec 2015 18:16:33 +0100 Subject: [PATCH 041/180] Fix distutils bdist_rpm and its test --- python3-bdist_rpm.patch | 29 +++++++++++++++++++++++++++++ python3.spec | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 python3-bdist_rpm.patch diff --git a/python3-bdist_rpm.patch b/python3-bdist_rpm.patch new file mode 100644 index 0000000..4579c97 --- /dev/null +++ b/python3-bdist_rpm.patch @@ -0,0 +1,29 @@ +diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/bdist_rpm.py Python-3.5.0/Lib/distutils/command/bdist_rpm.py +--- Python-3.5.0.orig/Lib/distutils/command/bdist_rpm.py 2015-09-13 13:41:20.000000000 +0200 ++++ Python-3.5.0/Lib/distutils/command/bdist_rpm.py 2015-12-03 18:14:59.483958511 +0100 +@@ -324,6 +324,16 @@ + if self.rpm3_mode: + rpm_cmd.extend(['--define', + '_topdir %s' % os.path.abspath(self.rpm_base)]) ++ rpm_cmd.extend(['--define', ++ '_specdir %s/SPECS' % os.path.abspath(self.rpm_base)]) ++ rpm_cmd.extend(['--define', ++ '_sourcedir %s/SOURCES' % os.path.abspath(self.rpm_base)]) ++ rpm_cmd.extend(['--define', ++ '_builddir %s/BUILD' % os.path.abspath(self.rpm_base)]) ++ rpm_cmd.extend(['--define', ++ '_rpmdir %s/RPMS' % os.path.abspath(self.rpm_base)]) ++ rpm_cmd.extend(['--define', ++ '_srcrpmdir %s/SRPMS' % os.path.abspath(self.rpm_base)]) + if not self.keep_temp: + rpm_cmd.append('--clean') + +@@ -337,7 +347,7 @@ + # list is empty) + nvr_string = "%{name}-%{version}-%{release}" + src_rpm = nvr_string + ".src.rpm" +- non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm" ++ non_src_rpm = nvr_string + ".%{arch}.rpm" + q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % ( + src_rpm, non_src_rpm, spec_path) + diff --git a/python3.spec b/python3.spec index 22a13b2..40e8b15 100644 --- a/python3.spec +++ b/python3.spec @@ -51,6 +51,7 @@ Patch6: python-distro.patch Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch +Patch10: %{name}-bdist_rpm.patch URL: http://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -475,6 +476,7 @@ Moduły testowe dla Pythona. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat From 7fbb63b971267a4096ef22e77ca0d073735639ea Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Thu, 3 Dec 2015 18:39:54 +0100 Subject: [PATCH 042/180] clean up and reenable tests --- python3-tests_with_pythonpath.patch | 53 +++++++++++++++++++++++++---- python3.spec | 6 ++-- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index 55bda54..84696f4 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -1,6 +1,6 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_asyncio/test_tasks.py Python-3.5.0/Lib/test/test_asyncio/test_tasks.py --- Python-3.5.0.orig/Lib/test/test_asyncio/test_tasks.py 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Lib/test/test_asyncio/test_tasks.py 2015-12-03 17:43:19.313492409 +0100 ++++ Python-3.5.0/Lib/test/test_asyncio/test_tasks.py 2015-12-03 18:35:52.223668265 +0100 @@ -1870,6 +1870,7 @@ cb.assert_called_once_with(fut) self.assertEqual(fut.result(), [3, 1, exc, exc2]) @@ -9,9 +9,28 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_asyncio/test_tasks.py Python-3 def test_env_var_debug(self): aio_path = os.path.dirname(os.path.dirname(asyncio.__file__)) +diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_cmd_line.py Python-3.5.0/Lib/test/test_cmd_line.py +--- Python-3.5.0.orig/Lib/test/test_cmd_line.py 2015-09-13 13:41:23.000000000 +0200 ++++ Python-3.5.0/Lib/test/test_cmd_line.py 2015-12-03 18:35:52.227001621 +0100 +@@ -237,6 +237,7 @@ + self.assertEqual(rc, 0) + self.assertTrue(data.startswith(b'x'), data) + ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_large_PYTHONPATH(self): + path1 = "ABCDE" * 100 + path2 = "FGHIJ" * 100 +@@ -252,6 +253,7 @@ + self.assertIn(path1.encode('ascii'), out) + self.assertIn(path2.encode('ascii'), out) + ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_empty_PYTHONPATH_issue16309(self): + # On Posix, it is documented that setting PATH to the + # empty string is equivalent to not setting PATH at all, diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_compileall.py Python-3.5.0/Lib/test/test_compileall.py ---- Python-3.5.0.orig/Lib/test/test_compileall.py 2015-12-03 17:34:50.856171946 +0100 -+++ Python-3.5.0/Lib/test/test_compileall.py 2015-12-03 17:42:47.669939423 +0100 +--- Python-3.5.0.orig/Lib/test/test_compileall.py 2015-12-03 18:35:31.483520885 +0100 ++++ Python-3.5.0/Lib/test/test_compileall.py 2015-12-03 18:35:52.227001621 +0100 @@ -206,6 +206,7 @@ def _cleanup(self): support.rmtree(self.directory) @@ -36,9 +55,31 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_compileall.py Python-3.5.0/Lib def test_no_args_respects_quiet_flag(self): script_helper.make_script(self.directory, 'baz', '') noisy = self.assertRunOK(PYTHONPATH=self.directory) +diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_pydoc.py Python-3.5.0/Lib/test/test_pydoc.py +--- Python-3.5.0.orig/Lib/test/test_pydoc.py 2015-09-13 13:41:23.000000000 +0200 ++++ Python-3.5.0/Lib/test/test_pydoc.py 2015-12-03 18:35:52.227001621 +0100 +@@ -631,6 +631,7 @@ + self.addCleanup(rmtree, TESTFN) + importlib.invalidate_caches() + ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_badimport(self): + # This tests the fix for issue 5230, where if pydoc found the module + # but the module had an internal import error pydoc would report no doc +diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_site.py Python-3.5.0/Lib/test/test_site.py +--- Python-3.5.0.orig/Lib/test/test_site.py 2015-09-13 13:41:23.000000000 +0200 ++++ Python-3.5.0/Lib/test/test_site.py 2015-12-03 18:37:57.484550877 +0100 +@@ -320,6 +320,7 @@ + """Restore sys.path""" + sys.path[:] = self.sys_path + ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_abs_paths(self): + # Make sure all imported modules have their __file__ and __cached__ + # attributes as absolute paths. Arranging to put the Lib directory on diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_venv.py Python-3.5.0/Lib/test/test_venv.py --- Python-3.5.0.orig/Lib/test/test_venv.py 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Lib/test/test_venv.py 2015-12-03 17:47:16.138342748 +0100 ++++ Python-3.5.0/Lib/test/test_venv.py 2015-12-03 18:35:52.227001621 +0100 @@ -111,6 +111,7 @@ self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn) @@ -64,8 +105,8 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_venv.py Python-3.5.0/Lib/test/ """Test venv module installation of pip.""" def assert_pip_not_installed(self): diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_warnings/__init__.py Python-3.5.0/Lib/test/test_warnings/__init__.py ---- Python-3.5.0.orig/Lib/test/test_warnings/__init__.py 2015-12-03 17:34:50.856171946 +0100 -+++ Python-3.5.0/Lib/test/test_warnings/__init__.py 2015-12-03 17:47:52.121893369 +0100 +--- Python-3.5.0.orig/Lib/test/test_warnings/__init__.py 2015-12-03 18:35:31.483520885 +0100 ++++ Python-3.5.0/Lib/test/test_warnings/__init__.py 2015-12-03 18:35:52.227001621 +0100 @@ -918,6 +918,7 @@ class BootstrapTest(unittest.TestCase): diff --git a/python3.spec b/python3.spec index 40e8b15..8309c94 100644 --- a/python3.spec +++ b/python3.spec @@ -3,7 +3,7 @@ %bcond_with info # info pages (requires emacs) %bcond_without system_mpdecimal # system libmpdec library %bcond_without tkinter # disables tkinter module building -%bcond_with tests # disables Python testing +%bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode # # tests which will not work on 64-bit platforms @@ -11,10 +11,10 @@ # tests which may fail because of builder environment limitations (no /proc or /dev/pts) %define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty -# tests which fail because of some unknown/unresolved reason (this list should be empty) +# tests which fail because of some unknown/unresolved reason (this list should be %{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... # test_gdb: fails, as the gdb uses old python version -%define broken_tests test_httpservers test_distutils test_cmd_line test_pydoc test_telnetlib test_zlib test_gdb test_site +%define broken_tests test_nntplib test_gdb test_site %define py_ver 3.5 %define py_abi %{py_ver}m From 76c5116a90c144c9364e381e30a474e823bdb894 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Thu, 3 Dec 2015 18:41:41 +0100 Subject: [PATCH 043/180] adapterized --- python3.spec | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/python3.spec b/python3.spec index 8309c94..6b8692d 100644 --- a/python3.spec +++ b/python3.spec @@ -46,7 +46,7 @@ Patch1: %{name}-ac_fixes.patch Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-makefile-location.patch -Patch5: python3-atomic.patch +Patch5: %{name}-atomic.patch Patch6: python-distro.patch Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch @@ -207,7 +207,7 @@ Group: Libraries/Python Provides: python(abi) = %{py_ver} # for compatibility with existing Ac packages Provides: python(bytecode) = %{py_ver} -%{!?with_info:Obsoletes: python3-doc-info} +%{!?with_info:Obsoletes: python3-doc-info} %description libs Python shared library and very essental modules for Python binary. @@ -222,9 +222,9 @@ Summary(pl.UTF-8): Moduły języka Python Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} %{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.1} -Obsoletes: python3-modules-sqlite -Obsoletes: python3-enum Provides: python3-enum +Obsoletes: python3-enum +Obsoletes: python3-modules-sqlite %description modules Python officially distributed modules. @@ -348,7 +348,7 @@ debugger. %package 2to3 Summary: Automated Python 2 to 3 code translation Summary(pl.UTF-8): Automatyczne tłumaczenie kodu Pythona 2 do 3 -Group: Development/Languages/Pythona +Group: Development/Languages/Python %description 2to3 2to3 is a Python program that reads Python 2.x source code and applies @@ -531,11 +531,11 @@ fi %{__make} 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } { - if ($0 ~ /\*\*\* WARNING:/) { - fail = 1; - logmsg = logmsg $0; - } - print $0; + if ($0 ~ /\*\*\* WARNING:/) { + fail = 1; + logmsg = logmsg $0; + } + print $0; } END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }' @@ -1272,6 +1272,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/timeit.cpython-*.py[co] %files 2to3 +%defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/2to3-%{py_ver} %dir %{py_libdir}/lib2to3 %{py_libdir}/lib2to3/__pycache__ @@ -1294,6 +1295,7 @@ rm -rf $RPM_BUILD_ROOT %{_examplesdir}/%{name}-%{version} %files test +%defattr(644,root,root,755) %{py_libdir}/idlelib/idle_test %{py_libdir}/test %{py_libdir}/ctypes/test From 75f54605be30143568b8fe9a0718525acb9f627f Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Thu, 3 Dec 2015 19:05:33 +0100 Subject: [PATCH 044/180] test_asyncio and test_os fail due to builder limitations --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 6b8692d..a2d4eb9 100644 --- a/python3.spec +++ b/python3.spec @@ -9,7 +9,7 @@ # tests which will not work on 64-bit platforms %define no64bit_tests test_audioop test_rgbimg test_imageop # tests which may fail because of builder environment limitations (no /proc or /dev/pts) -%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty +%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty test_asyncio test_os # tests which fail because of some unknown/unresolved reason (this list should be %{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... From bb41df11a040e707769eec2e0706c3a8cc1324af Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Thu, 3 Dec 2015 19:06:51 +0100 Subject: [PATCH 045/180] Set WITHIN_PYTHON_RPM_BUILD=1 for tests --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index a2d4eb9..70b9ef6 100644 --- a/python3.spec +++ b/python3.spec @@ -544,7 +544,7 @@ export LC_ALL %if %{with tests} binlibdir=`echo build/lib.*` # -l and -j don't go together! and -j is brought up by Tools/scripts/run_tests.py -%{__make} test \ +WITHIN_PYTHON_RPM_BUILD=1 %{__make} test \ TESTOPTS="%{test_flags} %{test_list}" \ TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/$binlibdir ./python -tt" %endif From 18b0f454cbc4fdba9df7e2159f92e0561bbc1226 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Fri, 4 Dec 2015 13:47:18 +0100 Subject: [PATCH 046/180] Release: 7 --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 70b9ef6..1a84e55 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 6.3 +Release: 7 Epoch: 1 License: PSF Group: Applications From c906b43ac313e3505a0108ca4cd44492a248d530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Sat, 19 Dec 2015 07:51:34 +0100 Subject: [PATCH 047/180] - release 8 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 1a84e55..1ffabf1 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 7 +Release: 8 Epoch: 1 License: PSF Group: Applications From da213b195fb14421a7b08c8632c4eefd9dd539fa Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 28 Feb 2016 20:27:23 +0100 Subject: [PATCH 048/180] - added installcompile patch (fixes config pycompilation on install to not depend on parallel make) --- python3-installcompile.patch | 29 +++++++++++++++++++++++++++++ python3.spec | 6 ++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 python3-installcompile.patch diff --git a/python3-installcompile.patch b/python3-installcompile.patch new file mode 100644 index 0000000..964b83c --- /dev/null +++ b/python3-installcompile.patch @@ -0,0 +1,29 @@ +--- Python-3.5.0/Makefile.pre.in.orig 2016-02-28 20:07:09.864711963 +0100 ++++ Python-3.5.0/Makefile.pre.in 2016-02-28 20:10:18.334704006 +0100 +@@ -1029,7 +1029,7 @@ + + commoninstall: @FRAMEWORKALTINSTALLFIRST@ \ + altbininstall libinstall inclinstall libainstall \ +- sharedinstall oldsharedinstall altmaninstall \ ++ sharedinstall oldsharedinstall altmaninstall installcompile \ + @FRAMEWORKALTINSTALLLAST@ + + # Install shared libraries enabled by Setup +@@ -1262,6 +1262,8 @@ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi ++ ++installcompile: libainstall libinstall + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ +@@ -1654,7 +1656,7 @@ + .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure + .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools + .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean +-.PHONY: smelly funny patchcheck touch altmaninstall commoninstall ++.PHONY: smelly funny patchcheck touch altmaninstall installcompile commoninstall + .PHONY: gdbhooks + + # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/python3.spec b/python3.spec index 1ffabf1..4b6221b 100644 --- a/python3.spec +++ b/python3.spec @@ -52,6 +52,7 @@ Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch Patch10: %{name}-bdist_rpm.patch +Patch11: %{name}-installcompile.patch URL: http://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -477,6 +478,7 @@ Moduły testowe dla Pythona. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat @@ -625,8 +627,8 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve # already in %%doc %{__rm} $RPM_BUILD_ROOT%{py_libdir}/LICENSE.txt -mv $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_abi}/pyconfig.h -sed -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_abi}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h +%{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_abi}/pyconfig.h +%{__sed} -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_abi}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h %clean rm -rf $RPM_BUILD_ROOT From c4dde2e89ae154c4a8bb88818bd5d0ffec8566f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 4 Mar 2016 10:13:17 +0200 Subject: [PATCH 049/180] openssl 1.0.2g rebuild, strict openssl version dep $ python3 -m ssl Traceback (most recent call last): File "/usr/lib64/python3.5/runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "/usr/lib64/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/lib64/python3.5/ssl.py", line 98, in import _ssl # if we can't import it, let the error propagate ImportError: /usr/lib64/python3.5/lib-dynload/_ssl.cpython-35m-x86_64-linux-gnu.so: undefined symbol: SSLv2_method --- python3.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 4b6221b..4c13b43 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 8 +Release: 9 Epoch: 1 License: PSF Group: Applications @@ -226,6 +226,7 @@ Requires: %{name}-libs = %{epoch}:%{version}-%{release} Provides: python3-enum Obsoletes: python3-enum Obsoletes: python3-modules-sqlite +%requires_eq_to openssl openssl-devel %description modules Python officially distributed modules. From 4f91790cebac7b975e3aa51548785be59acff87f Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 5 Mar 2016 19:55:08 +0100 Subject: [PATCH 050/180] - updated to 3.5.1 - removed obsolete atomic patch - test_ssl and test_httplib tests fail for me because of cert ca issues(?) --- python3-atomic.patch | 78 -------------------------------------------- python3.spec | 19 +++++------ 2 files changed, 9 insertions(+), 88 deletions(-) delete mode 100644 python3-atomic.patch diff --git a/python3-atomic.patch b/python3-atomic.patch deleted file mode 100644 index be77c2a..0000000 --- a/python3-atomic.patch +++ /dev/null @@ -1,78 +0,0 @@ - -# HG changeset patch -# User Victor Stinner -# Date 1442581594 -7200 -# Node ID d4fcb362f7c66b25b22ddc0d27db0cc96acc727b -# Parent d04a0954e142f873adee88ec5bc1c1d81cd46bc4 -Issue #25150: Hide the private _Py_atomic_xxx symbols from the public -Python.h header to fix a compilation error with OpenMP. PyThreadState_GET() -becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies. - -It is important that the _PyThreadState_Current variable is always accessed -with the same implementation of pyatomic.h. Use the PyThreadState_Get() -function so extension modules will all reuse the same implementation. - -diff --git a/Include/pyatomic.h b/Include/pyatomic.h ---- a/Include/pyatomic.h -+++ b/Include/pyatomic.h -@@ -1,8 +1,6 @@ --/* Issue #23644: is incompatible with C++, see: -- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932 */ --#if !defined(Py_LIMITED_API) && !defined(__cplusplus) - #ifndef Py_ATOMIC_H - #define Py_ATOMIC_H -+#ifdef Py_BUILD_CORE - - #include "dynamic_annotations.h" - -@@ -248,5 +246,5 @@ static __inline__ void - #define _Py_atomic_load_relaxed(ATOMIC_VAL) \ - _Py_atomic_load_explicit(ATOMIC_VAL, _Py_memory_order_relaxed) - -+#endif /* Py_BUILD_CORE */ - #endif /* Py_ATOMIC_H */ --#endif /* Py_LIMITED_API */ -diff --git a/Include/pystate.h b/Include/pystate.h ---- a/Include/pystate.h -+++ b/Include/pystate.h -@@ -177,20 +177,13 @@ PyAPI_FUNC(int) PyThreadState_SetAsyncEx - /* Variable and macro for in-line access to current thread state */ - - /* Assuming the current thread holds the GIL, this is the -- PyThreadState for the current thread. -- -- Issue #23644: pyatomic.h is incompatible with C++ (yet). Disable -- PyThreadState_GET() optimization: declare it as an alias to -- PyThreadState_Get(), as done for limited API. */ --#if !defined(Py_LIMITED_API) && !defined(__cplusplus) -+ PyThreadState for the current thread. */ -+#ifdef Py_BUILD_CORE - PyAPI_DATA(_Py_atomic_address) _PyThreadState_Current; --#endif -- --#if defined(Py_DEBUG) || defined(Py_LIMITED_API) || defined(__cplusplus) --#define PyThreadState_GET() PyThreadState_Get() -+# define PyThreadState_GET() \ -+ ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) - #else --#define PyThreadState_GET() \ -- ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) -+# define PyThreadState_GET() PyThreadState_Get() - #endif - - typedef -diff --git a/Misc/NEWS b/Misc/NEWS ---- a/Misc/NEWS -+++ b/Misc/NEWS -@@ -11,6 +11,10 @@ Release date: TBA - Core and Builtins - ----------------- - -+- Issue #25150: Hide the private _Py_atomic_xxx symbols from the public -+ Python.h header to fix a compilation error with OpenMP. PyThreadState_GET() -+ becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies. -+ - Library - ------- - - diff --git a/python3.spec b/python3.spec index 4c13b43..f4f4d10 100644 --- a/python3.spec +++ b/python3.spec @@ -33,27 +33,26 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.0 -Release: 9 +Version: %{py_ver}.1 +Release: 1 Epoch: 1 License: PSF -Group: Applications -Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: d149d2812f10cbe04c042232e7964171 +Group: Development/Languages/Python +Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz +# Source0-md5: e9ea6f2623fffcdd871b7b19113fde80 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-makefile-location.patch -Patch5: %{name}-atomic.patch Patch6: python-distro.patch Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch Patch10: %{name}-bdist_rpm.patch Patch11: %{name}-installcompile.patch -URL: http://www.python.org/ +URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake BuildRequires: bluez-libs-devel @@ -473,7 +472,6 @@ Moduły testowe dla Pythona. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 @@ -611,12 +609,13 @@ install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver} install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ver} # just to cut the noise, as they are not packaged (now) -%{__rm} $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen %{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib* -%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README %{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/wininst*.exe %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.bat %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.pyw +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README # currently provided by python-2to3, consider switching to this one %{__rm} $RPM_BUILD_ROOT%{_bindir}/2to3 From a50846ed4331a7cb4d41435e42088f14d002c31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 30 Mar 2016 13:38:55 +0200 Subject: [PATCH 051/180] - rel 2; allow running from uids with no entries in /etc/passwd; https://bugs.python.org/issue10496 --- python3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index f4f4d10..e89ded1 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.1 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -52,6 +52,8 @@ Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch Patch10: %{name}-bdist_rpm.patch Patch11: %{name}-installcompile.patch +Patch12: https://bugs.python.org/file21896/nonexistent_user.patch +# Patch12-md5: db706fbe6de467c6e4c97c675eddf29a URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -478,6 +480,7 @@ Moduły testowe dla Pythona. %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat From f69d21534e5f5805751fca202e9e2ae82cb10d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Sat, 23 Apr 2016 22:44:51 +0200 Subject: [PATCH 052/180] - use 'share' not 'lib' for platform independent files - rel 3 --- python3-multilib.patch | 6 ++---- python3.spec | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/python3-multilib.patch b/python3-multilib.patch index 30e0e94..f5a49b0 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -52,7 +52,7 @@ diff -dur Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutil + if plat_specific: + lib = sys.lib + else: -+ lib = 'lib' ++ lib = 'share' libpython = os.path.join(prefix, - "lib", "python" + get_python_version()) + lib, "python" + get_python_version()) @@ -74,7 +74,7 @@ diff -dur Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib diff -dur Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py --- Python-3.5.0.orig/Lib/site.py 2015-09-13 13:41:21.000000000 +0200 +++ Python-3.5.0/Lib/site.py 2015-12-03 17:31:03.874280444 +0100 -@@ -303,12 +303,16 @@ +@@ -303,12 +303,14 @@ seen.add(prefix) if os.sep == '/': @@ -83,8 +83,6 @@ diff -dur Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py "python" + sys.version[:3], "site-packages")) + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) -+ if sys.lib != 'lib': -+ sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) + sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) else: sitepackages.append(prefix) diff --git a/python3.spec b/python3.spec index e89ded1..694d20f 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.1 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Development/Languages/Python From 1fcd65227401e0610674064b111967be2e7235f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 3 May 2016 22:52:49 +0200 Subject: [PATCH 053/180] - openssl rebuild - release 4 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 694d20f..8e5158b 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.1 -Release: 3 +Release: 4 Epoch: 1 License: PSF Group: Development/Languages/Python From 7e9f7d5795f31134ca0d5cf3344c2966e9951137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 4 May 2016 13:25:29 +0300 Subject: [PATCH 054/180] use %requires_ge_to like ruby and python2 --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 8e5158b..19ceb09 100644 --- a/python3.spec +++ b/python3.spec @@ -227,7 +227,7 @@ Requires: %{name}-libs = %{epoch}:%{version}-%{release} Provides: python3-enum Obsoletes: python3-enum Obsoletes: python3-modules-sqlite -%requires_eq_to openssl openssl-devel +%requires_ge_to openssl openssl-devel %description modules Python officially distributed modules. From 1e9d9e53de431321c263fe0ed54ddbd0a65024b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 14 Aug 2016 22:17:50 +0200 Subject: [PATCH 055/180] - up to 3.5.2 --- python3-multilib.patch | 14 ++++---------- python3-test-pyexpat.patch | 11 +++++++++++ python3.spec | 10 ++++++---- 3 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 python3-test-pyexpat.patch diff --git a/python3-multilib.patch b/python3-multilib.patch index f5a49b0..f9e3554 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -196,8 +196,8 @@ diff -dur Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in diff -dur Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c --- Python-3.5.0.orig/Modules/getpath.c 2015-09-13 13:41:24.000000000 +0200 +++ Python-3.5.0/Modules/getpath.c 2015-12-03 17:31:03.874280444 +0100 -@@ -117,9 +117,21 @@ - #define EXEC_PREFIX PREFIX +@@ -100,6 +100,17 @@ + extern "C" { #endif +#ifndef LIB_PYTHON @@ -211,15 +211,9 @@ diff -dur Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c +#define LIB_PYTHON "lib/python" +#endif +#endif -+ - #ifndef PYTHONPATH --#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ -- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" -+#define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \ -+ EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" - #endif - #ifndef LANDMARK + #if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH) + #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" @@ -511,7 +523,7 @@ _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); _prefix = Py_DecodeLocale(PREFIX, NULL); diff --git a/python3-test-pyexpat.patch b/python3-test-pyexpat.patch new file mode 100644 index 0000000..728b7c8 --- /dev/null +++ b/python3-test-pyexpat.patch @@ -0,0 +1,11 @@ +--- Python-3.5.2/Lib/test/test_pyexpat.py~ 2016-06-25 23:38:37.000000000 +0200 ++++ Python-3.5.2/Lib/test/test_pyexpat.py 2016-08-14 22:01:10.891946983 +0200 +@@ -660,7 +660,7 @@ class MalformedInputTest(unittest.TestCa + parser.Parse(xml, True) + self.fail() + except expat.ExpatError as e: +- self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14') ++ self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 13') + + class ErrorMessageTest(unittest.TestCase): + def test_codes(self): diff --git a/python3.spec b/python3.spec index 19ceb09..e78304d 100644 --- a/python3.spec +++ b/python3.spec @@ -33,13 +33,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.1 -Release: 4 +Version: %{py_ver}.2 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: e9ea6f2623fffcdd871b7b19113fde80 +# Source0-md5: 8906efbacfcdc7c3c9198aeefafd159e Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -53,7 +53,8 @@ Patch9: %{name}-tests_with_pythonpath.patch Patch10: %{name}-bdist_rpm.patch Patch11: %{name}-installcompile.patch Patch12: https://bugs.python.org/file21896/nonexistent_user.patch -# Patch12-md5: db706fbe6de467c6e4c97c675eddf29a +# Patch12-md5: db706fbe6de467c6e4c97c675eddf29a +Patch13: python3-test-pyexpat.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -481,6 +482,7 @@ Moduły testowe dla Pythona. %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat From 3750dfa212ba299a85b64c8b1cb8b41e9cb88f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Tue, 18 Oct 2016 08:06:55 +0200 Subject: [PATCH 056/180] - rebuild with readline 7.0 - release 2 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index e78304d..7310d7b 100644 --- a/python3.spec +++ b/python3.spec @@ -34,7 +34,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python From 80febf2a7a96dfc0a9996a736f15262f75bad9b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 23 Dec 2016 14:04:40 +0100 Subject: [PATCH 057/180] - up to 3.6.0 (builds; untested; some tests still fail) --- python3-multilib.patch | 17 +++++---- python3-no_cmdline_tests.patch | 12 ------- python3-test-pyexpat.patch | 11 ------ python3.spec | 63 +++++++++++++++++----------------- 4 files changed, 41 insertions(+), 62 deletions(-) delete mode 100644 python3-test-pyexpat.patch diff --git a/python3-multilib.patch b/python3-multilib.patch index f9e3554..3075ba4 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -74,13 +74,13 @@ diff -dur Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib diff -dur Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py --- Python-3.5.0.orig/Lib/site.py 2015-09-13 13:41:21.000000000 +0200 +++ Python-3.5.0/Lib/site.py 2015-12-03 17:31:03.874280444 +0100 -@@ -303,12 +303,14 @@ +@@ -304,12 +304,14 @@ def getsitepackages(prefixes=None): seen.add(prefix) if os.sep == '/': - sitepackages.append(os.path.join(prefix, "lib", + sitepackages.append(os.path.join(prefix, sys.lib, - "python" + sys.version[:3], + "python%d.%d" % sys.version_info[:2], "site-packages")) + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) + sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) @@ -322,15 +322,18 @@ diff -dur Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac MULTIARCH=$($CC --print-multiarch 2>/dev/null) AC_SUBST(MULTIARCH) -@@ -4331,7 +4370,7 @@ - +@@ -4640,9 +4640,9 @@ AC_MSG_RESULT($LDVERSION) dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) --LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" -+LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}" + if test x$PLATFORM_TRIPLET = x; then +- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" ++ LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}" + else +- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" ++ LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" + fi AC_SUBST(LIBPL) - # Check whether right shifting a negative integer extends the sign bit diff -dur Python-3.5.0.orig/setup.py Python-3.5.0/setup.py --- Python-3.5.0.orig/setup.py 2015-09-13 13:41:26.000000000 +0200 +++ Python-3.5.0/setup.py 2015-12-03 17:31:03.877613811 +0100 diff --git a/python3-no_cmdline_tests.patch b/python3-no_cmdline_tests.patch index 7a39622..ad85bff 100644 --- a/python3-no_cmdline_tests.patch +++ b/python3-no_cmdline_tests.patch @@ -1,15 +1,3 @@ -diff -Nur Python-3.3.1.orig/Lib/test/regrtest.py Python-3.3.1/Lib/test/regrtest.py ---- Python-3.3.1.orig/Lib/test/regrtest.py 2013-04-06 08:41:41.000000000 +0100 -+++ Python-3.3.1/Lib/test/regrtest.py 2013-04-07 19:39:23.432490962 +0100 -@@ -243,7 +243,7 @@ - - from test import support - --RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', -+RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'cmdline', - 'decimal', 'cpu', 'subprocess', 'urlfetch', 'gui') - - TEMPDIR = os.path.abspath(tempfile.gettempdir()) diff -Nur Python-3.3.1.orig/Lib/test/test_compileall.py Python-3.3.1/Lib/test/test_compileall.py --- Python-3.3.1.orig/Lib/test/test_compileall.py 2013-04-06 08:41:41.000000000 +0100 +++ Python-3.3.1/Lib/test/test_compileall.py 2013-04-07 19:39:23.449157629 +0100 diff --git a/python3-test-pyexpat.patch b/python3-test-pyexpat.patch deleted file mode 100644 index 728b7c8..0000000 --- a/python3-test-pyexpat.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-3.5.2/Lib/test/test_pyexpat.py~ 2016-06-25 23:38:37.000000000 +0200 -+++ Python-3.5.2/Lib/test/test_pyexpat.py 2016-08-14 22:01:10.891946983 +0200 -@@ -660,7 +660,7 @@ class MalformedInputTest(unittest.TestCa - parser.Parse(xml, True) - self.fail() - except expat.ExpatError as e: -- self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14') -+ self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 13') - - class ErrorMessageTest(unittest.TestCase): - def test_codes(self): diff --git a/python3.spec b/python3.spec index 7310d7b..cb8732f 100644 --- a/python3.spec +++ b/python3.spec @@ -16,8 +16,9 @@ # test_gdb: fails, as the gdb uses old python version %define broken_tests test_nntplib test_gdb test_site -%define py_ver 3.5 +%define py_ver 3.6 %define py_abi %{py_ver}m +%define py_platform %{py_abi}-%{_host_cpu}-%{_host_os}%{?_gnu} %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} %define py_incdir %{_includedir}/python%{py_abi} @@ -33,13 +34,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.2 -Release: 2 +Version: %{py_ver}.0 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 8906efbacfcdc7c3c9198aeefafd159e +# Source0-md5: 82b143ebbf4514d7e05876bed7a6b1f5 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -54,7 +55,6 @@ Patch10: %{name}-bdist_rpm.patch Patch11: %{name}-installcompile.patch Patch12: https://bugs.python.org/file21896/nonexistent_user.patch # Patch12-md5: db706fbe6de467c6e4c97c675eddf29a -Patch13: python3-test-pyexpat.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -482,12 +482,11 @@ Moduły testowe dla Pythona. %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch13 -p1 %{__rm} -r Modules/zlib %{__rm} -r Modules/expat -for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx; do +for SUBDIR in darwin libffi libffi_msvc libffi_osx; do %{__rm} -r Modules/_ctypes/$SUBDIR/* done @@ -619,7 +618,6 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.bat %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.pyw %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html -%{__rm} $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen %{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README # currently provided by python-2to3, consider switching to this one @@ -632,8 +630,8 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve # already in %%doc %{__rm} $RPM_BUILD_ROOT%{py_libdir}/LICENSE.txt -%{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_abi}/pyconfig.h -%{__sed} -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_abi}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h +%{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_platform}/pyconfig.h +%{__sed} -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_platform}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h %clean rm -rf $RPM_BUILD_ROOT @@ -678,7 +676,7 @@ rm -rf $RPM_BUILD_ROOT # modules required by python library %{py_libdir}/_collections_abc.py %{py_libdir}/_sitebuiltins.py -%{py_libdir}/_sysconfigdata.py +%{py_libdir}/_sysconfigdata_*.py %{py_libdir}/_weakrefset.py %{py_libdir}/abc.py %{py_libdir}/bisect.py @@ -706,7 +704,7 @@ rm -rf $RPM_BUILD_ROOT # needed by the dynamic sys.lib patch %{py_libdir}/types.py %{py_libdir}/__pycache__/_sitebuiltins.cpython-*.py[co] -%{py_libdir}/__pycache__/_sysconfigdata.cpython-*.py[co] +%{py_libdir}/__pycache__/_sysconfigdata_*.cpython-*.py[co] %{py_libdir}/__pycache__/_weakrefset.cpython-*.py[co] %{py_libdir}/__pycache__/abc.cpython-*.py[co] %{py_libdir}/__pycache__/bisect.cpython-*.py[co] @@ -741,12 +739,12 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/encodings/__pycache__ %{py_libdir}/encodings/*.py -%dir %{py_libdir}/config-%{py_abi} -%{py_libdir}/config-%{py_abi}/Makefile -%{py_libdir}/config-%{py_abi}/Setup -%{py_libdir}/config-%{py_abi}/Setup.config -%{py_libdir}/config-%{py_abi}/Setup.local -%{py_libdir}/config-%{py_abi}/pyconfig.h +%dir %{py_libdir}/config-%{py_platform} +%{py_libdir}/config-%{py_platform}/Makefile +%{py_libdir}/config-%{py_platform}/Setup +%{py_libdir}/config-%{py_platform}/Setup.config +%{py_libdir}/config-%{py_platform}/Setup.local +%{py_libdir}/config-%{py_platform}/pyconfig.h %files modules %defattr(644,root,root,755) @@ -847,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/random.py %{py_libdir}/rlcompleter.py %{py_libdir}/runpy.py +%{py_libdir}/secrets.py %{py_libdir}/signal.py %{py_libdir}/sched.py %{py_libdir}/selectors.py @@ -982,6 +981,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/rlcompleter.cpython-*.py[co] %{py_libdir}/__pycache__/runpy.cpython-*.py[co] %{py_libdir}/__pycache__/sched.cpython-*.py[co] +%{py_libdir}/__pycache__/secrets.cpython-*.py[co] %{py_libdir}/__pycache__/selectors.cpython-*.py[co] %{py_libdir}/__pycache__/shelve.cpython-*.py[co] %{py_libdir}/__pycache__/shlex.cpython-*.py[co] @@ -1026,7 +1026,9 @@ rm -rf $RPM_BUILD_ROOT # list .so modules to be sure that all of them are built # +%attr(755,root,root) %{py_dyndir}/_asyncio.cpython-*.so %attr(755,root,root) %{py_dyndir}/_bisect.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_blake2.cpython-*.so %attr(755,root,root) %{py_dyndir}/_bz2.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_cn.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_hk.cpython-*.so @@ -1059,6 +1061,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_posixsubprocess.cpython-*.so %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha1.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_sha3.cpython-*.so %attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so @@ -1093,10 +1096,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so -%dir %{py_libdir}/plat-* -%{py_libdir}/plat-*/__pycache__ -%{py_libdir}/plat-*/*.py - %dir %{py_libdir}/asyncio %{py_libdir}/asyncio/__pycache__ %{py_libdir}/asyncio/*.py @@ -1222,7 +1221,7 @@ rm -rf $RPM_BUILD_ROOT %files -n pydoc3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/pydoc3 -%attr(755,root,root) %{_bindir}/pydoc3.5 +%attr(755,root,root) %{_bindir}/pydoc%{py_ver} %{py_libdir}/pydoc.py %{py_libdir}/__pycache__/pydoc.cpython-*.py[co] %dir %{py_libdir}/pydoc_data @@ -1233,7 +1232,7 @@ rm -rf $RPM_BUILD_ROOT %files -n idle3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/idle3 -%attr(755,root,root) %{_bindir}/idle3.5 +%attr(755,root,root) %{_bindir}/idle%{py_ver} %dir %{py_libdir}/idlelib/Icons %{py_libdir}/idlelib/__pycache__ %{py_libdir}/idlelib/*.py @@ -1252,14 +1251,14 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libpython3.so %{py_incdir}/*.h %exclude %{py_incdir}/pyconfig.h -%attr(755,root,root) %{py_libdir}/config-%{py_abi}/makesetup -%attr(755,root,root) %{py_libdir}/config-%{py_abi}/install-sh -%{py_libdir}/config-%{py_abi}/config.c -%{py_libdir}/config-%{py_abi}/config.c.in -%{py_libdir}/config-%{py_abi}/python.o -%{py_libdir}/config-%{py_abi}/python-config.py -%dir %{py_libdir}/config-%{py_abi}/__pycache__ -%{py_libdir}/config-%{py_abi}/__pycache__/python-config.* +%attr(755,root,root) %{py_libdir}/config-%{py_platform}/makesetup +%attr(755,root,root) %{py_libdir}/config-%{py_platform}/install-sh +%{py_libdir}/config-%{py_platform}/config.c +%{py_libdir}/config-%{py_platform}/config.c.in +%{py_libdir}/config-%{py_platform}/python.o +%{py_libdir}/config-%{py_platform}/python-config.py +%dir %{py_libdir}/config-%{py_platform}/__pycache__ +%{py_libdir}/config-%{py_platform}/__pycache__/python-config.* %{_pkgconfigdir}/python-%{py_ver}.pc %{_pkgconfigdir}/python-%{py_abi}.pc %{_pkgconfigdir}/python3.pc From 9ee43785fae03eec39ed82a1cafdad85fda13848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 23 Dec 2016 14:36:52 +0100 Subject: [PATCH 058/180] - fix build on i686 --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index cb8732f..4f828d5 100644 --- a/python3.spec +++ b/python3.spec @@ -18,7 +18,7 @@ %define py_ver 3.6 %define py_abi %{py_ver}m -%define py_platform %{py_abi}-%{_host_cpu}-%{_host_os}%{?_gnu} +%define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_gnu} %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} %define py_incdir %{_includedir}/python%{py_abi} From 94e6cfa282be8a34868ff59456d97021d716d47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 27 Dec 2016 23:17:30 +0100 Subject: [PATCH 059/180] - drop obsolete --with-signal-module and --with-tsc options --- python3.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python3.spec b/python3.spec index 4f828d5..79f9300 100644 --- a/python3.spec +++ b/python3.spec @@ -524,14 +524,10 @@ fi --without-ensurepip \ --with-fpectl \ %{?with_debug:--with-pydebug} \ - --with-signal-module \ --with-system-expat \ --with-system-ffi \ %{?with_system_mpdecimal:--with-system-libmpdec} \ - --with-threads \ -%ifarch %{ix86} %{x8664} ppc ppc64 - --with-tsc -%endif + --with-threads %{__make} 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } From d1a550a0b637c7b2fcd7249c3cea801895f29da9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 27 Dec 2016 23:35:36 +0100 Subject: [PATCH 060/180] - enable ndbm, too (by forcing linking to gdbm_compat provided by gdbm.spec) which also fixes test suite --- python3-db.patch | 20 ++++++++++++++++++++ python3.spec | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/python3-db.patch b/python3-db.patch index 63b011d..f986f77 100644 --- a/python3-db.patch +++ b/python3-db.patch @@ -9,3 +9,23 @@ min_db_ver = (3, 3) db_setup_debug = False # verbose debug prints from this script? +--- Python-3.6.0/setup.py~ 2016-12-27 23:21:52.000000000 +0100 ++++ Python-3.6.0/setup.py 2016-12-27 23:28:54.720208583 +0100 +@@ -1252,16 +1252,7 @@ class PyBuildExt(build_ext): + for cand in dbm_order: + if cand == "ndbm": + if find_file("ndbm.h", inc_dirs, []) is not None: +- # Some systems have -lndbm, others have -lgdbm_compat, +- # others don't have either +- if self.compiler.find_library_file(lib_dirs, +- 'ndbm'): +- ndbm_libs = ['ndbm'] +- elif self.compiler.find_library_file(lib_dirs, +- 'gdbm_compat'): +- ndbm_libs = ['gdbm_compat'] +- else: +- ndbm_libs = [] ++ ndbm_libs = ['gdbm_compat'] + if dbm_setup_debug: print("building dbm using ndbm") + dbmext = Extension('_dbm', ['_dbmmodule.c'], + define_macros=[ diff --git a/python3.spec b/python3.spec index 79f9300..852a98e 100644 --- a/python3.spec +++ b/python3.spec @@ -519,7 +519,7 @@ fi --enable-ipv6 \ --enable-shared \ --with-computed-gotos \ - --with-dbmliborder=gdbm:bdb \ + --with-dbmliborder=gdbm:ndbm:bdb \ --with-doc-strings \ --without-ensurepip \ --with-fpectl \ From 5a3f37c2f753284b115938b52498a73357637d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 28 Dec 2016 00:19:37 +0100 Subject: [PATCH 061/180] - disable test_readline on builders (out of pty devices error) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 852a98e..cc67086 100644 --- a/python3.spec +++ b/python3.spec @@ -9,7 +9,7 @@ # tests which will not work on 64-bit platforms %define no64bit_tests test_audioop test_rgbimg test_imageop # tests which may fail because of builder environment limitations (no /proc or /dev/pts) -%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty test_asyncio test_os +%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty test_asyncio test_os test_readline # tests which fail because of some unknown/unresolved reason (this list should be %{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... From 59a34e4810a349bd1bb66f5119a11d2ad24f1c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 28 Dec 2016 22:02:26 +0100 Subject: [PATCH 062/180] - disable test_time on x32 --- python3.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index cc67086..d1875f3 100644 --- a/python3.spec +++ b/python3.spec @@ -14,7 +14,13 @@ # tests which fail because of some unknown/unresolved reason (this list should be %{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... # test_gdb: fails, as the gdb uses old python version -%define broken_tests test_nntplib test_gdb test_site +# test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error +%define broken_tests test_nntplib \ +%ifarch x32 + test_time \ +%endif + test_gdb \ + test_site %define py_ver 3.6 %define py_abi %{py_ver}m From 1d254e46f1c484e3d87a661d7bd82ff7eb728c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 28 Dec 2016 22:07:21 +0100 Subject: [PATCH 063/180] - working way --- python3.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python3.spec b/python3.spec index d1875f3..ec646e7 100644 --- a/python3.spec +++ b/python3.spec @@ -15,12 +15,10 @@ # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... # test_gdb: fails, as the gdb uses old python version # test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error -%define broken_tests test_nntplib \ %ifarch x32 - test_time \ +%define broken_tests_x32 test_time %endif - test_gdb \ - test_site +%define broken_tests test_nntplib test_gdb test_site %{?broken_tests_x32} %define py_ver 3.6 %define py_abi %{py_ver}m From 32d9814d5f75497a73ceae10dea03079725428f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 1 Jan 2017 15:42:49 +0100 Subject: [PATCH 064/180] - rel 2; operator module needed in libs not modules --- python3.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index ec646e7..757bf47 100644 --- a/python3.spec +++ b/python3.spec @@ -39,7 +39,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -689,6 +689,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/linecache.py %{py_libdir}/locale.py %{py_libdir}/io.py +%{py_libdir}/operator.py %{py_libdir}/posixpath.py %{py_libdir}/re.py %{py_libdir}/reprlib.py @@ -718,6 +719,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/linecache.cpython-*.py[co] %{py_libdir}/__pycache__/locale.cpython-*.py[co] %{py_libdir}/__pycache__/io.cpython-*.py[co] +%{py_libdir}/__pycache__/operator.cpython-*.py[co] %{py_libdir}/__pycache__/posixpath.cpython-*.py[co] %{py_libdir}/__pycache__/re.cpython-*.py[co] %{py_libdir}/__pycache__/reprlib.cpython-*.py[co] @@ -826,7 +828,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/nturl2path.py %{py_libdir}/numbers.py %{py_libdir}/opcode.py -%{py_libdir}/operator.py %{py_libdir}/optparse.py %{py_libdir}/pathlib.py %{py_libdir}/pickle.py @@ -961,7 +962,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/nturl2path.cpython-*.py[co] %{py_libdir}/__pycache__/numbers.cpython-*.py[co] %{py_libdir}/__pycache__/opcode.cpython-*.py[co] -%{py_libdir}/__pycache__/operator.cpython-*.py[co] %{py_libdir}/__pycache__/optparse.cpython-*.py[co] %{py_libdir}/__pycache__/pathlib.cpython-*.py[co] %{py_libdir}/__pycache__/pickle.cpython-*.py[co] From 69cd33fe0aff9e941c16aeb3e23f0576f0ba4e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 22 Mar 2017 14:22:48 +0100 Subject: [PATCH 065/180] - up to 3.6.1 --- python3.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python3.spec b/python3.spec index 757bf47..d79a81b 100644 --- a/python3.spec +++ b/python3.spec @@ -38,13 +38,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.0 -Release: 2 +Version: %{py_ver}.1 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 82b143ebbf4514d7e05876bed7a6b1f5 +# Source0-md5: 692b4fc3a2ba0d54d1495d4ead5b0b5c Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -618,7 +618,7 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.bat %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.pyw %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html -%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README.txt # currently provided by python-2to3, consider switching to this one %{__rm} $RPM_BUILD_ROOT%{_bindir}/2to3 @@ -1184,8 +1184,9 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/venv/__pycache__ %{py_libdir}/venv/*.py %dir %{py_libdir}/venv/scripts +%dir %{py_libdir}/venv/scripts/common +%{py_libdir}/venv/scripts/common/activate %dir %{py_libdir}/venv/scripts/posix -%{py_libdir}/venv/scripts/posix/activate %{py_libdir}/venv/scripts/posix/activate.csh %{py_libdir}/venv/scripts/posix/activate.fish From b9d8d9de954a92fe45e7f855eeb0b574fd08b77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Sat, 15 Apr 2017 09:19:48 +0200 Subject: [PATCH 066/180] - disable ssl tests, missing insecure protocols are too confusing for the testsuite --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index d79a81b..a7cf9ec 100644 --- a/python3.spec +++ b/python3.spec @@ -18,7 +18,7 @@ %ifarch x32 %define broken_tests_x32 test_time %endif -%define broken_tests test_nntplib test_gdb test_site %{?broken_tests_x32} +%define broken_tests test_nntplib test_gdb test_site test_ssl %{?broken_tests_x32} %define py_ver 3.6 %define py_abi %{py_ver}m From 5390f11a9c507427f283b0bbb3298ed977bf5876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Sat, 15 Apr 2017 09:29:23 +0200 Subject: [PATCH 067/180] - rel 2 --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index a7cf9ec..1a36809 100644 --- a/python3.spec +++ b/python3.spec @@ -39,7 +39,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.1 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python From 603a9dc9d96a2e5dfc4710218546b0bf5290d2b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 7 Aug 2017 10:36:19 +0200 Subject: [PATCH 068/180] - up to 3.6.2 --- python3-ac_fixes.patch | 51 ++++++++++++++++++++---------------- python3-installcompile.patch | 5 ++-- python3.spec | 6 ++--- 3 files changed, 35 insertions(+), 27 deletions(-) diff --git a/python3-ac_fixes.patch b/python3-ac_fixes.patch index e7611ed..b005cdd 100644 --- a/python3-ac_fixes.patch +++ b/python3-ac_fixes.patch @@ -1,23 +1,30 @@ ---- Python-3.5.0/configure.ac~ 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/configure.ac 2015-09-13 20:06:11.597280920 +0200 -@@ -1258,16 +1258,16 @@ then - # Optimization messes up debuggers, so turn it off for - # debug builds. - if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then -- OPT="-g -Og -Wall $STRICT_PROTO" -+ OPT="-g $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" - else -- OPT="-g -O0 -Wall $STRICT_PROTO" -+ OPT="-g $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" - fi - else -- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" -+ OPT="-g $WRAP $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" - fi - ;; - *) -- OPT="-O3 -Wall $STRICT_PROTO" -+ OPT="$CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" - ;; - esac +--- Python-3.6.2/configure.ac~ 2017-07-08 05:33:27.000000000 +0200 ++++ Python-3.6.2/configure.ac 2017-08-07 10:28:44.498951134 +0200 +@@ -1494,26 +1494,7 @@ then + CFLAGS_ALIASING="-fno-strict-aliasing" + fi + +- case $ac_cv_prog_cc_g in +- yes) +- if test "$Py_DEBUG" = 'true' ; then +- # Optimization messes up debuggers, so turn it off for +- # debug builds. +- if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then +- OPT="-g -Og -Wall" +- else +- OPT="-g -O0 -Wall" +- fi +- else +- OPT="-g $WRAP -O3 -Wall" +- fi +- ;; +- *) +- OPT="-O3 -Wall" +- ;; +- esac +- +- OPT="$OPT $STRICT_PROTO" ++ OPT="$OPT $CPPFLAGS $CFLAGS $STRICT_PROTO" + case $ac_sys_system in + SCO_SV*) OPT="$OPT -m486 -DSCO5" diff --git a/python3-installcompile.patch b/python3-installcompile.patch index 964b83c..20107ba 100644 --- a/python3-installcompile.patch +++ b/python3-installcompile.patch @@ -18,12 +18,13 @@ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST) -f \ -@@ -1654,7 +1656,7 @@ +@@ -1700,7 +1700,7 @@ Python/thread.o: @THREADHEADERS@ .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools - .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean + .PHONY: frameworkaltinstallunixtools recheck clean clobber distclean -.PHONY: smelly funny patchcheck touch altmaninstall commoninstall +.PHONY: smelly funny patchcheck touch altmaninstall installcompile commoninstall .PHONY: gdbhooks # IF YOU PUT ANYTHING HERE IT WILL GO AWAY + diff --git a/python3.spec b/python3.spec index 1a36809..62cd3c6 100644 --- a/python3.spec +++ b/python3.spec @@ -38,13 +38,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.1 -Release: 2 +Version: %{py_ver}.2 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 692b4fc3a2ba0d54d1495d4ead5b0b5c +# Source0-md5: 2c68846471994897278364fc18730dd9 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From e5106b3ca59a885abb12549ac2f399168014259b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 4 Oct 2017 09:56:31 +0200 Subject: [PATCH 069/180] - up to 3.6.3 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 62cd3c6..a40cc78 100644 --- a/python3.spec +++ b/python3.spec @@ -38,13 +38,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.2 +Version: %{py_ver}.3 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 2c68846471994897278364fc18730dd9 +# Source0-md5: b9c2c36c33fb89bda1fefd37ad5af9be Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 46efe5be755c15d42967b6ae60d785f89297bcdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 4 Oct 2017 10:02:45 +0200 Subject: [PATCH 070/180] - disable test_normalization because it requires network --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index a40cc78..273f855 100644 --- a/python3.spec +++ b/python3.spec @@ -9,7 +9,7 @@ # tests which will not work on 64-bit platforms %define no64bit_tests test_audioop test_rgbimg test_imageop # tests which may fail because of builder environment limitations (no /proc or /dev/pts) -%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty test_asyncio test_os test_readline +%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty test_asyncio test_os test_readline test_normalization # tests which fail because of some unknown/unresolved reason (this list should be %{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... From 40197233cef5a9253b97e3c09ab2a9bcc3054064 Mon Sep 17 00:00:00 2001 From: Adam Osuchowski Date: Tue, 21 Nov 2017 17:02:53 +0100 Subject: [PATCH 071/180] - /etc/shrc.d/* files as configs --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 273f855..e5a33fa 100644 --- a/python3.spec +++ b/python3.spec @@ -750,7 +750,7 @@ rm -rf $RPM_BUILD_ROOT %files modules %defattr(644,root,root,755) -/etc/shrc.d/python*-modules* +%config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-modules* %attr(755,root,root) %{_bindir}/pyvenv %attr(755,root,root) %{_bindir}/pyvenv-%{py_ver} %{py_libdir}/__future__.py @@ -1266,7 +1266,7 @@ rm -rf $RPM_BUILD_ROOT %files devel-tools %defattr(644,root,root,755) -/etc/shrc.d/python*-devel* +%config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-devel* %attr(755,root,root) %{_bindir}/pygettext%{py_ver} %attr(755,root,root) %{_bindir}/pyreindent%{py_ver} %{py_libdir}/pdb.py From 380ee8da16868db143d7c8226ae3a0bbe071175f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 19 Dec 2017 15:07:59 +0100 Subject: [PATCH 072/180] - up to 3.6.4 --- python3-multilib.patch | 19 +++++++++---------- python3.spec | 4 ++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/python3-multilib.patch b/python3-multilib.patch index 3075ba4..5a9d38f 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -337,16 +337,15 @@ diff -dur Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac diff -dur Python-3.5.0.orig/setup.py Python-3.5.0/setup.py --- Python-3.5.0.orig/setup.py 2015-09-13 13:41:26.000000000 +0200 +++ Python-3.5.0/setup.py 2015-12-03 17:31:03.877613811 +0100 -@@ -526,8 +526,7 @@ - # be assumed that no additional -I,-L directives are needed. - if not cross_compiling: - lib_dirs = self.compiler.library_dirs + [ -- '/lib64', '/usr/lib64', -- '/lib', '/usr/lib', -+ '/' + sys.lib, '/usr/' + sys.lib - ] - inc_dirs = self.compiler.include_dirs + ['/usr/include'] - else: +@@ -569,7 +569,7 @@ class PyBuildExt(build_ext): + add_dir_to_list(self.compiler.include_dirs, + sysconfig.get_config_var("INCLUDEDIR")) + +- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib'] ++ system_lib_dirs = ['/' + sys.lib, '/usr/' + sys.lib] + system_include_dirs = ['/usr/include'] + # lib_dirs and inc_dirs are used to search for files; + # if a file is found in one of those directories, it can @@ -750,11 +749,11 @@ elif curses_library: readline_libs.append(curses_library) diff --git a/python3.spec b/python3.spec index e5a33fa..2dac225 100644 --- a/python3.spec +++ b/python3.spec @@ -38,13 +38,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.3 +Version: %{py_ver}.4 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: b9c2c36c33fb89bda1fefd37ad5af9be +# Source0-md5: 1325134dd525b4a2c3272a1a0214dd54 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 28f27d8c91ef5108a987d75fa9538507b7a2c180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 29 Mar 2018 13:51:30 +0200 Subject: [PATCH 073/180] - up to 3.6.5 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 2dac225..3d77288 100644 --- a/python3.spec +++ b/python3.spec @@ -38,13 +38,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.4 +Version: %{py_ver}.5 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 1325134dd525b4a2c3272a1a0214dd54 +# Source0-md5: 9f49654a4d6f733ff3284ab9d227e9fd Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From f3feeafede42f761f327e0ae649400c5a6dc24d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 25 Apr 2018 19:34:46 +0300 Subject: [PATCH 074/180] move "enum" to "libs", because "re" imports "enum" testcase: $ python3 -c "import re" --- python3.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python3.spec b/python3.spec index 3d77288..489fcec 100644 --- a/python3.spec +++ b/python3.spec @@ -39,7 +39,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.5 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -214,6 +214,8 @@ Group: Libraries/Python Provides: python(abi) = %{py_ver} # for compatibility with existing Ac packages Provides: python(bytecode) = %{py_ver} +Provides: python3-enum +Obsoletes: python3-enum %{!?with_info:Obsoletes: python3-doc-info} %description libs @@ -229,8 +231,6 @@ Summary(pl.UTF-8): Moduły języka Python Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} %{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.1} -Provides: python3-enum -Obsoletes: python3-enum Obsoletes: python3-modules-sqlite %requires_ge_to openssl openssl-devel @@ -682,6 +682,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/bisect.py %{py_libdir}/codecs.py %{py_libdir}/copyreg.py +%{py_libdir}/enum.py %{py_libdir}/functools.py %{py_libdir}/genericpath.py %{py_libdir}/heapq.py @@ -712,6 +713,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/codecs.cpython-*.py[co] %{py_libdir}/__pycache__/_collections_abc.cpython-*.py[co] %{py_libdir}/__pycache__/copyreg.cpython-*.py[co] +%{py_libdir}/__pycache__/enum.cpython-*.py[co] %{py_libdir}/__pycache__/functools.cpython-*.py[co] %{py_libdir}/__pycache__/genericpath.cpython-*.py[co] %{py_libdir}/__pycache__/heapq.cpython-*.py[co] @@ -796,7 +798,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/dis.py %{py_libdir}/doctest.py %{py_libdir}/dummy_threading.py -%{py_libdir}/enum.py %{py_libdir}/filecmp.py %{py_libdir}/fileinput.py %{py_libdir}/fnmatch.py @@ -930,7 +931,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/dis.cpython-*.py[co] %{py_libdir}/__pycache__/doctest.cpython-*.py[co] %{py_libdir}/__pycache__/dummy_threading.cpython-*.py[co] -%{py_libdir}/__pycache__/enum.cpython-*.py[co] %{py_libdir}/__pycache__/filecmp.cpython-*.py[co] %{py_libdir}/__pycache__/fileinput.cpython-*.py[co] %{py_libdir}/__pycache__/fnmatch.cpython-*.py[co] From 5d4906318e56be0bf7cf8a348787c983b19cadb7 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Mon, 18 Jun 2018 05:35:23 +0200 Subject: [PATCH 075/180] - release 3 (rebuild with gdbm 1.15) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 489fcec..3da5ed6 100644 --- a/python3.spec +++ b/python3.spec @@ -39,7 +39,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.5 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Development/Languages/Python From 8801c9a4d7acb854cf63e514b3a45d2eea05506d Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Mon, 18 Jun 2018 17:24:49 +0200 Subject: [PATCH 076/180] - max_db_ver up to 6.2 --- python3-db.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3-db.patch b/python3-db.patch index f986f77..5674108 100644 --- a/python3-db.patch +++ b/python3-db.patch @@ -5,7 +5,7 @@ # versions of BerkeleyDB already installed. - max_db_ver = (5, 3) -+ max_db_ver = (6, 1) ++ max_db_ver = (6, 2) min_db_ver = (3, 3) db_setup_debug = False # verbose debug prints from this script? From 514c1496b1e51a714428fa809e27b9b055455136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 28 Jun 2018 11:38:17 +0200 Subject: [PATCH 077/180] - started playing with python 3.7 --- python3-ac_fixes.patch | 7 +++-- python3-multilib.patch | 57 ++++++++++++++++++++-------------------- python3-pythonpath.patch | 28 +------------------- python3.spec | 15 +++++------ 4 files changed, 39 insertions(+), 68 deletions(-) diff --git a/python3-ac_fixes.patch b/python3-ac_fixes.patch index b005cdd..36e3783 100644 --- a/python3-ac_fixes.patch +++ b/python3-ac_fixes.patch @@ -1,6 +1,6 @@ --- Python-3.6.2/configure.ac~ 2017-07-08 05:33:27.000000000 +0200 +++ Python-3.6.2/configure.ac 2017-08-07 10:28:44.498951134 +0200 -@@ -1494,26 +1494,7 @@ then +@@ -1485,25 +1485,6 @@ then CFLAGS_ALIASING="-fno-strict-aliasing" fi @@ -23,8 +23,7 @@ - ;; - esac - -- OPT="$OPT $STRICT_PROTO" -+ OPT="$OPT $CPPFLAGS $CFLAGS $STRICT_PROTO" - case $ac_sys_system in SCO_SV*) OPT="$OPT -m486 -DSCO5" + ;; + diff --git a/python3-multilib.patch b/python3-multilib.patch index 5a9d38f..4898f2b 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -74,7 +74,7 @@ diff -dur Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib diff -dur Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py --- Python-3.5.0.orig/Lib/site.py 2015-09-13 13:41:21.000000000 +0200 +++ Python-3.5.0/Lib/site.py 2015-12-03 17:31:03.874280444 +0100 -@@ -304,12 +304,14 @@ def getsitepackages(prefixes=None): +@@ -334,12 +334,14 @@ def getsitepackages(prefixes=None): seen.add(prefix) if os.sep == '/': @@ -88,9 +88,9 @@ diff -dur Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py sitepackages.append(prefix) - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) + sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) - if sys.platform == "darwin": - # for framework builds *only* we add the standard Apple - # locations. + return sitepackages + + def addsitepackages(known_paths, prefixes=None): diff -dur Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py --- Python-3.5.0.orig/Lib/sysconfig.py 2015-09-13 13:41:21.000000000 +0200 +++ Python-3.5.0/Lib/sysconfig.py 2015-12-03 17:31:51.974741432 +0100 @@ -182,14 +182,15 @@ diff -dur Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in Python/importdl.o: $(srcdir)/Python/importdl.c $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c -@@ -1362,8 +1364,8 @@ +@@ -1470,9 +1470,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf + @if test -d $(LIBRARY); then :; else \ + if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ if test "$(SHLIB_SUFFIX)" = .dll; then \ - $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ +- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ ++ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \ else \ - $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ -- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ + $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ -+ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ fi; \ else \ echo Skip install of $(LIBRARY) - use make frameworkinstall; \ @@ -214,24 +215,24 @@ diff -dur Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c #if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH) #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" -@@ -511,7 +523,7 @@ - _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); - _prefix = Py_DecodeLocale(PREFIX, NULL); - _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); -- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL); -+ lib_python = Py_DecodeLocale(LIB_PYTHON VERSION, NULL); +@@ -753,7 +753,7 @@ calculate_zip_path(PyCalculatePath *calc + else { + wcsncpy(calculate->zip_path, calculate->prefix, MAXPATHLEN); + } +- joinpath(calculate->zip_path, L"lib/python00.zip"); ++ joinpath(calculate->zip_path, L"" LIB_PYTHON "00.zip"); - if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { - Py_FatalError( -@@ -700,7 +712,7 @@ + /* Replace "00" with version */ + size_t bufsz = wcslen(calculate->zip_path); +@@ -878,7 +878,7 @@ calculate_init(PyCalculatePath *calculat + if (!calculate->prefix) { + return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); + } +- calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len); ++ calculate->lib_python = Py_DecodeLocale(LIB_PYTHON VERSION, &len); + if (!calculate->lib_python) { + return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); } - else - wcsncpy(zip_path, _prefix, MAXPATHLEN); -- joinpath(zip_path, L"lib/python00.zip"); -+ joinpath(zip_path, L"" LIB_PYTHON "00.zip"); - bufsz = wcslen(zip_path); /* Replace "00" with version */ - zip_path[bufsz - 6] = VERSION[0]; - zip_path[bufsz - 5] = VERSION[2]; diff -dur Python-3.5.0.orig/Python/getplatform.c Python-3.5.0/Python/getplatform.c --- Python-3.5.0.orig/Python/getplatform.c 2015-09-13 13:41:26.000000000 +0200 +++ Python-3.5.0/Python/getplatform.c 2015-12-03 17:31:03.874280444 +0100 @@ -262,7 +263,7 @@ diff -dur Python-3.5.0.orig/Python/getplatform.c Python-3.5.0/Python/getplatform diff -dur Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c --- Python-3.5.0.orig/Python/sysmodule.c 2015-09-13 13:41:26.000000000 +0200 +++ Python-3.5.0/Python/sysmodule.c 2015-12-03 17:31:03.874280444 +0100 -@@ -1767,6 +1767,10 @@ +@@ -2307,6 +2307,10 @@ _PySys_BeginInit(PyObject **sysmod) PyUnicode_FromString(Py_GetCopyright())); SET_SYS_FROM_STRING("platform", PyUnicode_FromString(Py_GetPlatform())); @@ -270,9 +271,9 @@ diff -dur Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c + PyUnicode_FromString(Py_GetArch())); + SET_SYS_FROM_STRING("lib", + PyUnicode_FromString(Py_GetLib())); - SET_SYS_FROM_STRING("executable", - PyUnicode_FromWideChar( - Py_GetProgramFullPath(), -1)); + SET_SYS_FROM_STRING("maxsize", + PyLong_FromSsize_t(PY_SSIZE_T_MAX)); + SET_SYS_FROM_STRING("float_info", diff -dur Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac --- Python-3.5.0.orig/configure.ac 2015-12-03 17:30:32.777292009 +0100 +++ Python-3.5.0/configure.ac 2015-12-03 17:31:03.877613811 +0100 diff --git a/python3-pythonpath.patch b/python3-pythonpath.patch index 69be183..1342158 100644 --- a/python3-pythonpath.patch +++ b/python3-pythonpath.patch @@ -31,30 +31,4 @@ # intentionally NOT "/usr/bin/env python". On many systems # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI # scripts, and /usr/local/bin is the default directory where Python is ---- Python-3.0.1/Tools/pybench/pybench.py.wiget 2009-02-07 18:28:46.000000000 +0100 -+++ Python-3.0.1/Tools/pybench/pybench.py 2009-03-14 18:12:32.000000000 +0100 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/python -O -+#!/usr/bin/python3 -O - - """ A Python Benchmark Suite - ---- Python-3.0.1/Tools/scripts/fixps.py.wiget 2007-08-03 19:06:41.000000000 +0200 -+++ Python-3.0.1/Tools/scripts/fixps.py 2009-03-14 18:12:32.000000000 +0100 -@@ -15,13 +15,13 @@ def main(): - print(filename, ': can\'t open :', msg) - continue - line = f.readline() -- if not re.match('^#! */usr/local/bin/python', line): -- print(filename, ': not a /usr/local/bin/python script') -+ if not re.match('^#! */usr/bin/python3', line): -+ print(filename, ': not a /usr/bin/python3 script') - f.close() - continue - rest = f.read() - f.close() -- line = re.sub('/usr/local/bin/python', -+ line = re.sub('/usr/bin/python3', - '/usr/bin/env python', line) - print(filename, ':', repr(line)) - f = open(filename, "w") + diff --git a/python3.spec b/python3.spec index 3da5ed6..5e875ff 100644 --- a/python3.spec +++ b/python3.spec @@ -20,7 +20,7 @@ %endif %define broken_tests test_nntplib test_gdb test_site test_ssl %{?broken_tests_x32} -%define py_ver 3.6 +%define py_ver 3.7 %define py_abi %{py_ver}m %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_gnu} %define py_prefix %{_prefix} @@ -38,13 +38,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.5 -Release: 3 +Version: %{py_ver}.0 +Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 9f49654a4d6f733ff3284ab9d227e9fd +# Source0-md5: eb8c2a6b1447d50813c02714af4681f3 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -487,10 +487,9 @@ Moduły testowe dla Pythona. %patch11 -p1 %patch12 -p1 -%{__rm} -r Modules/zlib %{__rm} -r Modules/expat -for SUBDIR in darwin libffi libffi_msvc libffi_osx; do +for SUBDIR in darwin libffi_msvc libffi_osx; do %{__rm} -r Modules/_ctypes/$SUBDIR/* done @@ -526,12 +525,10 @@ fi --with-dbmliborder=gdbm:ndbm:bdb \ --with-doc-strings \ --without-ensurepip \ - --with-fpectl \ %{?with_debug:--with-pydebug} \ --with-system-expat \ --with-system-ffi \ - %{?with_system_mpdecimal:--with-system-libmpdec} \ - --with-threads + %{?with_system_mpdecimal:--with-system-libmpdec} %{__make} 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } From b592c0a27c25e0a01fdee529308852b9ca8b0fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 29 Jun 2018 08:36:47 +0200 Subject: [PATCH 078/180] - enable optimizations and lto; fix files --- python3-tests_with_pythonpath.patch | 10 ++++++++++ python3.spec | 20 ++++++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index 84696f4..d2bc777 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -1,3 +1,13 @@ +--- Python-3.7.0/Lib/test/test_asyncio/test_tasks.py~ 2018-06-28 20:51:03.000000000 +0200 ++++ Python-3.7.0/Lib/test/test_asyncio/test_tasks.py 2018-06-28 21:01:38.756365097 +0200 +@@ -6,6 +6,7 @@ import contextvars + import functools + import gc + import io ++import os + import random + import re + import sys diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_asyncio/test_tasks.py Python-3.5.0/Lib/test/test_asyncio/test_tasks.py --- Python-3.5.0.orig/Lib/test/test_asyncio/test_tasks.py 2015-09-13 13:41:23.000000000 +0200 +++ Python-3.5.0/Lib/test/test_asyncio/test_tasks.py 2015-12-03 18:35:52.223668265 +0100 diff --git a/python3.spec b/python3.spec index 5e875ff..bd10c09 100644 --- a/python3.spec +++ b/python3.spec @@ -5,6 +5,7 @@ %bcond_without tkinter # disables tkinter module building %bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode +%bcond_without optimizations # optimitations # # tests which will not work on 64-bit platforms %define no64bit_tests test_audioop test_rgbimg test_imageop @@ -528,7 +529,11 @@ fi %{?with_debug:--with-pydebug} \ --with-system-expat \ --with-system-ffi \ - %{?with_system_mpdecimal:--with-system-libmpdec} + %{?with_system_mpdecimal:--with-system-libmpdec} \ +%if %{with optimizations} + --enable-optimizations \ + --with-lto +%endif %{__make} 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } @@ -743,7 +748,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/config-%{py_platform} %{py_libdir}/config-%{py_platform}/Makefile %{py_libdir}/config-%{py_platform}/Setup -%{py_libdir}/config-%{py_platform}/Setup.config %{py_libdir}/config-%{py_platform}/Setup.local %{py_libdir}/config-%{py_platform}/pyconfig.h @@ -761,6 +765,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/_markupbase.py %{py_libdir}/_osx_support.py %{py_libdir}/_pydecimal.py +%{py_libdir}/_py_abc.py %{py_libdir}/_pyio.py %{py_libdir}/_strptime.py %{py_libdir}/_threading_local.py @@ -786,9 +791,11 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/compileall.py %{py_libdir}/configparser.py %{py_libdir}/contextlib.py +%{py_libdir}/contextvars.py %{py_libdir}/copy.py %{py_libdir}/crypt.py %{py_libdir}/csv.py +%{py_libdir}/dataclasses.py %{py_libdir}/datetime.py %{py_libdir}/decimal.py %{py_libdir}/difflib.py @@ -815,7 +822,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/ipaddress.py %{py_libdir}/lzma.py %{py_libdir}/macpath.py -%{py_libdir}/macurl2path.py %{py_libdir}/mailbox.py %{py_libdir}/mailcap.py %{py_libdir}/mimetypes.py @@ -894,6 +900,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/_markupbase.cpython-*.py[co] %{py_libdir}/__pycache__/_osx_support.cpython-*.py[co] %{py_libdir}/__pycache__/_pydecimal.cpython-*.py[co] +%{py_libdir}/__pycache__/_py_abc.cpython-*.py[co] %{py_libdir}/__pycache__/_pyio.cpython-*.py[co] %{py_libdir}/__pycache__/_strptime.cpython-*.py[co] %{py_libdir}/__pycache__/_threading_local.cpython-*.py[co] @@ -913,6 +920,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/cgitb.cpython-*.py[co] %{py_libdir}/__pycache__/chunk.cpython-*.py[co] %{py_libdir}/__pycache__/cmd.cpython-*.py[co] +%{py_libdir}/__pycache__/contextvars.cpython-*.py[co] %{py_libdir}/__pycache__/code.cpython-*.py[co] %{py_libdir}/__pycache__/codeop.cpython-*.py[co] %{py_libdir}/__pycache__/colorsys.cpython-*.py[co] @@ -922,6 +930,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/copy.cpython-*.py[co] %{py_libdir}/__pycache__/crypt.cpython-*.py[co] %{py_libdir}/__pycache__/csv.cpython-*.py[co] +%{py_libdir}/__pycache__/dataclasses.cpython-*.py[co] %{py_libdir}/__pycache__/datetime.cpython-*.py[co] %{py_libdir}/__pycache__/decimal.cpython-*.py[co] %{py_libdir}/__pycache__/difflib.cpython-*.py[co] @@ -948,7 +957,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/ipaddress.cpython-*.py[co] %{py_libdir}/__pycache__/lzma.cpython-*.py[co] %{py_libdir}/__pycache__/macpath.cpython-*.py[co] -%{py_libdir}/__pycache__/macurl2path.cpython-*.py[co] %{py_libdir}/__pycache__/mailbox.cpython-*.py[co] %{py_libdir}/__pycache__/mailcap.cpython-*.py[co] %{py_libdir}/__pycache__/mimetypes.cpython-*.py[co] @@ -1033,6 +1041,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_codecs_jp.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_kr.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_tw.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_contextvars.cpython-*.so %attr(755,root,root) %{py_dyndir}/_crypt.cpython-*.so %attr(755,root,root) %{py_dyndir}/_csv.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ctypes*.cpython-*.so @@ -1056,6 +1065,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_opcode.cpython-*.so %attr(755,root,root) %{py_dyndir}/_pickle.cpython-*.so %attr(755,root,root) %{py_dyndir}/_posixsubprocess.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_queue.cpython-*.so %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha1.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha3.cpython-*.so @@ -1065,6 +1075,8 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_uuid.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_xxtestfuzz.cpython-*.so # for openssl < 0.9.8 package sha256 and sha512 modules %if "%{pld_release}" != "ac" From a2b17ec1268b6111f4d44e4651047edb65e91ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 29 Jun 2018 11:10:32 +0200 Subject: [PATCH 079/180] - rel 1; test suite passes now --- nonexistent_user.patch | 44 ++++++++++++++++++++++++++++++++++++++++++ python3.spec | 15 +++++++------- 2 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 nonexistent_user.patch diff --git a/nonexistent_user.patch b/nonexistent_user.patch new file mode 100644 index 0000000..7a811e7 --- /dev/null +++ b/nonexistent_user.patch @@ -0,0 +1,44 @@ +diff --git a/Lib/site.py b/Lib/site.py +--- a/Lib/site.py ++++ b/Lib/site.py +@@ -262,7 +266,7 @@ def addusersitepackages(known_paths): + # this call will also make sure USER_BASE and USER_SITE are set + user_site = getusersitepackages() + +- if ENABLE_USER_SITE and os.path.isdir(user_site): ++ if ENABLE_USER_SITE and user_site and os.path.isdir(user_site): + addsitedir(user_site, known_paths) + return known_paths + +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -170,7 +170,13 @@ def _expand_vars(scheme, vars): + for key, value in _INSTALL_SCHEMES[scheme].items(): + if os.name in ('posix', 'nt'): + value = os.path.expanduser(value) +- res[key] = os.path.normpath(_subst_vars(value, vars)) ++ try: ++ path = _subst_vars(value, vars) ++ except AttributeError: ++ # a substitution variable doesn't exist (eg. '{userbase}'), ++ # don't create the variable ++ continue ++ res[key] = os.path.normpath(path) + return res + + def _get_default_scheme(): +@@ -488,7 +494,12 @@ def get_config_vars(*args): + # Setting 'userbase' is done below the call to the + # init function to enable using 'get_config_var' in + # the init-function. +- _CONFIG_VARS['userbase'] = _getuserbase() ++ try: ++ _CONFIG_VARS['userbase'] = _getuserbase() ++ except KeyError: ++ # catch getpwuid() error: don't create the variable if the user ++ # doesn't exist ++ pass + + if 'srcdir' not in _CONFIG_VARS: + _CONFIG_VARS['srcdir'] = _PROJECT_BASE diff --git a/python3.spec b/python3.spec index bd10c09..f8a4644 100644 --- a/python3.spec +++ b/python3.spec @@ -19,7 +19,7 @@ %ifarch x32 %define broken_tests_x32 test_time %endif -%define broken_tests test_nntplib test_gdb test_site test_ssl %{?broken_tests_x32} +%define broken_tests test_nntplib test_gdb test_site test_distutils test_bdist_rpm test_ssl %{?broken_tests_x32} %define py_ver 3.7 %define py_abi %{py_ver}m @@ -40,7 +40,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 0.1 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -58,8 +58,9 @@ Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch Patch10: %{name}-bdist_rpm.patch Patch11: %{name}-installcompile.patch -Patch12: https://bugs.python.org/file21896/nonexistent_user.patch -# Patch12-md5: db706fbe6de467c6e4c97c675eddf29a +# https://bugs.python.org/file21896/nonexistent_user.patch +Patch12: nonexistent_user.patch +Patch13: python3-no-randomize-tests.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -97,7 +98,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %if %{with verbose_tests} %define test_flags -v -x %else -%define test_flags -w -x +%define test_flags -wW -x %endif %ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664} @@ -487,6 +488,7 @@ Moduły testowe dla Pythona. %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %{__rm} -r Modules/expat @@ -552,8 +554,7 @@ export LC_ALL binlibdir=`echo build/lib.*` # -l and -j don't go together! and -j is brought up by Tools/scripts/run_tests.py WITHIN_PYTHON_RPM_BUILD=1 %{__make} test \ - TESTOPTS="%{test_flags} %{test_list}" \ - TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/$binlibdir ./python -tt" + TESTOPTS="%{test_flags} %{test_list}" %endif %install From 80f122a57d1a3442c83f61e733bb9341c1b846cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 29 Jun 2018 11:23:42 +0200 Subject: [PATCH 080/180] - patch added --- python3-no-randomize-tests.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 python3-no-randomize-tests.patch diff --git a/python3-no-randomize-tests.patch b/python3-no-randomize-tests.patch new file mode 100644 index 0000000..a3f2c0e --- /dev/null +++ b/python3-no-randomize-tests.patch @@ -0,0 +1,10 @@ +--- ./Tools/scripts/run_tests.py~ 2018-06-27 05:07:35.000000000 +0200 ++++ ./Tools/scripts/run_tests.py 2018-06-29 09:40:05.838625461 +0200 +@@ -31,7 +31,6 @@ def main(regrtest_args): + args.extend(test.support.args_from_interpreter_flags()) + + args.extend(['-m', 'test', # Run the test suite +- '-r', # Randomize test order + '-w', # Re-run failed tests in verbose mode + ]) + if sys.platform == 'win32': From d47b1d9ad9da6c856ccce3d101714efd1d595e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 1 Jul 2018 11:09:34 +0200 Subject: [PATCH 081/180] - use -j1 for tests; use utf8 locale (not strictly needed) --- python3.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python3.spec b/python3.spec index f8a4644..2f10766 100644 --- a/python3.spec +++ b/python3.spec @@ -548,12 +548,10 @@ BEGIN { fail = 0; logmsg = ""; } } END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }' -LC_ALL=C +LC_ALL=C.UTF-8 export LC_ALL %if %{with tests} -binlibdir=`echo build/lib.*` -# -l and -j don't go together! and -j is brought up by Tools/scripts/run_tests.py -WITHIN_PYTHON_RPM_BUILD=1 %{__make} test \ +WITHIN_PYTHON_RPM_BUILD=1 %{__make} -j1 test \ TESTOPTS="%{test_flags} %{test_list}" %endif From ae91e2fb3822a03e546923f20f8f96cb9954529a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 1 Jul 2018 13:15:11 +0200 Subject: [PATCH 082/180] - rel 2; disable optimizations on x32 (pgo build hangs) --- python3.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 2f10766..d525089 100644 --- a/python3.spec +++ b/python3.spec @@ -18,6 +18,7 @@ # test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error %ifarch x32 %define broken_tests_x32 test_time +%undefine with_optimizations %endif %define broken_tests test_nntplib test_gdb test_site test_distutils test_bdist_rpm test_ssl %{?broken_tests_x32} @@ -40,7 +41,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python From 16d2c1b748cb3a850e8d6b76029052a3aafbc0ce Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Wed, 11 Jul 2018 20:51:43 +0200 Subject: [PATCH 083/180] - more informative description for optimizations bcond --- python3.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index d525089..26aad2e 100644 --- a/python3.spec +++ b/python3.spec @@ -1,3 +1,4 @@ +# NOTE: tests require processes limit >128 (256 is sufficient) # # Conditional build: %bcond_with info # info pages (requires emacs) @@ -5,7 +6,7 @@ %bcond_without tkinter # disables tkinter module building %bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode -%bcond_without optimizations # optimitations +%bcond_without optimizations # expensive, stable optimizations (PGO etc.) + LTO # # tests which will not work on 64-bit platforms %define no64bit_tests test_audioop test_rgbimg test_imageop @@ -72,6 +73,9 @@ BuildRequires: db-devel >= 4 BuildRequires: expat-devel >= 1:1.95.7 BuildRequires: file BuildRequires: gdbm-devel >= 1.8.3 +%if %(locale -a | grep -q '^C\.utf8$'; echo $?) +BuildRequires: glibc-localedb-all +%endif BuildRequires: gmp-devel >= 4.0 BuildRequires: libffi-devel BuildRequires: libstdc++-devel From 0c593ec934f9107f78d9c620618178e570a6bc7e Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 17 Jul 2018 21:53:47 +0200 Subject: [PATCH 084/180] - added redundant_declaration patch (kill warning caused by import.h header); release 3 --- python3-redundant_declaration.patch | 28 ++++++++++++++++++++++++++++ python3.spec | 7 +++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 python3-redundant_declaration.patch diff --git a/python3-redundant_declaration.patch b/python3-redundant_declaration.patch new file mode 100644 index 0000000..34af370 --- /dev/null +++ b/python3-redundant_declaration.patch @@ -0,0 +1,28 @@ +From c919252a28f4e9dd326dc2c703b4eee6e247be83 Mon Sep 17 00:00:00 2001 +From: "Miss Islington (bot)" + <31488909+miss-islington@users.noreply.github.com> +Date: Fri, 29 Jun 2018 16:03:07 -0700 +Subject: [PATCH] Fix redundant declaration of _PyImport_AddModuleObject + (GH-7992) + +(cherry picked from commit f874bd1f0630644f3e3faaa2d51e6749465c70bd) + +Co-authored-by: Jeremy Cline +--- + Include/import.h | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Include/import.h b/Include/import.h +index 13f32a1004cf..c664803478a5 100644 +--- a/Include/import.h ++++ b/Include/import.h +@@ -54,9 +54,6 @@ PyAPI_FUNC(PyObject *) PyImport_AddModuleObject( + PyObject *name + ); + #endif +-#ifndef Py_LIMITED_API +-PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *, PyObject *); +-#endif + PyAPI_FUNC(PyObject *) PyImport_AddModule( + const char *name /* UTF-8 encoded string */ + ); diff --git a/python3.spec b/python3.spec index 26aad2e..300f6f5 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -62,7 +62,9 @@ Patch10: %{name}-bdist_rpm.patch Patch11: %{name}-installcompile.patch # https://bugs.python.org/file21896/nonexistent_user.patch Patch12: nonexistent_user.patch -Patch13: python3-no-randomize-tests.patch +Patch13: %{name}-no-randomize-tests.patch +# https://github.com/python/cpython/commit/c919252a28f4e9dd326dc2c703b4eee6e247be83.patch +Patch14: %{name}-redundant_declaration.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -494,6 +496,7 @@ Moduły testowe dla Pythona. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %{__rm} -r Modules/expat From bf3ea4a9cf3315facc5de21c77107b1c000858fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 14 Sep 2018 07:11:05 +0200 Subject: [PATCH 085/180] - release 4 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 300f6f5..c3bf6d6 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.0 -Release: 3 +Release: 4 Epoch: 1 License: PSF Group: Development/Languages/Python From 31f22d7ccfe12485dbacc45a5bb9a359d44d00a7 Mon Sep 17 00:00:00 2001 From: Adam Osuchowski Date: Fri, 21 Sep 2018 13:57:47 +0200 Subject: [PATCH 086/180] - shell aliases commented-out by default --- python3.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index c3bf6d6..7681a48 100644 --- a/python3.spec +++ b/python3.spec @@ -592,10 +592,10 @@ ln -s libpython%{py_abi}.so $RPM_BUILD_ROOT%{_libdir}/libpython3.so # for python devel tools for script in timeit profile pdb pstats; do - echo "alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'" + echo "#alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'" done > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.sh -echo "alias pygettext%{py_ver}.py='pygettext%{py_ver}'" \ +echo "#alias pygettext%{py_ver}.py='pygettext%{py_ver}'" \ >> $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.sh sed 's/=/ /' \ @@ -604,7 +604,7 @@ sed 's/=/ /' \ # for python modules for script in smtpd webbrowser; do - echo "alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'" + echo "#alias ${script}%{py_ver}.py='python%{py_ver} -m ${script}'" done > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-modules.sh sed 's/=/ /' \ From e6d5ff00e4ad0971ac45baf1a2849b275fbe1994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 7 Nov 2018 20:35:09 +0100 Subject: [PATCH 087/180] - up to 3.7.1 --- python3-redundant_declaration.patch | 28 ---------------------------- python3.spec | 9 +++------ 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 python3-redundant_declaration.patch diff --git a/python3-redundant_declaration.patch b/python3-redundant_declaration.patch deleted file mode 100644 index 34af370..0000000 --- a/python3-redundant_declaration.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c919252a28f4e9dd326dc2c703b4eee6e247be83 Mon Sep 17 00:00:00 2001 -From: "Miss Islington (bot)" - <31488909+miss-islington@users.noreply.github.com> -Date: Fri, 29 Jun 2018 16:03:07 -0700 -Subject: [PATCH] Fix redundant declaration of _PyImport_AddModuleObject - (GH-7992) - -(cherry picked from commit f874bd1f0630644f3e3faaa2d51e6749465c70bd) - -Co-authored-by: Jeremy Cline ---- - Include/import.h | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/Include/import.h b/Include/import.h -index 13f32a1004cf..c664803478a5 100644 ---- a/Include/import.h -+++ b/Include/import.h -@@ -54,9 +54,6 @@ PyAPI_FUNC(PyObject *) PyImport_AddModuleObject( - PyObject *name - ); - #endif --#ifndef Py_LIMITED_API --PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *, PyObject *); --#endif - PyAPI_FUNC(PyObject *) PyImport_AddModule( - const char *name /* UTF-8 encoded string */ - ); diff --git a/python3.spec b/python3.spec index 7681a48..b556804 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.0 -Release: 4 +Version: %{py_ver}.1 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: eb8c2a6b1447d50813c02714af4681f3 +# Source0-md5: 0a57e9022c07fad3dadb2eef58568edb Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -63,8 +63,6 @@ Patch11: %{name}-installcompile.patch # https://bugs.python.org/file21896/nonexistent_user.patch Patch12: nonexistent_user.patch Patch13: %{name}-no-randomize-tests.patch -# https://github.com/python/cpython/commit/c919252a28f4e9dd326dc2c703b4eee6e247be83.patch -Patch14: %{name}-redundant_declaration.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -496,7 +494,6 @@ Moduły testowe dla Pythona. %patch11 -p1 %patch12 -p1 %patch13 -p1 -%patch14 -p1 %{__rm} -r Modules/expat From edb753bc170e4f5473adf35ca8c21dd67a692a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 12 Nov 2018 12:30:51 +0100 Subject: [PATCH 088/180] - rel 2; install gdb helper so gdb functions like py-bt (nice pythonised backtrace) work --- python3.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index b556804..2b13514 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.1 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -566,7 +566,8 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pkgconfigdir}} \ $RPM_BUILD_ROOT{%{py_sitedir},%{py_sitescriptdir}}/__pycache__ \ $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \ $RPM_BUILD_ROOT{%{_infodir},%{_mandir}/man1} \ - $RPM_BUILD_ROOT/etc/shrc.d + $RPM_BUILD_ROOT/etc/shrc.d \ + $RPM_BUILD_ROOT%{_prefix}/lib/debug/%{_libdir} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT @@ -583,6 +584,10 @@ cp -a Tools $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpython3.so ln -s libpython%{py_abi}.so $RPM_BUILD_ROOT%{_libdir}/libpython3.so +# gdb helper that will end up in -debuginfo package +soname=$(ls -1d $RPM_BUILD_ROOT%{_libdir}/libpython%{py_abi}.so.*.* | sed -e "s#^$RPM_BUILD_ROOT##g") +cp -a Tools/gdb/libpython.py "$RPM_BUILD_ROOT%{_prefix}/lib/debug/$soname-gdb.py" + # # create several useful aliases, such as timeit.py, profile.py, pdb.py, smtpd.py # From 9f8847fee332d7d1b86e23b0756386e75395782c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 16 Nov 2018 21:00:59 +0100 Subject: [PATCH 089/180] - rel 3; few crash fixes from git --- git.patch | 613 +++++++++++++++++++++++++++++++++++++++++++++++++++ python3.spec | 4 +- 2 files changed, 616 insertions(+), 1 deletion(-) create mode 100644 git.patch diff --git a/git.patch b/git.patch new file mode 100644 index 0000000..c537275 --- /dev/null +++ b/git.patch @@ -0,0 +1,613 @@ +commit 4ec9f64e07c8f397ad6699f8b99843846c219588 +Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> +Date: Fri Oct 19 16:14:42 2018 -0700 + + bpo-34824: Fix a possible NULL pointer dereference in _ssl.c (GH-9606) (GH-9743) + + On failure, _PyBytes_Resize() will deallocate the bytes object and set + "result" to NULL. + + https://bugs.python.org/issue34824 + (cherry picked from commit 365ad2ead5bbaf7a3b18648ffa36e819559d3f75) + + Co-authored-by: Zackery Spytz + +diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-09-27-11-10-02.bpo-34824.VLlCaU.rst b/Misc/NEWS.d/next/Core and Builtins/2018-09-27-11-10-02.bpo-34824.VLlCaU.rst +new file mode 100644 +index 0000000000..fe95b8973c +--- /dev/null ++++ b/Misc/NEWS.d/next/Core and Builtins/2018-09-27-11-10-02.bpo-34824.VLlCaU.rst +@@ -0,0 +1,2 @@ ++Fix a possible null pointer dereference in Modules/_ssl.c. Patch by Zackery ++Spytz. +diff --git a/Modules/_ssl.c b/Modules/_ssl.c +index 4253e2a772..f9d1b8c308 100644 +--- a/Modules/_ssl.c ++++ b/Modules/_ssl.c +@@ -4711,12 +4711,17 @@ _ssl_MemoryBIO_read_impl(PySSLMemoryBIO *self, int len) + return result; + + nbytes = BIO_read(self->bio, PyBytes_AS_STRING(result), len); +- /* There should never be any short reads but check anyway. */ +- if ((nbytes < len) && (_PyBytes_Resize(&result, len) < 0)) { ++ if (nbytes < 0) { + Py_DECREF(result); ++ _setSSLError(NULL, 0, __FILE__, __LINE__); + return NULL; + } + ++ /* There should never be any short reads but check anyway. */ ++ if (nbytes < len) { ++ _PyBytes_Resize(&result, nbytes); ++ } ++ + return result; + } + +commit 7f34d550231e047c88a1817b58bda03a33817490 +Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> +Date: Sun Oct 21 05:55:52 2018 -0700 + + bpo-34973: Fix crash in bytes constructor. (GH-9841) + + + Constructing bytes from mutating list could cause a crash. + (cherry picked from commit 914f9a078f997e58cfcfabcbb30fafdd1f277bef) + + Co-authored-by: Serhiy Storchaka + +diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py +index b9c5b628c4..145411efbb 100644 +--- a/Lib/test/test_bytes.py ++++ b/Lib/test/test_bytes.py +@@ -113,6 +113,23 @@ class BaseBytesTest: + b = self.type2test([1, 2, 3]) + self.assertEqual(b, b"\x01\x02\x03") + ++ def test_from_mutating_list(self): ++ # Issue #34973: Crash in bytes constructor with mutating list. ++ class X: ++ def __index__(self): ++ a.clear() ++ return 42 ++ a = [X(), X()] ++ self.assertEqual(bytes(a), b'*') ++ ++ class Y: ++ def __index__(self): ++ if len(a) < 1000: ++ a.append(self) ++ return 42 ++ a = [Y()] ++ self.assertEqual(bytes(a), b'*' * 1000) # should not crash ++ + def test_from_index(self): + b = self.type2test([Indexable(), Indexable(1), Indexable(254), + Indexable(255)]) +diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-10-13-16-42-03.bpo-34973.B5M-3g.rst b/Misc/NEWS.d/next/Core and Builtins/2018-10-13-16-42-03.bpo-34973.B5M-3g.rst +new file mode 100644 +index 0000000000..6e403cd4ce +--- /dev/null ++++ b/Misc/NEWS.d/next/Core and Builtins/2018-10-13-16-42-03.bpo-34973.B5M-3g.rst +@@ -0,0 +1,2 @@ ++Fixed crash in :func:`bytes` when the :class:`list` argument is mutated ++while it is iterated. +diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c +index 5b62842093..711faba645 100644 +--- a/Objects/bytesobject.c ++++ b/Objects/bytesobject.c +@@ -2640,49 +2640,83 @@ fail: + return NULL; + } + +-#define _PyBytes_FROM_LIST_BODY(x, GET_ITEM) \ +- do { \ +- PyObject *bytes; \ +- Py_ssize_t i; \ +- Py_ssize_t value; \ +- char *str; \ +- PyObject *item; \ +- \ +- bytes = PyBytes_FromStringAndSize(NULL, Py_SIZE(x)); \ +- if (bytes == NULL) \ +- return NULL; \ +- str = ((PyBytesObject *)bytes)->ob_sval; \ +- \ +- for (i = 0; i < Py_SIZE(x); i++) { \ +- item = GET_ITEM((x), i); \ +- value = PyNumber_AsSsize_t(item, NULL); \ +- if (value == -1 && PyErr_Occurred()) \ +- goto error; \ +- \ +- if (value < 0 || value >= 256) { \ +- PyErr_SetString(PyExc_ValueError, \ +- "bytes must be in range(0, 256)"); \ +- goto error; \ +- } \ +- *str++ = (char) value; \ +- } \ +- return bytes; \ +- \ +- error: \ +- Py_DECREF(bytes); \ +- return NULL; \ +- } while (0) +- + static PyObject* + _PyBytes_FromList(PyObject *x) + { +- _PyBytes_FROM_LIST_BODY(x, PyList_GET_ITEM); ++ Py_ssize_t i, size = PyList_GET_SIZE(x); ++ Py_ssize_t value; ++ char *str; ++ PyObject *item; ++ _PyBytesWriter writer; ++ ++ _PyBytesWriter_Init(&writer); ++ str = _PyBytesWriter_Alloc(&writer, size); ++ if (str == NULL) ++ return NULL; ++ writer.overallocate = 1; ++ size = writer.allocated; ++ ++ for (i = 0; i < PyList_GET_SIZE(x); i++) { ++ item = PyList_GET_ITEM(x, i); ++ Py_INCREF(item); ++ value = PyNumber_AsSsize_t(item, NULL); ++ Py_DECREF(item); ++ if (value == -1 && PyErr_Occurred()) ++ goto error; ++ ++ if (value < 0 || value >= 256) { ++ PyErr_SetString(PyExc_ValueError, ++ "bytes must be in range(0, 256)"); ++ goto error; ++ } ++ ++ if (i >= size) { ++ str = _PyBytesWriter_Resize(&writer, str, size+1); ++ if (str == NULL) ++ return NULL; ++ size = writer.allocated; ++ } ++ *str++ = (char) value; ++ } ++ return _PyBytesWriter_Finish(&writer, str); ++ ++ error: ++ _PyBytesWriter_Dealloc(&writer); ++ return NULL; + } + + static PyObject* + _PyBytes_FromTuple(PyObject *x) + { +- _PyBytes_FROM_LIST_BODY(x, PyTuple_GET_ITEM); ++ PyObject *bytes; ++ Py_ssize_t i, size = PyTuple_GET_SIZE(x); ++ Py_ssize_t value; ++ char *str; ++ PyObject *item; ++ ++ bytes = PyBytes_FromStringAndSize(NULL, size); ++ if (bytes == NULL) ++ return NULL; ++ str = ((PyBytesObject *)bytes)->ob_sval; ++ ++ for (i = 0; i < size; i++) { ++ item = PyTuple_GET_ITEM(x, i); ++ value = PyNumber_AsSsize_t(item, NULL); ++ if (value == -1 && PyErr_Occurred()) ++ goto error; ++ ++ if (value < 0 || value >= 256) { ++ PyErr_SetString(PyExc_ValueError, ++ "bytes must be in range(0, 256)"); ++ goto error; ++ } ++ *str++ = (char) value; ++ } ++ return bytes; ++ ++ error: ++ Py_DECREF(bytes); ++ return NULL; + } + + static PyObject * +commit c46f0423a42c46cf62d12c300ec36a848f8ba72c +Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> +Date: Tue Oct 23 12:45:44 2018 -0700 + + Fix error handling bugs in _elementtree.c. (GH-10060) + + + References could leak, NULL could be dereferenced, and the Expat parser could + be double freed when some errors raised. + (cherry picked from commit 9f3ed3e213b30059087d059a7d1d3b2527fa8654) + + Co-authored-by: Zackery Spytz + +diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c +index d13c6dd4db..3118b55c87 100644 +--- a/Modules/_elementtree.c ++++ b/Modules/_elementtree.c +@@ -336,6 +336,9 @@ static PyObject* + get_attrib_from_keywords(PyObject *kwds) + { + PyObject *attrib_str = PyUnicode_FromString("attrib"); ++ if (attrib_str == NULL) { ++ return NULL; ++ } + PyObject *attrib = PyDict_GetItem(kwds, attrib_str); + + if (attrib) { +@@ -356,10 +359,10 @@ get_attrib_from_keywords(PyObject *kwds) + + Py_DECREF(attrib_str); + +- /* attrib can be NULL if PyDict_New failed */ +- if (attrib) +- if (PyDict_Update(attrib, kwds) < 0) +- return NULL; ++ if (attrib != NULL && PyDict_Update(attrib, kwds) < 0) { ++ Py_DECREF(attrib); ++ return NULL; ++ } + return attrib; + } + +@@ -579,10 +582,9 @@ subelement(PyObject *self, PyObject *args, PyObject *kwds) + attrib = PyDict_Copy(attrib); + if (!attrib) + return NULL; +- if (kwds) { +- if (PyDict_Update(attrib, kwds) < 0) { +- return NULL; +- } ++ if (kwds != NULL && PyDict_Update(attrib, kwds) < 0) { ++ Py_DECREF(attrib); ++ return NULL; + } + } else if (kwds) { + /* have keyword args */ +@@ -1857,7 +1859,6 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value) + * scheduled for removal. + */ + if (!(recycle = PyList_New(slicelen))) { +- PyErr_NoMemory(); + return -1; + } + +@@ -1897,7 +1898,7 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value) + self->extra->length -= slicelen; + + /* Discard the recycle list with all the deleted sub-elements */ +- Py_XDECREF(recycle); ++ Py_DECREF(recycle); + return 0; + } + +@@ -3352,7 +3353,6 @@ _elementtree_XMLParser___init___impl(XMLParserObject *self, PyObject *html, + if (!target) { + Py_CLEAR(self->entity); + Py_CLEAR(self->names); +- EXPAT(ParserFree)(self->parser); + return -1; + } + } +commit da15389fddb85cf8a97b81e75de7d77b5f505b56 +Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> +Date: Wed Oct 31 02:31:29 2018 -0700 + + Fix a possible crash in range.__reversed__(). (GH-10252) + + (cherry picked from commit c9a6168924ffa4f3f78175998b392fe23d3edc50) + + Co-authored-by: Zackery Spytz + +diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c +index e4f778b1f8..037be870e3 100644 +--- a/Objects/rangeobject.c ++++ b/Objects/rangeobject.c +@@ -1154,6 +1154,7 @@ long_range: + it = PyObject_New(longrangeiterobject, &PyLongRangeIter_Type); + if (it == NULL) + return NULL; ++ it->index = it->start = it->step = NULL; + + /* start + (len - 1) * step */ + it->len = range->length; +commit 192c54713b4c67a8d14b2d98056771feba40ca37 +Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> +Date: Wed Oct 31 16:45:42 2018 -0700 + + bpo-26558: Fix Py_FatalError() with GIL released (GH-10267) + + + Don't call _Py_FatalError_PrintExc() nor flush_std_files() if the + current thread doesn't hold the GIL, or if the current thread + has no Python state thread. + (cherry picked from commit 3a228ab17c2a9cffd1a2f15f30d6209768de20a6) + + Co-authored-by: Victor Stinner + +diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c +index c01b21ffeb..86f95de833 100644 +--- a/Python/pylifecycle.c ++++ b/Python/pylifecycle.c +@@ -2015,12 +2015,6 @@ _Py_FatalError_PrintExc(int fd) + PyObject *exception, *v, *tb; + int has_tb; + +- if (PyThreadState_GET() == NULL) { +- /* The GIL is released: trying to acquire it is likely to deadlock, +- just give up. */ +- return 0; +- } +- + PyErr_Fetch(&exception, &v, &tb); + if (exception == NULL) { + /* No current exception */ +@@ -2125,9 +2119,30 @@ fatal_error(const char *prefix, const char *msg, int status) + fputs("\n", stderr); + fflush(stderr); /* it helps in Windows debug build */ + +- /* Print the exception (if an exception is set) with its traceback, +- * or display the current Python stack. */ +- if (!_Py_FatalError_PrintExc(fd)) { ++ /* Check if the current thread has a Python thread state ++ and holds the GIL */ ++ PyThreadState *tss_tstate = PyGILState_GetThisThreadState(); ++ if (tss_tstate != NULL) { ++ PyThreadState *tstate = PyThreadState_GET(); ++ if (tss_tstate != tstate) { ++ /* The Python thread does not hold the GIL */ ++ tss_tstate = NULL; ++ } ++ } ++ else { ++ /* Py_FatalError() has been called from a C thread ++ which has no Python thread state. */ ++ } ++ int has_tstate_and_gil = (tss_tstate != NULL); ++ ++ if (has_tstate_and_gil) { ++ /* If an exception is set, print the exception with its traceback */ ++ if (!_Py_FatalError_PrintExc(fd)) { ++ /* No exception is set, or an exception is set without traceback */ ++ _Py_FatalError_DumpTracebacks(fd); ++ } ++ } ++ else { + _Py_FatalError_DumpTracebacks(fd); + } + +@@ -2138,7 +2153,7 @@ fatal_error(const char *prefix, const char *msg, int status) + _PyFaulthandler_Fini(); + + /* Check if the current Python thread hold the GIL */ +- if (PyThreadState_GET() != NULL) { ++ if (has_tstate_and_gil) { + /* Flush sys.stdout and sys.stderr */ + flush_std_files(); + } +commit f16ebcd460aaeb8d6b31db317d22f5ed68afbcc8 +Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> +Date: Thu Nov 8 18:13:14 2018 -0800 + + bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418) + + + Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return. + + Do a bounds check within find_op so it can return before going past the end as a safety measure. + + https://github.com/python/cpython/commit/7db3c488335168993689ddae5914a28e16188447GH-diff-a33329ae6ae0bb295d742f0caf93c137 + introduced this off by one error while fixing another one nearby. + + This bug was shipped in all Python 3.6 and 3.7 releases. + + The included unittest won't fail unless you do a clang msan build. + (cherry picked from commit 49fa4a9f1ef387e16596f271414c855339eadf09) + + Co-authored-by: Gregory P. Smith + +diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py +index d8a57e5e09..5ac1c5f271 100644 +--- a/Lib/test/test_compile.py ++++ b/Lib/test/test_compile.py +@@ -1,3 +1,4 @@ ++import dis + import math + import os + import unittest +@@ -621,6 +622,24 @@ if 1: + self.check_constant(f1, frozenset({0})) + self.assertTrue(f1(0)) + ++ # This is a regression test for a CPython specific peephole optimizer ++ # implementation bug present in a few releases. It's assertion verifies ++ # that peephole optimization was actually done though that isn't an ++ # indication of the bugs presence or not (crashing is). ++ @support.cpython_only ++ def test_peephole_opt_unreachable_code_array_access_in_bounds(self): ++ """Regression test for issue35193 when run under clang msan.""" ++ def unused_code_at_end(): ++ return 3 ++ raise RuntimeError("unreachable") ++ # The above function definition will trigger the out of bounds ++ # bug in the peephole optimizer as it scans opcodes past the ++ # RETURN_VALUE opcode. This does not always crash an interpreter. ++ # When you build with the clang memory sanitizer it reliably aborts. ++ self.assertEqual( ++ 'RETURN_VALUE', ++ list(dis.get_instructions(unused_code_at_end))[-1].opname) ++ + def test_dont_merge_constants(self): + # Issue #25843: compile() must not merge constants which are equal + # but have a different type. +diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-11-08-15-00-58.bpo-35193.HzPS6R.rst b/Misc/NEWS.d/next/Core and Builtins/2018-11-08-15-00-58.bpo-35193.HzPS6R.rst +new file mode 100644 +index 0000000000..dddebe1670 +--- /dev/null ++++ b/Misc/NEWS.d/next/Core and Builtins/2018-11-08-15-00-58.bpo-35193.HzPS6R.rst +@@ -0,0 +1,3 @@ ++Fix an off by one error in the bytecode peephole optimizer where it could read ++bytes beyond the end of bounds of an array when removing unreachable code. ++This bug was present in every release of Python 3.6 and 3.7 until now. +diff --git a/Python/peephole.c b/Python/peephole.c +index 76a0edbcc2..a3b078fdf1 100644 +--- a/Python/peephole.c ++++ b/Python/peephole.c +@@ -50,9 +50,9 @@ lastn_const_start(const _Py_CODEUNIT *codestr, Py_ssize_t i, Py_ssize_t n) + + /* Scans through EXTENDED ARGs, seeking the index of the effective opcode */ + static Py_ssize_t +-find_op(const _Py_CODEUNIT *codestr, Py_ssize_t i) ++find_op(const _Py_CODEUNIT *codestr, Py_ssize_t codelen, Py_ssize_t i) + { +- while (_Py_OPCODE(codestr[i]) == EXTENDED_ARG) { ++ while (i < codelen && _Py_OPCODE(codestr[i]) == EXTENDED_ARG) { + i++; + } + return i; +@@ -128,8 +128,9 @@ copy_op_arg(_Py_CODEUNIT *codestr, Py_ssize_t i, unsigned char op, + Called with codestr pointing to the first LOAD_CONST. + */ + static Py_ssize_t +-fold_tuple_on_constants(_Py_CODEUNIT *codestr, Py_ssize_t c_start, +- Py_ssize_t opcode_end, PyObject *consts, int n) ++fold_tuple_on_constants(_Py_CODEUNIT *codestr, Py_ssize_t codelen, ++ Py_ssize_t c_start, Py_ssize_t opcode_end, ++ PyObject *consts, int n) + { + /* Pre-conditions */ + assert(PyList_CheckExact(consts)); +@@ -142,7 +143,7 @@ fold_tuple_on_constants(_Py_CODEUNIT *codestr, Py_ssize_t c_start, + + for (Py_ssize_t i = 0, pos = c_start; i < n; i++, pos++) { + assert(pos < opcode_end); +- pos = find_op(codestr, pos); ++ pos = find_op(codestr, codelen, pos); + assert(_Py_OPCODE(codestr[pos]) == LOAD_CONST); + + unsigned int arg = get_arg(codestr, pos); +@@ -267,7 +268,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, + goto exitError; + assert(PyList_Check(consts)); + +- for (i=find_op(codestr, 0) ; i= 1 && _Py_OPCODE(codestr[op_start-1]) == EXTENDED_ARG) { +@@ -305,7 +306,8 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, + if (j > 0 && lastlc >= j) { + h = lastn_const_start(codestr, op_start, j); + if (ISBASICBLOCK(blocks, h, op_start)) { +- h = fold_tuple_on_constants(codestr, h, i+1, consts, j); ++ h = fold_tuple_on_constants(codestr, codelen, ++ h, i+1, consts, j); + break; + } + } +@@ -342,7 +344,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, + case JUMP_IF_FALSE_OR_POP: + case JUMP_IF_TRUE_OR_POP: + h = get_arg(codestr, i) / sizeof(_Py_CODEUNIT); +- tgt = find_op(codestr, h); ++ tgt = find_op(codestr, codelen, h); + + j = _Py_OPCODE(codestr[tgt]); + if (CONDITIONAL_JUMP(j)) { +@@ -383,7 +385,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, + case SETUP_WITH: + case SETUP_ASYNC_WITH: + h = GETJUMPTGT(codestr, i); +- tgt = find_op(codestr, h); ++ tgt = find_op(codestr, codelen, h); + /* Replace JUMP_* to a RETURN into just a RETURN */ + if (UNCONDITIONAL_JUMP(opcode) && + _Py_OPCODE(codestr[tgt]) == RETURN_VALUE) { +@@ -412,7 +414,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, + } + if (h > i + 1) { + fill_nops(codestr, i + 1, h); +- nexti = find_op(codestr, h); ++ nexti = find_op(codestr, codelen, h); + } + break; + } +commit 9fbcb1402efab4e287f25145a69ba14c9c6dbce9 +Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> +Date: Tue Nov 13 16:39:36 2018 -0800 + + [3.7] bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506) (GH-10522) + + + + Discovered using clang's MemorySanitizer when it ran python3's + test_fstring test_misformed_unicode_character_name. + + An msan build will fail by simply executing: ./python -c 'u"\N"' + (cherry picked from commit 746b2d35ea47005054ed774fecaed64fab803d7d) + + + Co-authored-by: Gregory P. Smith + + + https://bugs.python.org/issue35214 + +diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-11-13-00-40-35.bpo-35214.OQBjph.rst b/Misc/NEWS.d/next/Core and Builtins/2018-11-13-00-40-35.bpo-35214.OQBjph.rst +new file mode 100644 +index 0000000000..d462c97d80 +--- /dev/null ++++ b/Misc/NEWS.d/next/Core and Builtins/2018-11-13-00-40-35.bpo-35214.OQBjph.rst +@@ -0,0 +1,3 @@ ++Fixed an out of bounds memory access when parsing a truncated unicode ++escape sequence at the end of a string such as ``'\N'``. It would read ++one byte beyond the end of the memory allocation. +diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c +index fe833a76ea..71eb654095 100644 +--- a/Objects/unicodeobject.c ++++ b/Objects/unicodeobject.c +@@ -6042,7 +6042,7 @@ _PyUnicode_DecodeUnicodeEscape(const char *s, + } + + message = "malformed \\N character escape"; +- if (*s == '{') { ++ if (s < end && *s == '{') { + const char *start = ++s; + size_t namelen; + /* look for the closing brace */ +commit b5ea5e57f5dd23e1db695dda8bf3f6142ed9074f +Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> +Date: Thu Nov 15 01:25:34 2018 -0800 + + Fix a possible reference leak in _socket.getaddrinfo(). (GH-10543) + + + "single" needs to be decrefed if PyList_Append() fails. + (cherry picked from commit 4c596d54aa6a55e9d2a3db78891e656ebbfb63c8) + + Co-authored-by: Zackery Spytz + +diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c +index eeade2ecad..ddb1c4364b 100644 +--- a/Modules/socketmodule.c ++++ b/Modules/socketmodule.c +@@ -6269,9 +6269,11 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs) + if (single == NULL) + goto err; + +- if (PyList_Append(all, single)) ++ if (PyList_Append(all, single)) { ++ Py_DECREF(single); + goto err; +- Py_XDECREF(single); ++ } ++ Py_DECREF(single); + } + Py_XDECREF(idna); + if (res0) diff --git a/python3.spec b/python3.spec index 2b13514..c970c58 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.1 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -63,6 +63,7 @@ Patch11: %{name}-installcompile.patch # https://bugs.python.org/file21896/nonexistent_user.patch Patch12: nonexistent_user.patch Patch13: %{name}-no-randomize-tests.patch +Patch14: git.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -494,6 +495,7 @@ Moduły testowe dla Pythona. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %{__rm} -r Modules/expat From 9b97d583555fc923d1f719358fec128ac1bf787a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 3 Jan 2019 09:44:32 +0100 Subject: [PATCH 090/180] - up to 3.7.2 --- git.patch | 613 ---------------------------- python3-no_cmdline_tests.patch | 7 +- python3-tests_with_pythonpath.patch | 6 +- python3.spec | 9 +- 4 files changed, 10 insertions(+), 625 deletions(-) delete mode 100644 git.patch diff --git a/git.patch b/git.patch deleted file mode 100644 index c537275..0000000 --- a/git.patch +++ /dev/null @@ -1,613 +0,0 @@ -commit 4ec9f64e07c8f397ad6699f8b99843846c219588 -Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> -Date: Fri Oct 19 16:14:42 2018 -0700 - - bpo-34824: Fix a possible NULL pointer dereference in _ssl.c (GH-9606) (GH-9743) - - On failure, _PyBytes_Resize() will deallocate the bytes object and set - "result" to NULL. - - https://bugs.python.org/issue34824 - (cherry picked from commit 365ad2ead5bbaf7a3b18648ffa36e819559d3f75) - - Co-authored-by: Zackery Spytz - -diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-09-27-11-10-02.bpo-34824.VLlCaU.rst b/Misc/NEWS.d/next/Core and Builtins/2018-09-27-11-10-02.bpo-34824.VLlCaU.rst -new file mode 100644 -index 0000000000..fe95b8973c ---- /dev/null -+++ b/Misc/NEWS.d/next/Core and Builtins/2018-09-27-11-10-02.bpo-34824.VLlCaU.rst -@@ -0,0 +1,2 @@ -+Fix a possible null pointer dereference in Modules/_ssl.c. Patch by Zackery -+Spytz. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index 4253e2a772..f9d1b8c308 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -4711,12 +4711,17 @@ _ssl_MemoryBIO_read_impl(PySSLMemoryBIO *self, int len) - return result; - - nbytes = BIO_read(self->bio, PyBytes_AS_STRING(result), len); -- /* There should never be any short reads but check anyway. */ -- if ((nbytes < len) && (_PyBytes_Resize(&result, len) < 0)) { -+ if (nbytes < 0) { - Py_DECREF(result); -+ _setSSLError(NULL, 0, __FILE__, __LINE__); - return NULL; - } - -+ /* There should never be any short reads but check anyway. */ -+ if (nbytes < len) { -+ _PyBytes_Resize(&result, nbytes); -+ } -+ - return result; - } - -commit 7f34d550231e047c88a1817b58bda03a33817490 -Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> -Date: Sun Oct 21 05:55:52 2018 -0700 - - bpo-34973: Fix crash in bytes constructor. (GH-9841) - - - Constructing bytes from mutating list could cause a crash. - (cherry picked from commit 914f9a078f997e58cfcfabcbb30fafdd1f277bef) - - Co-authored-by: Serhiy Storchaka - -diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py -index b9c5b628c4..145411efbb 100644 ---- a/Lib/test/test_bytes.py -+++ b/Lib/test/test_bytes.py -@@ -113,6 +113,23 @@ class BaseBytesTest: - b = self.type2test([1, 2, 3]) - self.assertEqual(b, b"\x01\x02\x03") - -+ def test_from_mutating_list(self): -+ # Issue #34973: Crash in bytes constructor with mutating list. -+ class X: -+ def __index__(self): -+ a.clear() -+ return 42 -+ a = [X(), X()] -+ self.assertEqual(bytes(a), b'*') -+ -+ class Y: -+ def __index__(self): -+ if len(a) < 1000: -+ a.append(self) -+ return 42 -+ a = [Y()] -+ self.assertEqual(bytes(a), b'*' * 1000) # should not crash -+ - def test_from_index(self): - b = self.type2test([Indexable(), Indexable(1), Indexable(254), - Indexable(255)]) -diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-10-13-16-42-03.bpo-34973.B5M-3g.rst b/Misc/NEWS.d/next/Core and Builtins/2018-10-13-16-42-03.bpo-34973.B5M-3g.rst -new file mode 100644 -index 0000000000..6e403cd4ce ---- /dev/null -+++ b/Misc/NEWS.d/next/Core and Builtins/2018-10-13-16-42-03.bpo-34973.B5M-3g.rst -@@ -0,0 +1,2 @@ -+Fixed crash in :func:`bytes` when the :class:`list` argument is mutated -+while it is iterated. -diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c -index 5b62842093..711faba645 100644 ---- a/Objects/bytesobject.c -+++ b/Objects/bytesobject.c -@@ -2640,49 +2640,83 @@ fail: - return NULL; - } - --#define _PyBytes_FROM_LIST_BODY(x, GET_ITEM) \ -- do { \ -- PyObject *bytes; \ -- Py_ssize_t i; \ -- Py_ssize_t value; \ -- char *str; \ -- PyObject *item; \ -- \ -- bytes = PyBytes_FromStringAndSize(NULL, Py_SIZE(x)); \ -- if (bytes == NULL) \ -- return NULL; \ -- str = ((PyBytesObject *)bytes)->ob_sval; \ -- \ -- for (i = 0; i < Py_SIZE(x); i++) { \ -- item = GET_ITEM((x), i); \ -- value = PyNumber_AsSsize_t(item, NULL); \ -- if (value == -1 && PyErr_Occurred()) \ -- goto error; \ -- \ -- if (value < 0 || value >= 256) { \ -- PyErr_SetString(PyExc_ValueError, \ -- "bytes must be in range(0, 256)"); \ -- goto error; \ -- } \ -- *str++ = (char) value; \ -- } \ -- return bytes; \ -- \ -- error: \ -- Py_DECREF(bytes); \ -- return NULL; \ -- } while (0) -- - static PyObject* - _PyBytes_FromList(PyObject *x) - { -- _PyBytes_FROM_LIST_BODY(x, PyList_GET_ITEM); -+ Py_ssize_t i, size = PyList_GET_SIZE(x); -+ Py_ssize_t value; -+ char *str; -+ PyObject *item; -+ _PyBytesWriter writer; -+ -+ _PyBytesWriter_Init(&writer); -+ str = _PyBytesWriter_Alloc(&writer, size); -+ if (str == NULL) -+ return NULL; -+ writer.overallocate = 1; -+ size = writer.allocated; -+ -+ for (i = 0; i < PyList_GET_SIZE(x); i++) { -+ item = PyList_GET_ITEM(x, i); -+ Py_INCREF(item); -+ value = PyNumber_AsSsize_t(item, NULL); -+ Py_DECREF(item); -+ if (value == -1 && PyErr_Occurred()) -+ goto error; -+ -+ if (value < 0 || value >= 256) { -+ PyErr_SetString(PyExc_ValueError, -+ "bytes must be in range(0, 256)"); -+ goto error; -+ } -+ -+ if (i >= size) { -+ str = _PyBytesWriter_Resize(&writer, str, size+1); -+ if (str == NULL) -+ return NULL; -+ size = writer.allocated; -+ } -+ *str++ = (char) value; -+ } -+ return _PyBytesWriter_Finish(&writer, str); -+ -+ error: -+ _PyBytesWriter_Dealloc(&writer); -+ return NULL; - } - - static PyObject* - _PyBytes_FromTuple(PyObject *x) - { -- _PyBytes_FROM_LIST_BODY(x, PyTuple_GET_ITEM); -+ PyObject *bytes; -+ Py_ssize_t i, size = PyTuple_GET_SIZE(x); -+ Py_ssize_t value; -+ char *str; -+ PyObject *item; -+ -+ bytes = PyBytes_FromStringAndSize(NULL, size); -+ if (bytes == NULL) -+ return NULL; -+ str = ((PyBytesObject *)bytes)->ob_sval; -+ -+ for (i = 0; i < size; i++) { -+ item = PyTuple_GET_ITEM(x, i); -+ value = PyNumber_AsSsize_t(item, NULL); -+ if (value == -1 && PyErr_Occurred()) -+ goto error; -+ -+ if (value < 0 || value >= 256) { -+ PyErr_SetString(PyExc_ValueError, -+ "bytes must be in range(0, 256)"); -+ goto error; -+ } -+ *str++ = (char) value; -+ } -+ return bytes; -+ -+ error: -+ Py_DECREF(bytes); -+ return NULL; - } - - static PyObject * -commit c46f0423a42c46cf62d12c300ec36a848f8ba72c -Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> -Date: Tue Oct 23 12:45:44 2018 -0700 - - Fix error handling bugs in _elementtree.c. (GH-10060) - - - References could leak, NULL could be dereferenced, and the Expat parser could - be double freed when some errors raised. - (cherry picked from commit 9f3ed3e213b30059087d059a7d1d3b2527fa8654) - - Co-authored-by: Zackery Spytz - -diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c -index d13c6dd4db..3118b55c87 100644 ---- a/Modules/_elementtree.c -+++ b/Modules/_elementtree.c -@@ -336,6 +336,9 @@ static PyObject* - get_attrib_from_keywords(PyObject *kwds) - { - PyObject *attrib_str = PyUnicode_FromString("attrib"); -+ if (attrib_str == NULL) { -+ return NULL; -+ } - PyObject *attrib = PyDict_GetItem(kwds, attrib_str); - - if (attrib) { -@@ -356,10 +359,10 @@ get_attrib_from_keywords(PyObject *kwds) - - Py_DECREF(attrib_str); - -- /* attrib can be NULL if PyDict_New failed */ -- if (attrib) -- if (PyDict_Update(attrib, kwds) < 0) -- return NULL; -+ if (attrib != NULL && PyDict_Update(attrib, kwds) < 0) { -+ Py_DECREF(attrib); -+ return NULL; -+ } - return attrib; - } - -@@ -579,10 +582,9 @@ subelement(PyObject *self, PyObject *args, PyObject *kwds) - attrib = PyDict_Copy(attrib); - if (!attrib) - return NULL; -- if (kwds) { -- if (PyDict_Update(attrib, kwds) < 0) { -- return NULL; -- } -+ if (kwds != NULL && PyDict_Update(attrib, kwds) < 0) { -+ Py_DECREF(attrib); -+ return NULL; - } - } else if (kwds) { - /* have keyword args */ -@@ -1857,7 +1859,6 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value) - * scheduled for removal. - */ - if (!(recycle = PyList_New(slicelen))) { -- PyErr_NoMemory(); - return -1; - } - -@@ -1897,7 +1898,7 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value) - self->extra->length -= slicelen; - - /* Discard the recycle list with all the deleted sub-elements */ -- Py_XDECREF(recycle); -+ Py_DECREF(recycle); - return 0; - } - -@@ -3352,7 +3353,6 @@ _elementtree_XMLParser___init___impl(XMLParserObject *self, PyObject *html, - if (!target) { - Py_CLEAR(self->entity); - Py_CLEAR(self->names); -- EXPAT(ParserFree)(self->parser); - return -1; - } - } -commit da15389fddb85cf8a97b81e75de7d77b5f505b56 -Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> -Date: Wed Oct 31 02:31:29 2018 -0700 - - Fix a possible crash in range.__reversed__(). (GH-10252) - - (cherry picked from commit c9a6168924ffa4f3f78175998b392fe23d3edc50) - - Co-authored-by: Zackery Spytz - -diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c -index e4f778b1f8..037be870e3 100644 ---- a/Objects/rangeobject.c -+++ b/Objects/rangeobject.c -@@ -1154,6 +1154,7 @@ long_range: - it = PyObject_New(longrangeiterobject, &PyLongRangeIter_Type); - if (it == NULL) - return NULL; -+ it->index = it->start = it->step = NULL; - - /* start + (len - 1) * step */ - it->len = range->length; -commit 192c54713b4c67a8d14b2d98056771feba40ca37 -Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> -Date: Wed Oct 31 16:45:42 2018 -0700 - - bpo-26558: Fix Py_FatalError() with GIL released (GH-10267) - - - Don't call _Py_FatalError_PrintExc() nor flush_std_files() if the - current thread doesn't hold the GIL, or if the current thread - has no Python state thread. - (cherry picked from commit 3a228ab17c2a9cffd1a2f15f30d6209768de20a6) - - Co-authored-by: Victor Stinner - -diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c -index c01b21ffeb..86f95de833 100644 ---- a/Python/pylifecycle.c -+++ b/Python/pylifecycle.c -@@ -2015,12 +2015,6 @@ _Py_FatalError_PrintExc(int fd) - PyObject *exception, *v, *tb; - int has_tb; - -- if (PyThreadState_GET() == NULL) { -- /* The GIL is released: trying to acquire it is likely to deadlock, -- just give up. */ -- return 0; -- } -- - PyErr_Fetch(&exception, &v, &tb); - if (exception == NULL) { - /* No current exception */ -@@ -2125,9 +2119,30 @@ fatal_error(const char *prefix, const char *msg, int status) - fputs("\n", stderr); - fflush(stderr); /* it helps in Windows debug build */ - -- /* Print the exception (if an exception is set) with its traceback, -- * or display the current Python stack. */ -- if (!_Py_FatalError_PrintExc(fd)) { -+ /* Check if the current thread has a Python thread state -+ and holds the GIL */ -+ PyThreadState *tss_tstate = PyGILState_GetThisThreadState(); -+ if (tss_tstate != NULL) { -+ PyThreadState *tstate = PyThreadState_GET(); -+ if (tss_tstate != tstate) { -+ /* The Python thread does not hold the GIL */ -+ tss_tstate = NULL; -+ } -+ } -+ else { -+ /* Py_FatalError() has been called from a C thread -+ which has no Python thread state. */ -+ } -+ int has_tstate_and_gil = (tss_tstate != NULL); -+ -+ if (has_tstate_and_gil) { -+ /* If an exception is set, print the exception with its traceback */ -+ if (!_Py_FatalError_PrintExc(fd)) { -+ /* No exception is set, or an exception is set without traceback */ -+ _Py_FatalError_DumpTracebacks(fd); -+ } -+ } -+ else { - _Py_FatalError_DumpTracebacks(fd); - } - -@@ -2138,7 +2153,7 @@ fatal_error(const char *prefix, const char *msg, int status) - _PyFaulthandler_Fini(); - - /* Check if the current Python thread hold the GIL */ -- if (PyThreadState_GET() != NULL) { -+ if (has_tstate_and_gil) { - /* Flush sys.stdout and sys.stderr */ - flush_std_files(); - } -commit f16ebcd460aaeb8d6b31db317d22f5ed68afbcc8 -Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> -Date: Thu Nov 8 18:13:14 2018 -0800 - - bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418) - - - Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return. - - Do a bounds check within find_op so it can return before going past the end as a safety measure. - - https://github.com/python/cpython/commit/7db3c488335168993689ddae5914a28e16188447GH-diff-a33329ae6ae0bb295d742f0caf93c137 - introduced this off by one error while fixing another one nearby. - - This bug was shipped in all Python 3.6 and 3.7 releases. - - The included unittest won't fail unless you do a clang msan build. - (cherry picked from commit 49fa4a9f1ef387e16596f271414c855339eadf09) - - Co-authored-by: Gregory P. Smith - -diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py -index d8a57e5e09..5ac1c5f271 100644 ---- a/Lib/test/test_compile.py -+++ b/Lib/test/test_compile.py -@@ -1,3 +1,4 @@ -+import dis - import math - import os - import unittest -@@ -621,6 +622,24 @@ if 1: - self.check_constant(f1, frozenset({0})) - self.assertTrue(f1(0)) - -+ # This is a regression test for a CPython specific peephole optimizer -+ # implementation bug present in a few releases. It's assertion verifies -+ # that peephole optimization was actually done though that isn't an -+ # indication of the bugs presence or not (crashing is). -+ @support.cpython_only -+ def test_peephole_opt_unreachable_code_array_access_in_bounds(self): -+ """Regression test for issue35193 when run under clang msan.""" -+ def unused_code_at_end(): -+ return 3 -+ raise RuntimeError("unreachable") -+ # The above function definition will trigger the out of bounds -+ # bug in the peephole optimizer as it scans opcodes past the -+ # RETURN_VALUE opcode. This does not always crash an interpreter. -+ # When you build with the clang memory sanitizer it reliably aborts. -+ self.assertEqual( -+ 'RETURN_VALUE', -+ list(dis.get_instructions(unused_code_at_end))[-1].opname) -+ - def test_dont_merge_constants(self): - # Issue #25843: compile() must not merge constants which are equal - # but have a different type. -diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-11-08-15-00-58.bpo-35193.HzPS6R.rst b/Misc/NEWS.d/next/Core and Builtins/2018-11-08-15-00-58.bpo-35193.HzPS6R.rst -new file mode 100644 -index 0000000000..dddebe1670 ---- /dev/null -+++ b/Misc/NEWS.d/next/Core and Builtins/2018-11-08-15-00-58.bpo-35193.HzPS6R.rst -@@ -0,0 +1,3 @@ -+Fix an off by one error in the bytecode peephole optimizer where it could read -+bytes beyond the end of bounds of an array when removing unreachable code. -+This bug was present in every release of Python 3.6 and 3.7 until now. -diff --git a/Python/peephole.c b/Python/peephole.c -index 76a0edbcc2..a3b078fdf1 100644 ---- a/Python/peephole.c -+++ b/Python/peephole.c -@@ -50,9 +50,9 @@ lastn_const_start(const _Py_CODEUNIT *codestr, Py_ssize_t i, Py_ssize_t n) - - /* Scans through EXTENDED ARGs, seeking the index of the effective opcode */ - static Py_ssize_t --find_op(const _Py_CODEUNIT *codestr, Py_ssize_t i) -+find_op(const _Py_CODEUNIT *codestr, Py_ssize_t codelen, Py_ssize_t i) - { -- while (_Py_OPCODE(codestr[i]) == EXTENDED_ARG) { -+ while (i < codelen && _Py_OPCODE(codestr[i]) == EXTENDED_ARG) { - i++; - } - return i; -@@ -128,8 +128,9 @@ copy_op_arg(_Py_CODEUNIT *codestr, Py_ssize_t i, unsigned char op, - Called with codestr pointing to the first LOAD_CONST. - */ - static Py_ssize_t --fold_tuple_on_constants(_Py_CODEUNIT *codestr, Py_ssize_t c_start, -- Py_ssize_t opcode_end, PyObject *consts, int n) -+fold_tuple_on_constants(_Py_CODEUNIT *codestr, Py_ssize_t codelen, -+ Py_ssize_t c_start, Py_ssize_t opcode_end, -+ PyObject *consts, int n) - { - /* Pre-conditions */ - assert(PyList_CheckExact(consts)); -@@ -142,7 +143,7 @@ fold_tuple_on_constants(_Py_CODEUNIT *codestr, Py_ssize_t c_start, - - for (Py_ssize_t i = 0, pos = c_start; i < n; i++, pos++) { - assert(pos < opcode_end); -- pos = find_op(codestr, pos); -+ pos = find_op(codestr, codelen, pos); - assert(_Py_OPCODE(codestr[pos]) == LOAD_CONST); - - unsigned int arg = get_arg(codestr, pos); -@@ -267,7 +268,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, - goto exitError; - assert(PyList_Check(consts)); - -- for (i=find_op(codestr, 0) ; i= 1 && _Py_OPCODE(codestr[op_start-1]) == EXTENDED_ARG) { -@@ -305,7 +306,8 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, - if (j > 0 && lastlc >= j) { - h = lastn_const_start(codestr, op_start, j); - if (ISBASICBLOCK(blocks, h, op_start)) { -- h = fold_tuple_on_constants(codestr, h, i+1, consts, j); -+ h = fold_tuple_on_constants(codestr, codelen, -+ h, i+1, consts, j); - break; - } - } -@@ -342,7 +344,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, - case JUMP_IF_FALSE_OR_POP: - case JUMP_IF_TRUE_OR_POP: - h = get_arg(codestr, i) / sizeof(_Py_CODEUNIT); -- tgt = find_op(codestr, h); -+ tgt = find_op(codestr, codelen, h); - - j = _Py_OPCODE(codestr[tgt]); - if (CONDITIONAL_JUMP(j)) { -@@ -383,7 +385,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, - case SETUP_WITH: - case SETUP_ASYNC_WITH: - h = GETJUMPTGT(codestr, i); -- tgt = find_op(codestr, h); -+ tgt = find_op(codestr, codelen, h); - /* Replace JUMP_* to a RETURN into just a RETURN */ - if (UNCONDITIONAL_JUMP(opcode) && - _Py_OPCODE(codestr[tgt]) == RETURN_VALUE) { -@@ -412,7 +414,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, - } - if (h > i + 1) { - fill_nops(codestr, i + 1, h); -- nexti = find_op(codestr, h); -+ nexti = find_op(codestr, codelen, h); - } - break; - } -commit 9fbcb1402efab4e287f25145a69ba14c9c6dbce9 -Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> -Date: Tue Nov 13 16:39:36 2018 -0800 - - [3.7] bpo-35214: Fix OOB memory access in unicode escape parser (GH-10506) (GH-10522) - - - - Discovered using clang's MemorySanitizer when it ran python3's - test_fstring test_misformed_unicode_character_name. - - An msan build will fail by simply executing: ./python -c 'u"\N"' - (cherry picked from commit 746b2d35ea47005054ed774fecaed64fab803d7d) - - - Co-authored-by: Gregory P. Smith - - - https://bugs.python.org/issue35214 - -diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-11-13-00-40-35.bpo-35214.OQBjph.rst b/Misc/NEWS.d/next/Core and Builtins/2018-11-13-00-40-35.bpo-35214.OQBjph.rst -new file mode 100644 -index 0000000000..d462c97d80 ---- /dev/null -+++ b/Misc/NEWS.d/next/Core and Builtins/2018-11-13-00-40-35.bpo-35214.OQBjph.rst -@@ -0,0 +1,3 @@ -+Fixed an out of bounds memory access when parsing a truncated unicode -+escape sequence at the end of a string such as ``'\N'``. It would read -+one byte beyond the end of the memory allocation. -diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c -index fe833a76ea..71eb654095 100644 ---- a/Objects/unicodeobject.c -+++ b/Objects/unicodeobject.c -@@ -6042,7 +6042,7 @@ _PyUnicode_DecodeUnicodeEscape(const char *s, - } - - message = "malformed \\N character escape"; -- if (*s == '{') { -+ if (s < end && *s == '{') { - const char *start = ++s; - size_t namelen; - /* look for the closing brace */ -commit b5ea5e57f5dd23e1db695dda8bf3f6142ed9074f -Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> -Date: Thu Nov 15 01:25:34 2018 -0800 - - Fix a possible reference leak in _socket.getaddrinfo(). (GH-10543) - - - "single" needs to be decrefed if PyList_Append() fails. - (cherry picked from commit 4c596d54aa6a55e9d2a3db78891e656ebbfb63c8) - - Co-authored-by: Zackery Spytz - -diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c -index eeade2ecad..ddb1c4364b 100644 ---- a/Modules/socketmodule.c -+++ b/Modules/socketmodule.c -@@ -6269,9 +6269,11 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs) - if (single == NULL) - goto err; - -- if (PyList_Append(all, single)) -+ if (PyList_Append(all, single)) { -+ Py_DECREF(single); - goto err; -- Py_XDECREF(single); -+ } -+ Py_DECREF(single); - } - Py_XDECREF(idna); - if (res0) diff --git a/python3-no_cmdline_tests.patch b/python3-no_cmdline_tests.patch index ad85bff..392c63a 100644 --- a/python3-no_cmdline_tests.patch +++ b/python3-no_cmdline_tests.patch @@ -1,13 +1,12 @@ diff -Nur Python-3.3.1.orig/Lib/test/test_compileall.py Python-3.3.1/Lib/test/test_compileall.py --- Python-3.3.1.orig/Lib/test/test_compileall.py 2013-04-06 08:41:41.000000000 +0100 +++ Python-3.3.1/Lib/test/test_compileall.py 2013-04-07 19:39:23.449157629 +0100 -@@ -130,7 +130,7 @@ - finally: +@@ -233,6 +233,7 @@ class EncodingTest(unittest.TestCase): sys.stdout = orig_stdout -- + +@unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled") - class CommandLineTests(unittest.TestCase): + class CommandLineTestsBase: """Test compileall's CLI.""" diff -Nur Python-3.3.1.orig/Lib/test/test_warnings/__init__.py Python-3.3.1/Lib/test/test_warnings/__init__.py diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index d2bc777..ef74c4d 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -49,14 +49,14 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_compileall.py Python-3.5.0/Lib def test_no_args_compiles_path(self): # Note that -l is implied for the no args case. bazfn = script_helper.make_script(self.directory, 'baz', '') -@@ -214,6 +215,7 @@ +@@ -220,6 +220,7 @@ class CommandLineTestsBase: self.assertNotCompiled(self.initfn) self.assertNotCompiled(self.barfn) + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + @without_source_date_epoch # timestamp invalidation test def test_no_args_respects_force_flag(self): - bazfn = script_helper.make_script(self.directory, 'baz', '') - self.assertRunOK(PYTHONPATH=self.directory) + self._skip_if_sys_path_not_writable() @@ -230,6 +232,7 @@ mtime2 = os.stat(pycpath).st_mtime self.assertNotEqual(mtime, mtime2) diff --git a/python3.spec b/python3.spec index c970c58..31522f3 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.1 -Release: 3 +Version: %{py_ver}.2 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 0a57e9022c07fad3dadb2eef58568edb +# Source0-md5: df6ec36011808205beda239c72f947cb Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -63,7 +63,6 @@ Patch11: %{name}-installcompile.patch # https://bugs.python.org/file21896/nonexistent_user.patch Patch12: nonexistent_user.patch Patch13: %{name}-no-randomize-tests.patch -Patch14: git.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -495,7 +494,6 @@ Moduły testowe dla Pythona. %patch11 -p1 %patch12 -p1 %patch13 -p1 -%patch14 -p1 %{__rm} -r Modules/expat @@ -1272,6 +1270,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libpython3.so %{py_incdir}/*.h %exclude %{py_incdir}/pyconfig.h +%{py_incdir}/internal %attr(755,root,root) %{py_libdir}/config-%{py_platform}/makesetup %attr(755,root,root) %{py_libdir}/config-%{py_platform}/install-sh %{py_libdir}/config-%{py_platform}/config.c From 99a90a72ff4a86fc0ecd51740397af42c95440bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 26 Mar 2019 09:16:02 +0100 Subject: [PATCH 091/180] - up to 3.7.3 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 31522f3..ae331a4 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.2 +Version: %{py_ver}.3 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: df6ec36011808205beda239c72f947cb +# Source0-md5: 93df27aec0cd18d6d42173e601ffbbfd Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 794b49fa4125770e4bc05a4b52eed47599f45a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 9 Jul 2019 21:19:46 +0200 Subject: [PATCH 092/180] - up to 3.7.4 --- python3-tests_with_pythonpath.patch | 21 ++++++++++----------- python3.spec | 4 ++-- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index ef74c4d..579ef1e 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -87,29 +87,28 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_site.py Python-3.5.0/Lib/test/ def test_abs_paths(self): # Make sure all imported modules have their __file__ and __cached__ # attributes as absolute paths. Arranging to put the Lib directory on -diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_venv.py Python-3.5.0/Lib/test/test_venv.py ---- Python-3.5.0.orig/Lib/test/test_venv.py 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Lib/test/test_venv.py 2015-12-03 18:35:52.227001621 +0100 -@@ -111,6 +111,7 @@ - self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn) +--- Python-3.7.4/Lib/test/test_venv.py~ 2019-07-08 20:03:50.000000000 +0200 ++++ Python-3.7.4/Lib/test/test_venv.py 2019-07-09 08:37:18.251706609 +0200 +@@ -129,6 +129,7 @@ class BasicTest(BaseTest): + self.assertEqual(context.prompt, '(My prompt) ') - @skipInVenv + @requireVenvCreate + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_prefixes(self): """ Test that the prefix values are as expected. -@@ -249,6 +250,7 @@ +@@ -266,6 +267,7 @@ class BasicTest(BaseTest): # point to the venv being used to run the test, and we lose the link # to the source build - so Python can't initialise properly. - @skipInVenv + @requireVenvCreate + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_executable(self): """ Test that the sys.executable value is as expected. -@@ -279,6 +281,7 @@ +@@ -326,6 +328,7 @@ class BasicTest(BaseTest): + self.assertEqual(out.strip(), "python".encode()) - - @skipInVenv + @requireVenvCreate +@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") class EnsurePipTest(BaseTest): """Test venv module installation of pip.""" diff --git a/python3.spec b/python3.spec index ae331a4..04ae7d3 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.3 +Version: %{py_ver}.4 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 93df27aec0cd18d6d42173e601ffbbfd +# Source0-md5: d33e4aae66097051c2eca45ee3604803 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 12fdf48e7ef1c281d193133a0a9ed65000a1b504 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 3 Aug 2019 16:04:11 +0200 Subject: [PATCH 093/180] - added config patch (remove -L%{_libdir} from `python3-config --ldflags`); release 2 --- python3-config.patch | 11 +++++++++++ python3.spec | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 python3-config.patch diff --git a/python3-config.patch b/python3-config.patch new file mode 100644 index 0000000..a55c4e4 --- /dev/null +++ b/python3-config.patch @@ -0,0 +1,11 @@ +--- Python-3.7.4/Misc/python-config.sh.in.orig 2019-07-08 20:03:50.000000000 +0200 ++++ Python-3.7.4/Misc/python-config.sh.in 2019-08-03 07:45:05.226390619 +0200 +@@ -92,7 +92,7 @@ + if [ "$PY_ENABLE_SHARED" = "0" ] ; then + LIBPLUSED="-L$LIBPL" + fi +- echo "$LIBPLUSED -L$libdir $LIBS" ++ echo "$LIBPLUSED $LIBS" + ;; + --extension-suffix) + echo "$SO" diff --git a/python3.spec b/python3.spec index 04ae7d3..0756aee 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.4 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -54,6 +54,7 @@ Patch1: %{name}-ac_fixes.patch Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-makefile-location.patch +Patch5: %{name}-config.patch Patch6: python-distro.patch Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch @@ -486,6 +487,7 @@ Moduły testowe dla Pythona. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 From bebf9cf25978eb9c142173b4cdc91ca7778300e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 5 Aug 2019 17:25:38 +0200 Subject: [PATCH 094/180] - profile-opt target also runs test suite, so we want to disable some tests there, too. Use -x for each test (seems that this is how it is supposed to be used). Now problematic foo-*.rpm doesn't get build at all. --- python3-profile-tests.patch | 11 +++++++++++ python3.spec | 20 ++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 python3-profile-tests.patch diff --git a/python3-profile-tests.patch b/python3-profile-tests.patch new file mode 100644 index 0000000..11c0dc6 --- /dev/null +++ b/python3-profile-tests.patch @@ -0,0 +1,11 @@ +--- Python-3.7.4/Makefile.pre.in~ 2019-08-05 14:10:46.000000000 +0200 ++++ Python-3.7.4/Makefile.pre.in 2019-08-05 14:37:01.691326225 +0200 +@@ -260,7 +260,7 @@ TCLTK_LIBS= @TCLTK_LIBS@ + # The task to run while instrumented when building the profile-opt target. + # We exclude unittests with -x that take a rediculious amount of time to + # run in the instrumented training build or do not provide much value. +-PROFILE_TASK=-m test.regrtest --pgo ++PROFILE_TASK=-m test.regrtest --pgo $(TESTOPTS) + + # report files for gcov / lcov coverage report + COVERAGE_INFO= $(abs_builddir)/coverage.info diff --git a/python3.spec b/python3.spec index 0756aee..4ebc77f 100644 --- a/python3.spec +++ b/python3.spec @@ -9,19 +9,19 @@ %bcond_without optimizations # expensive, stable optimizations (PGO etc.) + LTO # # tests which will not work on 64-bit platforms -%define no64bit_tests test_audioop test_rgbimg test_imageop +%define no64bit_tests -x test_audioop -x test_rgbimg -x test_imageop # tests which may fail because of builder environment limitations (no /proc or /dev/pts) -%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty test_asyncio test_os test_readline test_normalization +%define nobuilder_tests -x test_resource -x test_openpty -x test_socket -x test_nis -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization # tests which fail because of some unknown/unresolved reason (this list should be %{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... # test_gdb: fails, as the gdb uses old python version # test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error %ifarch x32 -%define broken_tests_x32 test_time +%define broken_tests_x32 -x test_time %undefine with_optimizations %endif -%define broken_tests test_nntplib test_gdb test_site test_distutils test_bdist_rpm test_ssl %{?broken_tests_x32} +%define broken_tests -x test_nntplib -x test_gdb -x test_site -x test_distutils -x test_bdist_rpm -x test_ssl %{?broken_tests_x32} %define py_ver 3.7 %define py_abi %{py_ver}m @@ -64,6 +64,7 @@ Patch11: %{name}-installcompile.patch # https://bugs.python.org/file21896/nonexistent_user.patch Patch12: nonexistent_user.patch Patch13: %{name}-no-randomize-tests.patch +Patch14: python3-profile-tests.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -102,9 +103,9 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define specflags_ppc64 -D__ppc64__=1 %if %{with verbose_tests} -%define test_flags -v -x +%define test_flags -v %else -%define test_flags -wW -x +%define test_flags -wW %endif %ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664} @@ -114,7 +115,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %endif %ifarch sparc -%define test_list %{nobuilder_tests} %{broken_tests} test_fcntl test_ioctl +%define test_list %{nobuilder_tests} %{broken_tests} -x test_fcntl -x test_ioctl %endif %description @@ -496,6 +497,7 @@ Moduły testowe dla Pythona. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 %{__rm} -r Modules/expat @@ -544,7 +546,9 @@ fi --with-lto %endif -%{__make} 2>&1 | awk ' +%{__make} \ + TESTOPTS="%{test_list}" \ + 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } { if ($0 ~ /\*\*\* WARNING:/) { From 1b1a21d480141920b60fe773cf3fa8e61b3e0576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 5 Aug 2019 20:10:05 +0200 Subject: [PATCH 095/180] - run imap4_host_default_value test with ipv4, so it should work on our vserver builder guests --- python3-tests.patch | 11 +++++++++++ python3.spec | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 python3-tests.patch diff --git a/python3-tests.patch b/python3-tests.patch new file mode 100644 index 0000000..7d19d37 --- /dev/null +++ b/python3-tests.patch @@ -0,0 +1,11 @@ +--- Python-3.7.4/Lib/test/test_imaplib.py~ 2019-07-08 20:03:50.000000000 +0200 ++++ Python-3.7.4/Lib/test/test_imaplib.py 2019-08-05 19:25:53.119629647 +0200 +@@ -73,7 +73,7 @@ class TestImaplib(unittest.TestCase): + + def test_imap4_host_default_value(self): + # Check whether the IMAP4_PORT is truly unavailable. +- with socket.socket() as s: ++ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + try: + s.connect(('', imaplib.IMAP4_PORT)) + self.skipTest( diff --git a/python3.spec b/python3.spec index 4ebc77f..f664800 100644 --- a/python3.spec +++ b/python3.spec @@ -65,6 +65,7 @@ Patch11: %{name}-installcompile.patch Patch12: nonexistent_user.patch Patch13: %{name}-no-randomize-tests.patch Patch14: python3-profile-tests.patch +Patch15: python3-tests.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: automake @@ -498,6 +499,7 @@ Moduły testowe dla Pythona. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 %{__rm} -r Modules/expat From 1680efba22eea8b048d57e99e04e88d9f7267aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Fri, 30 Aug 2019 08:18:21 +0200 Subject: [PATCH 096/180] - release 3 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index f664800..261b7e6 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.4 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Development/Languages/Python From 3e35963a43b07457bfd48aafb12cc1b0656eae77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 16 Oct 2019 11:15:07 +0200 Subject: [PATCH 097/180] - update to 3.8.0 m suffix dropped upstream; test_embed broken in similar way as https://bugs.python.org/issue35313 --- python-distro.patch | 11 --------- python3-db.patch | 12 +++++----- python3-multilib.patch | 48 +++++++++++++++++++++++++------------ python3-profile-tests.patch | 14 +++++------ python3.spec | 38 +++++++++++++++++++---------- 5 files changed, 71 insertions(+), 52 deletions(-) delete mode 100644 python-distro.patch diff --git a/python-distro.patch b/python-distro.patch deleted file mode 100644 index a052d76..0000000 --- a/python-distro.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-3.3.1/Lib/platform.py~ 2013-04-06 09:41:39.000000000 +0200 -+++ Python-3.3.1/Lib/platform.py 2013-05-11 16:25:29.566791008 +0200 -@@ -261,7 +261,7 @@ - _supported_dists = ( - 'SuSE', 'debian', 'fedora', 'redhat', 'centos', - 'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo', -- 'UnitedLinux', 'turbolinux', 'arch', 'mageia') -+ 'pld', 'UnitedLinux', 'turbolinux', 'arch', 'mageia') - - def _parse_release_file(firstline): - diff --git a/python3-db.patch b/python3-db.patch index 5674108..928aa62 100644 --- a/python3-db.patch +++ b/python3-db.patch @@ -9,18 +9,18 @@ min_db_ver = (3, 3) db_setup_debug = False # verbose debug prints from this script? ---- Python-3.6.0/setup.py~ 2016-12-27 23:21:52.000000000 +0100 -+++ Python-3.6.0/setup.py 2016-12-27 23:28:54.720208583 +0100 -@@ -1252,16 +1252,7 @@ class PyBuildExt(build_ext): +--- Python-3.8.0/setup.py~ 2019-10-15 10:03:10.000000000 +0200 ++++ Python-3.8.0/setup.py 2019-10-15 10:03:52.493993277 +0200 +@@ -1275,16 +1275,7 @@ class PyBuildExt(build_ext): for cand in dbm_order: if cand == "ndbm": - if find_file("ndbm.h", inc_dirs, []) is not None: + if find_file("ndbm.h", self.inc_dirs, []) is not None: - # Some systems have -lndbm, others have -lgdbm_compat, - # others don't have either -- if self.compiler.find_library_file(lib_dirs, +- if self.compiler.find_library_file(self.lib_dirs, - 'ndbm'): - ndbm_libs = ['ndbm'] -- elif self.compiler.find_library_file(lib_dirs, +- elif self.compiler.find_library_file(self.lib_dirs, - 'gdbm_compat'): - ndbm_libs = ['gdbm_compat'] - else: diff --git a/python3-multilib.patch b/python3-multilib.patch index 4898f2b..b546e49 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -215,15 +215,15 @@ diff -dur Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c #if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH) #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" -@@ -753,7 +753,7 @@ calculate_zip_path(PyCalculatePath *calc - else { - wcsncpy(calculate->zip_path, calculate->prefix, MAXPATHLEN); +@@ -1078,7 +1078,7 @@ calculate_zip_path(PyCalculatePath *calc + return PATHLEN_ERR(); + } + } +- status = joinpath(zip_path, L"lib/python00.zip", zip_path_len); ++ status = joinpath(zip_path, L"" LIB_PYTHON "00.zip", zip_path_len); + if (_PyStatus_EXCEPTION(status)) { + return status; } -- joinpath(calculate->zip_path, L"lib/python00.zip"); -+ joinpath(calculate->zip_path, L"" LIB_PYTHON "00.zip"); - - /* Replace "00" with version */ - size_t bufsz = wcslen(calculate->zip_path); @@ -878,7 +878,7 @@ calculate_init(PyCalculatePath *calculat if (!calculate->prefix) { return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); @@ -347,17 +347,35 @@ diff -dur Python-3.5.0.orig/setup.py Python-3.5.0/setup.py system_include_dirs = ['/usr/include'] # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can -@@ -750,11 +749,11 @@ +@@ -953,11 +953,11 @@ class PyBuildExt(build_ext): elif curses_library: readline_libs.append(curses_library) - elif self.compiler.find_library_file(lib_dirs + + elif self.compiler.find_library_file(self.lib_dirs + - ['/usr/lib/termcap'], + ['/usr/' + sys.lib + '/termcap'], 'termcap'): readline_libs.append('termcap') - exts.append( Extension('readline', ['readline.c'], -- library_dirs=['/usr/lib/termcap'], -+ library_dirs=['/usr/' + sys.lib + '/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs) ) + self.add(Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], ++ library_dirs=['/usr/' + sys.lib + '/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs)) else: + +--- Python-3.8.0/Lib/test/test_embed.py~ 2019-10-14 15:34:47.000000000 +0200 ++++ Python-3.8.0/Lib/test/test_embed.py 2019-10-15 11:53:55.299065729 +0200 +@@ -1071,11 +1071,11 @@ class InitConfigTests(EmbeddingTestsMixi + else: + ver = sys.version_info + return [ +- os.path.join(prefix, 'lib', ++ os.path.join(prefix, sys.lib, + f'python{ver.major}{ver.minor}.zip'), +- os.path.join(prefix, 'lib', ++ os.path.join(prefix, sys.lib, + f'python{ver.major}.{ver.minor}'), +- os.path.join(exec_prefix, 'lib', ++ os.path.join(exec_prefix, sys.lib, + f'python{ver.major}.{ver.minor}', 'lib-dynload'), + ] + diff --git a/python3-profile-tests.patch b/python3-profile-tests.patch index 11c0dc6..1148214 100644 --- a/python3-profile-tests.patch +++ b/python3-profile-tests.patch @@ -1,11 +1,11 @@ ---- Python-3.7.4/Makefile.pre.in~ 2019-08-05 14:10:46.000000000 +0200 -+++ Python-3.7.4/Makefile.pre.in 2019-08-05 14:37:01.691326225 +0200 +--- Python-3.8.0/Makefile.pre.in~ 2019-10-15 10:04:12.000000000 +0200 ++++ Python-3.8.0/Makefile.pre.in 2019-10-15 10:09:54.901153005 +0200 @@ -260,7 +260,7 @@ TCLTK_LIBS= @TCLTK_LIBS@ - # The task to run while instrumented when building the profile-opt target. - # We exclude unittests with -x that take a rediculious amount of time to - # run in the instrumented training build or do not provide much value. --PROFILE_TASK=-m test.regrtest --pgo -+PROFILE_TASK=-m test.regrtest --pgo $(TESTOPTS) + # To speed up profile generation, we don't run the full unit test suite + # by default. The default is "-m test --pgo". To run more tests, use + # PROFILE_TASK="-m test --pgo-extended" +-PROFILE_TASK= @PROFILE_TASK@ ++PROFILE_TASK= @PROFILE_TASK@ $(TESTOPTS) # report files for gcov / lcov coverage report COVERAGE_INFO= $(abs_builddir)/coverage.info diff --git a/python3.spec b/python3.spec index 261b7e6..a75a6c3 100644 --- a/python3.spec +++ b/python3.spec @@ -21,10 +21,10 @@ %define broken_tests_x32 -x test_time %undefine with_optimizations %endif -%define broken_tests -x test_nntplib -x test_gdb -x test_site -x test_distutils -x test_bdist_rpm -x test_ssl %{?broken_tests_x32} +%define broken_tests -x test_embed -x test_nntplib -x test_gdb -x test_site -x test_distutils -x test_bdist_rpm -x test_ssl %{?broken_tests_x32} -%define py_ver 3.7 -%define py_abi %{py_ver}m +%define py_ver 3.8 +%define py_abi %{py_ver} %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_gnu} %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.4 -Release: 3 +Version: %{py_ver}.0 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: d33e4aae66097051c2eca45ee3604803 +# Source0-md5: dbac8df9d8b9edc678d0f4cacdb7dbb0 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -55,7 +55,7 @@ Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-makefile-location.patch Patch5: %{name}-config.patch -Patch6: python-distro.patch + Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch @@ -490,7 +490,7 @@ Moduły testowe dla Pythona. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 + %patch7 -p1 %patch8 -p1 %patch9 -p1 @@ -503,7 +503,7 @@ Moduły testowe dla Pythona. %{__rm} -r Modules/expat -for SUBDIR in darwin libffi_msvc libffi_osx; do +for SUBDIR in darwin libffi_osx; do %{__rm} -r Modules/_ctypes/$SUBDIR/* done @@ -667,7 +667,9 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/python%{py_ver} +%if "%{py_ver}" != "%{py_abi}" %attr(755,root,root) %{_bindir}/python%{py_abi} +%endif %attr(755,root,root) %{_bindir}/python3 %{_mandir}/man1/python%{py_ver}.1* %{_mandir}/man1/python3.1* @@ -771,8 +773,6 @@ rm -rf $RPM_BUILD_ROOT %files modules %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-modules* -%attr(755,root,root) %{_bindir}/pyvenv -%attr(755,root,root) %{_bindir}/pyvenv-%{py_ver} %{py_libdir}/__future__.py %{py_libdir}/__phello__.foo.py %{py_libdir}/_bootlocale.py @@ -838,7 +838,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/inspect.py %{py_libdir}/ipaddress.py %{py_libdir}/lzma.py -%{py_libdir}/macpath.py %{py_libdir}/mailbox.py %{py_libdir}/mailcap.py %{py_libdir}/mimetypes.py @@ -908,6 +907,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/xdrlib.py %{py_libdir}/zipapp.py %{py_libdir}/zipfile.py +%{py_libdir}/zipimport.py %{py_libdir}/__pycache__/__future__.cpython-*.py[co] %{py_libdir}/__pycache__/__phello__.foo.cpython-*.py[co] %{py_libdir}/__pycache__/_bootlocale.cpython-*.py[co] @@ -973,7 +973,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/inspect.cpython-*.py[co] %{py_libdir}/__pycache__/ipaddress.cpython-*.py[co] %{py_libdir}/__pycache__/lzma.cpython-*.py[co] -%{py_libdir}/__pycache__/macpath.cpython-*.py[co] %{py_libdir}/__pycache__/mailbox.cpython-*.py[co] %{py_libdir}/__pycache__/mailcap.cpython-*.py[co] %{py_libdir}/__pycache__/mimetypes.cpython-*.py[co] @@ -1043,6 +1042,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/xdrlib.cpython-*.py[co] %{py_libdir}/__pycache__/zipapp.cpython-*.py[co] %{py_libdir}/__pycache__/zipfile.cpython-*.py[co] +%{py_libdir}/__pycache__/zipimport.cpython-*.py[co] # # list .so modules to be sure that all of them are built @@ -1081,6 +1081,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_multiprocessing.cpython-*.so %attr(755,root,root) %{py_dyndir}/_opcode.cpython-*.so %attr(755,root,root) %{py_dyndir}/_pickle.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_posixshmem.cpython-*.so %attr(755,root,root) %{py_dyndir}/_posixsubprocess.cpython-*.so %attr(755,root,root) %{py_dyndir}/_queue.cpython-*.so %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so @@ -1088,11 +1089,14 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_sha3.cpython-*.so %attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_statistics.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testinternalcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so %attr(755,root,root) %{py_dyndir}/_uuid.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_xxsubinterpreters.cpython-*.so %attr(755,root,root) %{py_dyndir}/_xxtestfuzz.cpython-*.so # for openssl < 0.9.8 package sha256 and sha512 modules @@ -1211,6 +1215,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/venv/*.py %dir %{py_libdir}/venv/scripts %dir %{py_libdir}/venv/scripts/common +%{py_libdir}/venv/scripts/common/Activate.ps1 %{py_libdir}/venv/scripts/common/activate %dir %{py_libdir}/venv/scripts/posix %{py_libdir}/venv/scripts/posix/activate.csh @@ -1272,12 +1277,15 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc Misc/{ACKS,NEWS,README,README.valgrind,valgrind-python.supp} %attr(755,root,root) %{_bindir}/python%{py_ver}-config +%if "%{py_ver}" != "%{py_abi}" %attr(755,root,root) %{_bindir}/python%{py_abi}-config +%endif %attr(755,root,root) %{_bindir}/python3-config %attr(755,root,root) %{_libdir}/libpython%{py_abi}.so %attr(755,root,root) %{_libdir}/libpython3.so %{py_incdir}/*.h %exclude %{py_incdir}/pyconfig.h +%{py_incdir}/cpython %{py_incdir}/internal %attr(755,root,root) %{py_libdir}/config-%{py_platform}/makesetup %attr(755,root,root) %{py_libdir}/config-%{py_platform}/install-sh @@ -1288,7 +1296,11 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/config-%{py_platform}/__pycache__ %{py_libdir}/config-%{py_platform}/__pycache__/python-config.* %{_pkgconfigdir}/python-%{py_ver}.pc +%{_pkgconfigdir}/python-%{py_ver}-embed.pc +%{_pkgconfigdir}/python3-embed.pc +%if "%{py_ver}" != "%{py_abi}" %{_pkgconfigdir}/python-%{py_abi}.pc +%endif %{_pkgconfigdir}/python3.pc %files devel-tools From ee08c4bfee37f96d9777feb5d26d4068e714ad58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 16 Oct 2019 13:43:04 +0200 Subject: [PATCH 098/180] - use ipv4 socket for connection (as builders don't have v6 network) --- python3-tests.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python3-tests.patch b/python3-tests.patch index 7d19d37..1272d4d 100644 --- a/python3-tests.patch +++ b/python3-tests.patch @@ -9,3 +9,12 @@ try: s.connect(('', imaplib.IMAP4_PORT)) self.skipTest( +@@ -84,7 +84,7 @@ class TestImaplib(unittest.TestCase): + # This is the exception that should be raised. + expected_errnos = support.get_socket_conn_refused_errs() + with self.assertRaises(OSError) as cm: +- imaplib.IMAP4() ++ imaplib.IMAP4('0.0.0.0') + self.assertIn(cm.exception.errno, expected_errnos) + + From 40659c80f67c8d4c60564175d9795fb410b86321 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Wed, 25 Dec 2019 08:41:53 +0100 Subject: [PATCH 099/180] - updated to 3.8.1 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index a75a6c3..ad55fd4 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.0 +Version: %{py_ver}.1 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: dbac8df9d8b9edc678d0f4cacdb7dbb0 +# Source0-md5: b3fb85fd479c0bf950c626ef80cacb57 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 59758f4da1abef93ee9664ae4ac02cb7495f7c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 8 Jan 2020 10:06:04 +0100 Subject: [PATCH 100/180] - rel 2; fix more shebangs --- python3.spec | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index ad55fd4..a65336b 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.1 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -515,6 +515,20 @@ for f in $files; do done %endif +sed -E -i -e '1s,#![[:space:]]*/usr/bin/env[[:space:]]+python2,#!%{__python},' -e '1s,#![[:space:]]*/usr/bin/env[[:space:]]+python,#!%{__python},' -e '1s,#![[:space:]]*/usr/bin/python,#!%{__python},' \ + Lib/encodings/rot_13.py \ + Lib/lib2to3/tests/data/different_encoding.py \ + Lib/lib2to3/tests/data/false_encoding.py \ + Tools/gdb/libpython.py \ + Tools/pynche/pynche \ + Tools/pynche/pynche.pyw \ + Tools/scripts/2to3 \ + Tools/scripts/smelly.py + +sed -E -i -e '1s,#![[:space:]]*/usr/bin/env[[:space:]]+python3,#!%{__python3},' \ + Tools/scripts/idle3 \ + Tools/scripts/pydoc3 + find . -name '*.py' | xargs -r grep -El '^#! */usr/bin/env python3?' | xargs %{__sed} -i -e '1s,^#! */usr/bin/env python3\?,#!/usr/bin/python3,' %build From 50df40d50b6d8c8898228acae344c5daef4f8048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 9 Jan 2020 10:23:24 +0100 Subject: [PATCH 101/180] - rel 3; more shebang fixes --- python3.spec | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/python3.spec b/python3.spec index a65336b..947ad7e 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.1 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -515,19 +515,15 @@ for f in $files; do done %endif -sed -E -i -e '1s,#![[:space:]]*/usr/bin/env[[:space:]]+python2,#!%{__python},' -e '1s,#![[:space:]]*/usr/bin/env[[:space:]]+python,#!%{__python},' -e '1s,#![[:space:]]*/usr/bin/python,#!%{__python},' \ - Lib/encodings/rot_13.py \ - Lib/lib2to3/tests/data/different_encoding.py \ - Lib/lib2to3/tests/data/false_encoding.py \ - Tools/gdb/libpython.py \ - Tools/pynche/pynche \ - Tools/pynche/pynche.pyw \ - Tools/scripts/2to3 \ - Tools/scripts/smelly.py - -sed -E -i -e '1s,#![[:space:]]*/usr/bin/env[[:space:]]+python3,#!%{__python3},' \ - Tools/scripts/idle3 \ - Tools/scripts/pydoc3 +sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \ + Tools/gdb/libpython.py \ + Tools/pynche/pynche \ + Tools/pynche/pynche.pyw \ + Tools/scripts/2to3 + +sed -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \ + Tools/scripts/idle3 \ + Tools/scripts/pydoc3 find . -name '*.py' | xargs -r grep -El '^#! */usr/bin/env python3?' | xargs %{__sed} -i -e '1s,^#! */usr/bin/env python3\?,#!/usr/bin/python3,' From 71237db43410b763ca7e9b3513687e073ff0a2ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 26 Feb 2020 13:09:10 +0100 Subject: [PATCH 102/180] - up to 3.8.2 --- python3.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index 947ad7e..c4f7db7 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.1 -Release: 3 +Version: %{py_ver}.2 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: b3fb85fd479c0bf950c626ef80cacb57 +# Source0-md5: e9d6ebc92183a177b8e8a58cad5b8d67 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From ff3683d3e940d6fdf7aca7fab2e57be5d6556e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 15 Mar 2020 21:57:06 +0100 Subject: [PATCH 103/180] - rel 2; fixes some multiprocessing hang - https://bugs.python.org/issue38744 --- bug-38744.patch | 90 +++++++++++++++++++++++++++++++++++++++++++++++++ python3.spec | 6 ++-- 2 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 bug-38744.patch diff --git a/bug-38744.patch b/bug-38744.patch new file mode 100644 index 0000000..259b547 --- /dev/null +++ b/bug-38744.patch @@ -0,0 +1,90 @@ +From ef8bff34231bb9c74fe349905bc29b5be8a48325 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Batuhan=20Ta=C5=9Fkaya?= + <47358913+isidentical@users.noreply.github.com> +Date: Sun, 15 Mar 2020 22:45:56 +0300 +Subject: [PATCH] bpo-39360: Ensure all workers exit when finalizing a + multiprocessing Pool (GH-19009) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads. + +This commit moves the notification to the _terminate_pool function so is called from both code paths. + +Co-authored-by: Pablo Galindo +(cherry picked from commit ac10e0c93218627d1a639db0b7b41714c5f6a883) + +Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com> +--- + Lib/multiprocessing/pool.py | 7 +++++-- + Lib/test/_test_multiprocessing.py | 18 ++++++++++++++++++ + .../2020-03-15-05-41-05.bpo-39360.cmcU5p.rst | 4 ++++ + 3 files changed, 27 insertions(+), 2 deletions(-) + create mode 100644 Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst + +diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py +index b223d6aa724bb..41dd923d4f974 100644 +--- a/Lib/multiprocessing/pool.py ++++ b/Lib/multiprocessing/pool.py +@@ -651,8 +651,6 @@ def close(self): + def terminate(self): + util.debug('terminating pool') + self._state = TERMINATE +- self._worker_handler._state = TERMINATE +- self._change_notifier.put(None) + self._terminate() + + def join(self): +@@ -682,7 +680,12 @@ def _terminate_pool(cls, taskqueue, inqueue, outqueue, pool, change_notifier, + # this is guaranteed to only be called once + util.debug('finalizing pool') + ++ # Notify that the worker_handler state has been changed so the ++ # _handle_workers loop can be unblocked (and exited) in order to ++ # send the finalization sentinel all the workers. + worker_handler._state = TERMINATE ++ change_notifier.put(None) ++ + task_handler._state = TERMINATE + + util.debug('helping task handler/workers to finish') +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +index de912428737f9..e64a8e9b3b879 100644 +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -2778,6 +2778,24 @@ def test_pool_worker_lifetime_early_close(self): + for (j, res) in enumerate(results): + self.assertEqual(res.get(), sqr(j)) + ++ def test_worker_finalization_via_atexit_handler_of_multiprocessing(self): ++ # tests cases against bpo-38744 and bpo-39360 ++ cmd = '''if 1: ++ from multiprocessing import Pool ++ problem = None ++ class A: ++ def __init__(self): ++ self.pool = Pool(processes=1) ++ def test(): ++ global problem ++ problem = A() ++ problem.pool.map(float, tuple(range(10))) ++ if __name__ == "__main__": ++ test() ++ ''' ++ rc, out, err = test.support.script_helper.assert_python_ok('-c', cmd) ++ self.assertEqual(rc, 0) ++ + # + # Test of creating a customized manager class + # +diff --git a/Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst b/Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst +new file mode 100644 +index 0000000000000..148878886e6ee +--- /dev/null ++++ b/Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst +@@ -0,0 +1,4 @@ ++Ensure all workers exit when finalizing a :class:`multiprocessing.Pool` implicitly via the module finalization ++handlers of multiprocessing. This fixes a deadlock situation that can be experienced when the Pool is not ++properly finalized via the context manager or a call to ``multiprocessing.Pool.terminate``. Patch by Batuhan Taskaya ++and Pablo Galindo. diff --git a/python3.spec b/python3.spec index c4f7db7..c32bb2d 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -55,7 +55,7 @@ Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-makefile-location.patch Patch5: %{name}-config.patch - +Patch6: bug-38744.patch Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch @@ -490,7 +490,7 @@ Moduły testowe dla Pythona. %patch3 -p1 %patch4 -p1 %patch5 -p1 - +%patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 From e04006591315566ddb164ab95c1e5c540bf93de9 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 21 Apr 2020 21:12:49 +0200 Subject: [PATCH 104/180] - require mpdecimal with div+sqrt memory exhaustion fix; release 3 --- python3.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index c32bb2d..e729f00 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -82,7 +82,7 @@ BuildRequires: glibc-localedb-all BuildRequires: gmp-devel >= 4.0 BuildRequires: libffi-devel BuildRequires: libstdc++-devel -%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.4.1} +%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.4.2-2} BuildRequires: ncurses-ext-devel >= 5.2 BuildRequires: openssl-devel >= 0.9.7 BuildRequires: pkgconfig @@ -240,7 +240,7 @@ Summary: Python modules Summary(pl.UTF-8): Moduły języka Python Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} -%{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.1} +%{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.2-2} Obsoletes: python3-modules-sqlite %requires_ge_to openssl openssl-devel From 6c328c96f888f1ddc39170c26505bfab48ad3dbc Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sat, 2 May 2020 13:02:01 +0200 Subject: [PATCH 105/180] add support for aarch64 --- pyconfig.h.in | 2 +- python3-multilib.patch | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyconfig.h.in b/pyconfig.h.in index 0107653..4de8ae0 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1,5 +1,5 @@ #ifndef Py_PYCONFIG_H -#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) +#if defined(__x86_64__) || defined(__aarch64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) #if defined(__ILP32__) #include "@PREFIX@/libx32/python@PY_VER@/config-@PY_ABI@/pyconfig.h" #else diff --git a/python3-multilib.patch b/python3-multilib.patch index b546e49..96fafe6 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -202,7 +202,7 @@ diff -dur Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c #endif +#ifndef LIB_PYTHON -+#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) ++#if defined(__x86_64__) || defined(__aarch64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) +#if defined(__ILP32__) +#define LIB_PYTHON "libx32/python" +#else @@ -308,7 +308,7 @@ diff -dur Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac +esac + +case $ARCH:$python_cv_cc_64bit_output in -+powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) ++powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes | aarch64:yes) + LIB="lib64" + ;; +x86_64:no) From 2a86e7004343c57481fa975dc0bfe4cf98ba4fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 15 May 2020 23:55:37 +0200 Subject: [PATCH 106/180] - up to 3.8.3 --- bug-38744.patch | 90 ------------------------------------------------- python3.spec | 10 +++--- 2 files changed, 5 insertions(+), 95 deletions(-) delete mode 100644 bug-38744.patch diff --git a/bug-38744.patch b/bug-38744.patch deleted file mode 100644 index 259b547..0000000 --- a/bug-38744.patch +++ /dev/null @@ -1,90 +0,0 @@ -From ef8bff34231bb9c74fe349905bc29b5be8a48325 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Batuhan=20Ta=C5=9Fkaya?= - <47358913+isidentical@users.noreply.github.com> -Date: Sun, 15 Mar 2020 22:45:56 +0300 -Subject: [PATCH] bpo-39360: Ensure all workers exit when finalizing a - multiprocessing Pool (GH-19009) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads. - -This commit moves the notification to the _terminate_pool function so is called from both code paths. - -Co-authored-by: Pablo Galindo -(cherry picked from commit ac10e0c93218627d1a639db0b7b41714c5f6a883) - -Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com> ---- - Lib/multiprocessing/pool.py | 7 +++++-- - Lib/test/_test_multiprocessing.py | 18 ++++++++++++++++++ - .../2020-03-15-05-41-05.bpo-39360.cmcU5p.rst | 4 ++++ - 3 files changed, 27 insertions(+), 2 deletions(-) - create mode 100644 Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst - -diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py -index b223d6aa724bb..41dd923d4f974 100644 ---- a/Lib/multiprocessing/pool.py -+++ b/Lib/multiprocessing/pool.py -@@ -651,8 +651,6 @@ def close(self): - def terminate(self): - util.debug('terminating pool') - self._state = TERMINATE -- self._worker_handler._state = TERMINATE -- self._change_notifier.put(None) - self._terminate() - - def join(self): -@@ -682,7 +680,12 @@ def _terminate_pool(cls, taskqueue, inqueue, outqueue, pool, change_notifier, - # this is guaranteed to only be called once - util.debug('finalizing pool') - -+ # Notify that the worker_handler state has been changed so the -+ # _handle_workers loop can be unblocked (and exited) in order to -+ # send the finalization sentinel all the workers. - worker_handler._state = TERMINATE -+ change_notifier.put(None) -+ - task_handler._state = TERMINATE - - util.debug('helping task handler/workers to finish') -diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py -index de912428737f9..e64a8e9b3b879 100644 ---- a/Lib/test/_test_multiprocessing.py -+++ b/Lib/test/_test_multiprocessing.py -@@ -2778,6 +2778,24 @@ def test_pool_worker_lifetime_early_close(self): - for (j, res) in enumerate(results): - self.assertEqual(res.get(), sqr(j)) - -+ def test_worker_finalization_via_atexit_handler_of_multiprocessing(self): -+ # tests cases against bpo-38744 and bpo-39360 -+ cmd = '''if 1: -+ from multiprocessing import Pool -+ problem = None -+ class A: -+ def __init__(self): -+ self.pool = Pool(processes=1) -+ def test(): -+ global problem -+ problem = A() -+ problem.pool.map(float, tuple(range(10))) -+ if __name__ == "__main__": -+ test() -+ ''' -+ rc, out, err = test.support.script_helper.assert_python_ok('-c', cmd) -+ self.assertEqual(rc, 0) -+ - # - # Test of creating a customized manager class - # -diff --git a/Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst b/Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst -new file mode 100644 -index 0000000000000..148878886e6ee ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2020-03-15-05-41-05.bpo-39360.cmcU5p.rst -@@ -0,0 +1,4 @@ -+Ensure all workers exit when finalizing a :class:`multiprocessing.Pool` implicitly via the module finalization -+handlers of multiprocessing. This fixes a deadlock situation that can be experienced when the Pool is not -+properly finalized via the context manager or a call to ``multiprocessing.Pool.terminate``. Patch by Batuhan Taskaya -+and Pablo Galindo. diff --git a/python3.spec b/python3.spec index e729f00..384f70f 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.2 -Release: 3 +Version: %{py_ver}.3 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: e9d6ebc92183a177b8e8a58cad5b8d67 +# Source0-md5: 3000cf50aaa413052aef82fd2122ca78 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -55,7 +55,7 @@ Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-makefile-location.patch Patch5: %{name}-config.patch -Patch6: bug-38744.patch + Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch @@ -490,7 +490,7 @@ Moduły testowe dla Pythona. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 + %patch7 -p1 %patch8 -p1 %patch9 -p1 From 75666f591f3533e522cb8209ebb5042591a6d92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 14 Jul 2020 14:11:23 +0200 Subject: [PATCH 107/180] - up to 3.8.4 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 384f70f..f5d5146 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.3 +Version: %{py_ver}.4 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 3000cf50aaa413052aef82fd2122ca78 +# Source0-md5: e16df33cd7b58702e57e137f8f5d13e7 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 12dc365087aa4b3512c206be436b74379b2a8553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 21 Jul 2020 22:06:18 +0200 Subject: [PATCH 108/180] - up to 3.8.5; SECURITY fixes --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index f5d5146..0f9aeca 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.4 +Version: %{py_ver}.5 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: e16df33cd7b58702e57e137f8f5d13e7 +# Source0-md5: 35b5a3d0254c1c59be9736373d429db7 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 0d7215c9fc98177840a06b22a40d7b1393a00c66 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 30 Aug 2020 01:58:11 +0200 Subject: [PATCH 109/180] - build with libtirpc+libnsl 1.x; release 2 --- python3.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 0f9aeca..7dc90c4 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.5 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -81,7 +81,9 @@ BuildRequires: glibc-localedb-all %endif BuildRequires: gmp-devel >= 4.0 BuildRequires: libffi-devel +BuildRequires: libnsl-devel BuildRequires: libstdc++-devel +BuildRequires: libtirpc-devel %{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.4.2-2} BuildRequires: ncurses-ext-devel >= 5.2 BuildRequires: openssl-devel >= 0.9.7 From 49e8feb60e335b8c23f3b0e6ec9d2bf1a40618aa Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 17 Sep 2020 16:11:57 +0200 Subject: [PATCH 110/180] - added BLDLIBRARY patch (drop "-L." from BLDLIBRARY config variable) - unify multilib with python2: Do not use $prefix/share in default install scheme (it broke virtualenv) - release 3 --- python3-BLDLIBRARY.patch | 83 ++++++++++++++++++++++++++++++++++++++++ python3-multilib.patch | 4 +- python3.spec | 6 +-- 3 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 python3-BLDLIBRARY.patch diff --git a/python3-BLDLIBRARY.patch b/python3-BLDLIBRARY.patch new file mode 100644 index 0000000..1d7dd06 --- /dev/null +++ b/python3-BLDLIBRARY.patch @@ -0,0 +1,83 @@ +--- Python-3.8.5/Makefile.pre.in.orig 2020-09-17 07:55:13.731893519 +0200 ++++ Python-3.8.5/Makefile.pre.in 2020-09-17 10:33:36.683744945 +0200 +@@ -224,6 +224,7 @@ + LIBRARY= @LIBRARY@ + LDLIBRARY= @LDLIBRARY@ + BLDLIBRARY= @BLDLIBRARY@ ++BLDLIBDIR= @BLDLIBDIR@ + PY3LIBRARY= @PY3LIBRARY@ + DLLLIBRARY= @DLLLIBRARY@ + LDLIBRARYDIR= @LDLIBRARYDIR@ +@@ -565,7 +566,7 @@ + + # Build the interpreter + $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) +- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) ++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + + platform: $(BUILDPYTHON) pybuilddir.txt + $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform +@@ -696,7 +697,7 @@ + + + Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) +- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) ++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + + ############################################################################ + # Importlib +--- Python-3.8.5/configure.ac.orig 2020-09-17 07:55:13.735226834 +0200 ++++ Python-3.8.5/configure.ac 2020-09-17 10:46:44.172812084 +0200 +@@ -1033,6 +1033,7 @@ + # with the ABI build flags appended. + AC_SUBST(LDLIBRARY) + AC_SUBST(DLLLIBRARY) ++AC_SUBST(BLDLIBDIR) + AC_SUBST(BLDLIBRARY) + AC_SUBST(PY3LIBRARY) + AC_SUBST(LDLIBRARYDIR) +@@ -1040,6 +1041,7 @@ + AC_SUBST(RUNSHARED) + AC_SUBST(LDVERSION) + LDLIBRARY="$LIBRARY" ++BLDLIBDIR='' + BLDLIBRARY='$(LDLIBRARY)' + INSTSONAME='$(LDLIBRARY)' + DLLLIBRARY='' +@@ -1156,7 +1158,8 @@ + ;; + SunOS*) + LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.' ++ BLDLIBRARY='-lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + INSTSONAME="$LDLIBRARY".$SOVERSION + if test "$with_pydebug" != yes +@@ -1166,7 +1169,8 @@ + ;; + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) + LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-L.' ++ BLDLIBRARY='-lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + INSTSONAME="$LDLIBRARY".$SOVERSION + if test "$with_pydebug" != yes +@@ -1183,12 +1187,14 @@ + LDLIBRARY='libpython$(LDVERSION).sl' + ;; + esac +- BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-Wl,+b,$(LIBDIR) -L.' ++ BLDLIBRARY='-lpython$(VERSION)' + RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} + ;; + Darwin*) + LDLIBRARY='libpython$(LDVERSION).dylib' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-L.' ++ BLDLIBRARY='-lpython$(LDVERSION)' + RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} + ;; + AIX*) diff --git a/python3-multilib.patch b/python3-multilib.patch index 96fafe6..d54c591 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -49,10 +49,10 @@ diff -dur Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutil prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": -+ if plat_specific: ++ if plat_specific or standard_lib or prefix != "/usr": + lib = sys.lib + else: -+ lib = 'share' ++ lib = "share" libpython = os.path.join(prefix, - "lib", "python" + get_python_version()) + lib, "python" + get_python_version()) diff --git a/python3.spec b/python3.spec index 7dc90c4..7171b8e 100644 --- a/python3.spec +++ b/python3.spec @@ -42,7 +42,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.5 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Development/Languages/Python @@ -55,7 +55,7 @@ Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-makefile-location.patch Patch5: %{name}-config.patch - +Patch6: %{name}-BLDLIBRARY.patch Patch7: %{name}-db.patch Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch @@ -492,7 +492,7 @@ Moduły testowe dla Pythona. %patch3 -p1 %patch4 -p1 %patch5 -p1 - +%patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 From bbde3964f186ef4dc9a9e817fc805d095d837dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 27 Sep 2020 10:32:59 +0200 Subject: [PATCH 111/180] - up to 3.8.6 --- python3.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index 7171b8e..be3b221 100644 --- a/python3.spec +++ b/python3.spec @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.5 -Release: 3 +Version: %{py_ver}.6 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 35b5a3d0254c1c59be9736373d429db7 +# Source0-md5: 69e73c49eeb1a853cefd26d18c9d069d Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From f31061ec2b2f48882a414452bb12c891e6f1a2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 6 Oct 2020 18:06:06 +0200 Subject: [PATCH 112/180] - partial 3.9.0 update; builds without multilib patch; multilib patch needs to be updated in limited form while the rest will be handled by new --with-platlibdir option --- python3-BLDLIBRARY.patch | 8 ++++---- python3-installcompile.patch | 6 +++--- python3-multilib.patch | 4 ++-- python3.spec | 29 ++++++++++++++++++----------- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/python3-BLDLIBRARY.patch b/python3-BLDLIBRARY.patch index 1d7dd06..10000ab 100644 --- a/python3-BLDLIBRARY.patch +++ b/python3-BLDLIBRARY.patch @@ -8,19 +8,19 @@ PY3LIBRARY= @PY3LIBRARY@ DLLLIBRARY= @DLLLIBRARY@ LDLIBRARYDIR= @LDLIBRARYDIR@ -@@ -565,7 +566,7 @@ +@@ -588,7 +588,7 @@ clinic: check-clean-src $(srcdir)/Module # Build the interpreter - $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) + $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) - $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) platform: $(BUILDPYTHON) pybuilddir.txt $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform -@@ -696,7 +697,7 @@ +@@ -723,7 +723,7 @@ Makefile Modules/config.c: Makefile.pre - Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) + Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) - $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) diff --git a/python3-installcompile.patch b/python3-installcompile.patch index 20107ba..dd9268e 100644 --- a/python3-installcompile.patch +++ b/python3-installcompile.patch @@ -18,13 +18,13 @@ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST) -f \ -@@ -1700,7 +1700,7 @@ Python/thread.o: @THREADHEADERS@ +@@ -1939,7 +1939,7 @@ Python/thread.o: @THREADHEADERS@ $(srcdi .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools .PHONY: frameworkaltinstallunixtools recheck clean clobber distclean -.PHONY: smelly funny patchcheck touch altmaninstall commoninstall +.PHONY: smelly funny patchcheck touch altmaninstall installcompile commoninstall + .PHONY: clean-retain-profile profile-removal run_profile_task + .PHONY: build_all_generate_profile build_all_merge_profile .PHONY: gdbhooks - - # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/python3-multilib.patch b/python3-multilib.patch index d54c591..1b8be9d 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -27,7 +27,7 @@ diff -dur Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/di INSTALL_SCHEMES = { 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', -- 'platlib': '$platbase/lib/python$py_version_short/site-packages', +- 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', + 'purelib': '$base/'+libname+'/python$py_version_short/site-packages', + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', @@ -36,7 +36,7 @@ diff -dur Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/di }, 'unix_home': { - 'purelib': '$base/lib/python', -- 'platlib': '$base/lib/python', +- 'platlib': '$base/$platlibdir/python', + 'purelib': '$base/'+libname+'/python', + 'platlib': '$base/'+libname+'/python', 'headers': '$base/include/python/$dist_name', diff --git a/python3.spec b/python3.spec index be3b221..ac746e6 100644 --- a/python3.spec +++ b/python3.spec @@ -23,7 +23,7 @@ %endif %define broken_tests -x test_embed -x test_nntplib -x test_gdb -x test_site -x test_distutils -x test_bdist_rpm -x test_ssl %{?broken_tests_x32} -%define py_ver 3.8 +%define py_ver 3.9 %define py_abi %{py_ver} %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_gnu} %define py_prefix %{_prefix} @@ -41,13 +41,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.6 -Release: 1 +Version: %{py_ver}.0 +Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 69e73c49eeb1a853cefd26d18c9d069d +# Source0-md5: 6ebfe157f6e88d9eabfbaf3fa92129f6 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -84,7 +84,7 @@ BuildRequires: libffi-devel BuildRequires: libnsl-devel BuildRequires: libstdc++-devel BuildRequires: libtirpc-devel -%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.4.2-2} +%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.5.0} BuildRequires: ncurses-ext-devel >= 5.2 BuildRequires: openssl-devel >= 0.9.7 BuildRequires: pkgconfig @@ -551,6 +551,7 @@ fi --with-dbmliborder=gdbm:ndbm:bdb \ --with-doc-strings \ --without-ensurepip \ + --with-platlibdir="%{_lib}" \ %{?with_debug:--with-pydebug} \ --with-system-expat \ --with-system-ffi \ @@ -645,7 +646,6 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve # just to cut the noise, as they are not packaged (now) %{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib* -%{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/wininst*.exe %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.bat %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/*.pyw %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html @@ -787,10 +787,11 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-modules* %{py_libdir}/__future__.py %{py_libdir}/__phello__.foo.py +%{py_libdir}/_aix_support.py %{py_libdir}/_bootlocale.py +%{py_libdir}/_bootsubprocess.py %{py_libdir}/_compat_pickle.py %{py_libdir}/_compression.py -%{py_libdir}/_dummy_thread.py %{py_libdir}/_markupbase.py %{py_libdir}/_osx_support.py %{py_libdir}/_pydecimal.py @@ -830,7 +831,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/difflib.py %{py_libdir}/dis.py %{py_libdir}/doctest.py -%{py_libdir}/dummy_threading.py %{py_libdir}/filecmp.py %{py_libdir}/fileinput.py %{py_libdir}/fnmatch.py @@ -841,6 +841,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/getpass.py %{py_libdir}/gettext.py %{py_libdir}/glob.py +%{py_libdir}/graphlib.py %{py_libdir}/gzip.py %{py_libdir}/hashlib.py %{py_libdir}/hmac.py @@ -922,10 +923,11 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/zipimport.py %{py_libdir}/__pycache__/__future__.cpython-*.py[co] %{py_libdir}/__pycache__/__phello__.foo.cpython-*.py[co] +%{py_libdir}/__pycache__/_aix_support.cpython-*.py[co] %{py_libdir}/__pycache__/_bootlocale.cpython-*.py[co] +%{py_libdir}/__pycache__/_bootsubprocess.cpython-*.py[co] %{py_libdir}/__pycache__/_compat_pickle.cpython-*.py[co] %{py_libdir}/__pycache__/_compression.cpython-*.py[co] -%{py_libdir}/__pycache__/_dummy_thread.cpython-*.py[co] %{py_libdir}/__pycache__/_markupbase.cpython-*.py[co] %{py_libdir}/__pycache__/_osx_support.cpython-*.py[co] %{py_libdir}/__pycache__/_pydecimal.cpython-*.py[co] @@ -965,7 +967,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/difflib.cpython-*.py[co] %{py_libdir}/__pycache__/dis.cpython-*.py[co] %{py_libdir}/__pycache__/doctest.cpython-*.py[co] -%{py_libdir}/__pycache__/dummy_threading.cpython-*.py[co] %{py_libdir}/__pycache__/filecmp.cpython-*.py[co] %{py_libdir}/__pycache__/fileinput.cpython-*.py[co] %{py_libdir}/__pycache__/fnmatch.cpython-*.py[co] @@ -976,6 +977,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/getpass.cpython-*.py[co] %{py_libdir}/__pycache__/gettext.cpython-*.py[co] %{py_libdir}/__pycache__/glob.cpython-*.py[co] +%{py_libdir}/__pycache__/graphlib.cpython-*.py[co] %{py_libdir}/__pycache__/gzip.cpython-*.py[co] %{py_libdir}/__pycache__/hashlib.cpython-*.py[co] %{py_libdir}/__pycache__/hmac.cpython-*.py[co] @@ -1262,6 +1264,11 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/sqlite3/__pycache__ %{py_libdir}/sqlite3/*.py +%attr(755,root,root) %{py_dyndir}/_zoneinfo.cpython-*.so +%dir %{py_libdir}/zoneinfo +%{py_libdir}/zoneinfo/__pycache__ +%{py_libdir}/zoneinfo/*.py + %files -n pydoc3 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/pydoc3 @@ -1346,7 +1353,7 @@ rm -rf $RPM_BUILD_ROOT %files static %defattr(644,root,root,755) -%{_libdir}/libpython%{py_abi}.a +%{py_libdir}/config-*/libpython%{py_abi}.a %files examples %defattr(644,root,root,755) From 08df40decb41b337acc54601c3204cc4d18df211 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sun, 29 Nov 2020 12:49:53 +0100 Subject: [PATCH 113/180] adjust abi in python platform for armhf --- python3.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index ac746e6..28b9464 100644 --- a/python3.spec +++ b/python3.spec @@ -23,9 +23,15 @@ %endif %define broken_tests -x test_embed -x test_nntplib -x test_gdb -x test_site -x test_distutils -x test_bdist_rpm -x test_ssl %{?broken_tests_x32} +%ifarch armv6hl armv7hl armv7hnl +%define _python_target_abi %{?_gnu}hf +%else +%define _python_target_abi %{?_gnu} +%endif + %define py_ver 3.9 %define py_abi %{py_ver} -%define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_gnu} +%define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_python_target_abi} %define py_prefix %{_prefix} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} %define py_incdir %{_includedir}/python%{py_abi} From 520f15b4893f431b4c64ea7c8ad347bb1a64f44a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 6 Feb 2021 02:41:09 +0100 Subject: [PATCH 114/180] - up to 3.9.1; try to minimize multilib patch (drop adding new API/ABI functions; use upstream platlibdir where possible); drop ancient -fno-caller-save flag; run tests with parallel (speeds up build a lot) --- python3-multilib.patch | 358 ++++++++--------------------------------- python3.spec | 13 +- 2 files changed, 72 insertions(+), 299 deletions(-) diff --git a/python3-multilib.patch b/python3-multilib.patch index 1b8be9d..9863ccb 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -1,115 +1,79 @@ -diff -dur Python-3.5.0.orig/Include/pylifecycle.h Python-3.5.0/Include/pylifecycle.h ---- Python-3.5.0.orig/Include/pylifecycle.h 2015-09-13 13:41:20.000000000 +0200 -+++ Python-3.5.0/Include/pylifecycle.h 2015-12-03 17:31:03.874280444 +0100 -@@ -65,6 +65,8 @@ - /* In their own files */ - PyAPI_FUNC(const char *) Py_GetVersion(void); - PyAPI_FUNC(const char *) Py_GetPlatform(void); -+PyAPI_FUNC(const char *) Py_GetArch(void); -+PyAPI_FUNC(const char *) Py_GetLib(void); - PyAPI_FUNC(const char *) Py_GetCopyright(void); - PyAPI_FUNC(const char *) Py_GetCompiler(void); - PyAPI_FUNC(const char *) Py_GetBuildInfo(void); -diff -dur Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py ---- Python-3.5.0.orig/Lib/distutils/command/install.py 2015-09-13 13:41:20.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/command/install.py 2015-12-03 17:31:03.874280444 +0100 -@@ -19,6 +19,8 @@ - from site import USER_SITE - HAS_USER_SITE = True - -+libname = sys.lib -+ - WINDOWS_SCHEME = { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', -@@ -29,15 +31,15 @@ +diff -urNp Python-3.8.7.org/Lib/distutils/command/install.py Python-3.8.7/Lib/distutils/command/install.py +--- Python-3.8.7.org/Lib/distutils/command/install.py 2020-12-21 17:25:24.000000000 +0100 ++++ Python-3.8.7/Lib/distutils/command/install.py 2021-02-06 00:56:02.718897271 +0100 +@@ -31,14 +31,14 @@ WINDOWS_SCHEME = { INSTALL_SCHEMES = { 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', -- 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', -+ 'purelib': '$base/'+libname+'/python$py_version_short/site-packages', -+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', ++ 'purelib': '$base/$platlibdir/python$py_version_short/site-packages', + 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', 'scripts': '$base/bin', 'data' : '$base', }, 'unix_home': { - 'purelib': '$base/lib/python', -- 'platlib': '$base/$platlibdir/python', -+ 'purelib': '$base/'+libname+'/python', -+ 'platlib': '$base/'+libname+'/python', ++ 'purelib': '$base/$platlibdir/python', + 'platlib': '$base/$platlibdir/python', 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', - 'data' : '$base', -diff -dur Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py ---- Python-3.5.0.orig/Lib/distutils/sysconfig.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-12-03 17:31:03.874280444 +0100 -@@ -132,8 +132,12 @@ +diff -urNp Python-3.8.7.org/Lib/distutils/sysconfig.py Python-3.8.7/Lib/distutils/sysconfig.py +--- Python-3.8.7.org/Lib/distutils/sysconfig.py 2020-12-21 17:25:24.000000000 +0100 ++++ Python-3.8.7/Lib/distutils/sysconfig.py 2021-02-06 00:56:02.718897271 +0100 +@@ -145,13 +145,13 @@ def get_python_lib(plat_specific=0, stan prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": +- if plat_specific or standard_lib: + if plat_specific or standard_lib or prefix != "/usr": -+ lib = sys.lib -+ else: -+ lib = "share" - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib, "python" + get_python_version()) - if standard_lib: - return libpython + # Platform-specific modules (any module from a non-pure-Python + # module distribution) or standard Python library modules. + libdir = sys.platlibdir else: -diff -dur Python-3.5.0.orig/Lib/distutils/tests/test_install.py Python-3.5.0/Lib/distutils/tests/test_install.py ---- Python-3.5.0.orig/Lib/distutils/tests/test_install.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/tests/test_install.py 2015-12-03 17:31:03.874280444 +0100 -@@ -55,7 +55,7 @@ + # Pure Python +- libdir = "lib" ++ libdir = "share" + libpython = os.path.join(prefix, libdir, + "python" + get_python_version()) + if standard_lib: +diff -urNp Python-3.8.7.org/Lib/distutils/tests/test_install.py Python-3.8.7/Lib/distutils/tests/test_install.py +--- Python-3.8.7.org/Lib/distutils/tests/test_install.py 2020-12-21 17:25:24.000000000 +0100 ++++ Python-3.8.7/Lib/distutils/tests/test_install.py 2021-02-06 00:56:02.722230710 +0100 +@@ -56,7 +56,7 @@ class InstallTestCase(support.TempdirMan expected = os.path.normpath(expected) self.assertEqual(got, expected) - libdir = os.path.join(destination, "lib", "python") -+ libdir = os.path.join(destination, sys.lib, "python") ++ libdir = os.path.join(destination, sys.platlibdir, "python") check_path(cmd.install_lib, libdir) check_path(cmd.install_platlib, libdir) check_path(cmd.install_purelib, libdir) -diff -dur Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py ---- Python-3.5.0.orig/Lib/site.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/site.py 2015-12-03 17:31:03.874280444 +0100 -@@ -334,12 +334,14 @@ def getsitepackages(prefixes=None): - seen.add(prefix) - - if os.sep == '/': -- sitepackages.append(os.path.join(prefix, "lib", -+ sitepackages.append(os.path.join(prefix, sys.lib, - "python%d.%d" % sys.version_info[:2], - "site-packages")) -+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) +diff -urNp Python-3.8.7.org/Lib/site.py Python-3.8.7/Lib/site.py +--- Python-3.8.7.org/Lib/site.py 2020-12-21 17:25:24.000000000 +0100 ++++ Python-3.8.7/Lib/site.py 2021-02-06 00:56:02.722230710 +0100 +@@ -344,6 +344,8 @@ def getsitepackages(prefixes=None): + "python%d.%d" % sys.version_info[:2], + "site-packages") + sitepackages.append(path) ++ sitepackages.append(os.path.join(prefix, sys.platlibdir, "site-python")) + sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) else: sitepackages.append(prefix) -- sitepackages.append(os.path.join(prefix, "lib", "site-packages")) -+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) - return sitepackages - - def addsitepackages(known_paths, prefixes=None): -diff -dur Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py ---- Python-3.5.0.orig/Lib/sysconfig.py 2015-09-13 13:41:21.000000000 +0200 -+++ Python-3.5.0/Lib/sysconfig.py 2015-12-03 17:31:51.974741432 +0100 -@@ -20,10 +20,10 @@ - _INSTALL_SCHEMES = { +diff -urNp Python-3.8.7.org/Lib/sysconfig.py Python-3.8.7/Lib/sysconfig.py +--- Python-3.8.7.org/Lib/sysconfig.py 2020-12-21 17:25:24.000000000 +0100 ++++ Python-3.8.7/Lib/sysconfig.py 2021-02-06 00:56:02.722230710 +0100 +@@ -22,7 +22,7 @@ _INSTALL_SCHEMES = { 'posix_prefix': { -- 'stdlib': '{installed_base}/lib/python{py_version_short}', -- 'platstdlib': '{platbase}/lib/python{py_version_short}', + 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', + 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', -+ 'stdlib': '{installed_base}/' + sys.lib + '/python{py_version_short}', -+ 'platstdlib': '{platbase}/' + sys.lib + '/python{py_version_short}', -+ 'purelib': '{base}/' + sys.lib + '/python{py_version_short}/site-packages', -+ 'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages', ++ 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages', + 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', 'include': '{installed_base}/include/python{py_version_short}{abiflags}', - 'platinclude': -@@ -32,10 +32,10 @@ +@@ -32,10 +32,10 @@ _INSTALL_SCHEMES = { 'data': '{base}', }, 'posix_home': { @@ -117,29 +81,23 @@ diff -dur Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py - 'platstdlib': '{base}/lib/python', - 'purelib': '{base}/lib/python', - 'platlib': '{base}/lib/python', -+ 'stdlib': '{installed_base}/' + sys.lib + '/python', -+ 'platstdlib': '{base}/' + sys.lib + '/python', -+ 'purelib': '{base}/' + sys.lib + '/python', -+ 'platlib': '{base}/' + sys.lib + '/python', ++ 'stdlib': '{installed_base}/{platlibdir}/python', ++ 'platstdlib': '{base}/{platlibdir}/python', ++ 'purelib': '{base}/{platlibdir}/python', ++ 'platlib': '{base}/{platlibdir}/python', 'include': '{installed_base}/include/python', 'platinclude': '{installed_base}/include/python', 'scripts': '{base}/bin', -@@ -61,10 +61,10 @@ - 'data': '{userbase}', - }, +@@ -64,7 +64,7 @@ _INSTALL_SCHEMES = { 'posix_user': { -- 'stdlib': '{userbase}/lib/python{py_version_short}', -- 'platstdlib': '{userbase}/lib/python{py_version_short}', + 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', + 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'stdlib': '{userbase}/' + sys.lib + '/python{py_version_short}', -+ 'platstdlib': '{userbase}/' + sys.lib + '/python{py_version_short}', -+ 'purelib': '{userbase}/' + sys.lib + '/python{py_version_short}/site-packages', -+ 'platlib': '{userbase}/' + sys.lib + '/python{py_version_short}/site-packages', ++ 'purelib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', + 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', 'include': '{userbase}/include/python{py_version_short}', 'scripts': '{userbase}/bin', - 'data': '{userbase}', -@@ -459,7 +459,11 @@ +@@ -480,7 +480,11 @@ def get_config_h_filename(): else: inc_dir = _sys_home or _PROJECT_BASE else: @@ -152,37 +110,10 @@ diff -dur Python-3.5.0.orig/Lib/sysconfig.py Python-3.5.0/Lib/sysconfig.py return os.path.join(inc_dir, 'pyconfig.h') -diff -dur Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in ---- Python-3.5.0.orig/Makefile.pre.in 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Makefile.pre.in 2015-12-03 17:31:03.874280444 +0100 -@@ -101,6 +101,8 @@ - - # Machine-dependent subdirectories - MACHDEP= @MACHDEP@ -+LIB= @LIB@ -+ARCH= @ARCH@ - - # Multiarch directory (may be empty) - MULTIARCH= @MULTIARCH@ -@@ -120,7 +122,7 @@ - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/lib -+SCRIPTDIR= $(prefix)/$(LIB) - ABIFLAGS= @ABIFLAGS@ - - # Detailed destination directories -@@ -796,7 +798,7 @@ - Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) - - Python/getplatform.o: $(srcdir)/Python/getplatform.c -- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c -+ $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c - - Python/importdl.o: $(srcdir)/Python/importdl.c - $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c -@@ -1470,9 +1470,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf +diff -urNp Python-3.8.7.org/Makefile.pre.in Python-3.8.7/Makefile.pre.in +--- Python-3.8.7.org/Makefile.pre.in 2020-12-21 17:25:24.000000000 +0100 ++++ Python-3.8.7/Makefile.pre.in 2021-02-06 00:56:02.722230710 +0100 +@@ -1560,9 +1562,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf @if test -d $(LIBRARY); then :; else \ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ if test "$(SHLIB_SUFFIX)" = .dll; then \ @@ -194,156 +125,15 @@ diff -dur Python-3.5.0.orig/Makefile.pre.in Python-3.5.0/Makefile.pre.in fi; \ else \ echo Skip install of $(LIBRARY) - use make frameworkinstall; \ -diff -dur Python-3.5.0.orig/Modules/getpath.c Python-3.5.0/Modules/getpath.c ---- Python-3.5.0.orig/Modules/getpath.c 2015-09-13 13:41:24.000000000 +0200 -+++ Python-3.5.0/Modules/getpath.c 2015-12-03 17:31:03.874280444 +0100 -@@ -100,6 +100,17 @@ - extern "C" { - #endif - -+#ifndef LIB_PYTHON -+#if defined(__x86_64__) || defined(__aarch64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) -+#if defined(__ILP32__) -+#define LIB_PYTHON "libx32/python" -+#else -+#define LIB_PYTHON "lib64/python" -+#endif -+#else -+#define LIB_PYTHON "lib/python" -+#endif -+#endif - - #if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH) - #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" -@@ -1078,7 +1078,7 @@ calculate_zip_path(PyCalculatePath *calc - return PATHLEN_ERR(); - } - } -- status = joinpath(zip_path, L"lib/python00.zip", zip_path_len); -+ status = joinpath(zip_path, L"" LIB_PYTHON "00.zip", zip_path_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -878,7 +878,7 @@ calculate_init(PyCalculatePath *calculat - if (!calculate->prefix) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } -- calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len); -+ calculate->lib_python = Py_DecodeLocale(LIB_PYTHON VERSION, &len); - if (!calculate->lib_python) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } -diff -dur Python-3.5.0.orig/Python/getplatform.c Python-3.5.0/Python/getplatform.c ---- Python-3.5.0.orig/Python/getplatform.c 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/Python/getplatform.c 2015-12-03 17:31:03.874280444 +0100 -@@ -10,3 +10,23 @@ - { - return PLATFORM; - } -+ -+#ifndef ARCH -+#define ARCH "unknown" -+#endif -+ -+const char * -+Py_GetArch(void) -+{ -+ return ARCH; -+} -+ -+#ifndef LIB -+#define LIB "lib" -+#endif -+ -+const char * -+Py_GetLib(void) -+{ -+ return LIB; -+} -diff -dur Python-3.5.0.orig/Python/sysmodule.c Python-3.5.0/Python/sysmodule.c ---- Python-3.5.0.orig/Python/sysmodule.c 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/Python/sysmodule.c 2015-12-03 17:31:03.874280444 +0100 -@@ -2307,6 +2307,10 @@ _PySys_BeginInit(PyObject **sysmod) - PyUnicode_FromString(Py_GetCopyright())); - SET_SYS_FROM_STRING("platform", - PyUnicode_FromString(Py_GetPlatform())); -+ SET_SYS_FROM_STRING("arch", -+ PyUnicode_FromString(Py_GetArch())); -+ SET_SYS_FROM_STRING("lib", -+ PyUnicode_FromString(Py_GetLib())); - SET_SYS_FROM_STRING("maxsize", - PyLong_FromSsize_t(PY_SSIZE_T_MAX)); - SET_SYS_FROM_STRING("float_info", -diff -dur Python-3.5.0.orig/configure.ac Python-3.5.0/configure.ac ---- Python-3.5.0.orig/configure.ac 2015-12-03 17:30:32.777292009 +0100 -+++ Python-3.5.0/configure.ac 2015-12-03 17:31:03.877613811 +0100 -@@ -722,6 +722,45 @@ - ]) - fi - -+AC_SUBST(ARCH) -+AC_MSG_CHECKING(ARCH) -+ARCH=`uname -m` -+case $ARCH in -+i?86) ARCH=i386;; -+esac -+AC_MSG_RESULT($ARCH) -+ -+AC_SUBST(LIB) -+AC_MSG_CHECKING(LIB) -+case $ac_sys_system in -+Linux*) -+ # Test if the compiler is 64bit -+ echo 'int i;' > conftest.$ac_ext -+ python_cv_cc_64bit_output=no -+ if AC_TRY_EVAL(ac_compile); then -+ case `/usr/bin/file conftest.$ac_objext` in -+ *"ELF 64"*) -+ python_cv_cc_64bit_output=yes -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+esac -+ -+case $ARCH:$python_cv_cc_64bit_output in -+powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes | aarch64:yes) -+ LIB="lib64" -+ ;; -+x86_64:no) -+ LIB="libx32" -+ ;; -+*:*) -+ LIB="lib" -+ ;; -+esac -+AC_MSG_RESULT($LIB) -+ - - MULTIARCH=$($CC --print-multiarch 2>/dev/null) - AC_SUBST(MULTIARCH) -@@ -4640,9 +4640,9 @@ AC_MSG_RESULT($LDVERSION) - dnl define LIBPL after ABIFLAGS and LDVERSION is defined. - AC_SUBST(PY_ENABLE_SHARED) - if test x$PLATFORM_TRIPLET = x; then -- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" -+ LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}" - else -- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" -+ LIBPL='$(LIBDIR)/python'"${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" - fi - AC_SUBST(LIBPL) - -diff -dur Python-3.5.0.orig/setup.py Python-3.5.0/setup.py ---- Python-3.5.0.orig/setup.py 2015-09-13 13:41:26.000000000 +0200 -+++ Python-3.5.0/setup.py 2015-12-03 17:31:03.877613811 +0100 -@@ -569,7 +569,7 @@ class PyBuildExt(build_ext): +diff -urNp Python-3.8.7.org/setup.py Python-3.8.7/setup.py +--- Python-3.8.7.org/setup.py 2020-12-21 17:25:24.000000000 +0100 ++++ Python-3.8.7/setup.py 2021-02-06 00:56:02.728897587 +0100 +@@ -670,7 +670,7 @@ class PyBuildExt(build_ext): add_dir_to_list(self.compiler.include_dirs, sysconfig.get_config_var("INCLUDEDIR")) - system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib'] -+ system_lib_dirs = ['/' + sys.lib, '/usr/' + sys.lib] ++ system_lib_dirs = ['/' + sys.platlibdir, '/usr/' + sys.platlibdir] system_include_dirs = ['/usr/include'] # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can @@ -352,30 +142,12 @@ diff -dur Python-3.5.0.orig/setup.py Python-3.5.0/setup.py readline_libs.append(curses_library) elif self.compiler.find_library_file(self.lib_dirs + - ['/usr/lib/termcap'], -+ ['/usr/' + sys.lib + '/termcap'], ++ ['/usr/' + sys.platlibdir + '/termcap'], 'termcap'): readline_libs.append('termcap') self.add(Extension('readline', ['readline.c'], - library_dirs=['/usr/lib/termcap'], -+ library_dirs=['/usr/' + sys.lib + '/termcap'], ++ library_dirs=['/usr/' + sys.platlibdir + '/termcap'], extra_link_args=readline_extra_link_args, libraries=readline_libs)) else: - ---- Python-3.8.0/Lib/test/test_embed.py~ 2019-10-14 15:34:47.000000000 +0200 -+++ Python-3.8.0/Lib/test/test_embed.py 2019-10-15 11:53:55.299065729 +0200 -@@ -1071,11 +1071,11 @@ class InitConfigTests(EmbeddingTestsMixi - else: - ver = sys.version_info - return [ -- os.path.join(prefix, 'lib', -+ os.path.join(prefix, sys.lib, - f'python{ver.major}{ver.minor}.zip'), -- os.path.join(prefix, 'lib', -+ os.path.join(prefix, sys.lib, - f'python{ver.major}.{ver.minor}'), -- os.path.join(exec_prefix, 'lib', -+ os.path.join(exec_prefix, sys.lib, - f'python{ver.major}.{ver.minor}', 'lib-dynload'), - ] - diff --git a/python3.spec b/python3.spec index 28b9464..864a084 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.0 +Version: %{py_ver}.1 Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 6ebfe157f6e88d9eabfbaf3fa92129f6 +# Source0-md5: 61981498e75ac8f00adcb908281fadb6 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -546,7 +546,7 @@ fi %{__autoconf} %configure \ CC="%{__cc}" \ - OPT="%{rpmcflags} -fno-caller-saves" \ + OPT="%{rpmcflags}" \ CPPFLAGS="%{rpmcppflags}" \ LDFLAGS="%{rpmldflags}" \ ac_cv_posix_semaphores_enabled=yes \ @@ -559,6 +559,7 @@ fi --without-ensurepip \ --with-platlibdir="%{_lib}" \ %{?with_debug:--with-pydebug} \ + --with-ssl-default-suites=openssl \ --with-system-expat \ --with-system-ffi \ %{?with_system_mpdecimal:--with-system-libmpdec} \ @@ -568,7 +569,7 @@ fi %endif %{__make} \ - TESTOPTS="%{test_list}" \ + TESTOPTS="%{_smp_mflags} %{test_list}" \ 2>&1 | awk ' BEGIN { fail = 0; logmsg = ""; } { @@ -583,7 +584,7 @@ END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }' LC_ALL=C.UTF-8 export LC_ALL %if %{with tests} -WITHIN_PYTHON_RPM_BUILD=1 %{__make} -j1 test \ +WITHIN_PYTHON_RPM_BUILD=1 %{__make} test \ TESTOPTS="%{test_flags} %{test_list}" %endif @@ -1359,7 +1360,7 @@ rm -rf $RPM_BUILD_ROOT %files static %defattr(644,root,root,755) -%{py_libdir}/config-*/libpython%{py_abi}.a +%{_libdir}/libpython%{py_abi}.a %files examples %defattr(644,root,root,755) From 81d56a2b5c9e051ebf1eaa10bd4905726906678c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 6 Feb 2021 11:51:51 +0100 Subject: [PATCH 115/180] - disable network in tests; check for semaphore (we force it with ac_cv_posix_semaphores_enabled=yes but that should go away eventually) --- python3-tests.patch | 20 ++++++++++++++++++++ python3.spec | 7 ++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/python3-tests.patch b/python3-tests.patch index 1272d4d..8baa77a 100644 --- a/python3-tests.patch +++ b/python3-tests.patch @@ -18,3 +18,23 @@ self.assertIn(cm.exception.errno, expected_errnos) +--- Python-3.9.1/Lib/test/test_unicodedata.py~ 2020-12-07 15:02:38.000000000 +0100 ++++ Python-3.9.1/Lib/test/test_unicodedata.py 2021-02-06 11:25:21.864427644 +0100 +@@ -11,7 +11,7 @@ from http.client import HTTPException + import sys + import unicodedata + import unittest +-from test.support import open_urlresource, requires_resource, script_helper ++from test.support import open_urlresource, requires_resource, script_helper, is_resource_enabled + + + class UnicodeMethodsTest(unittest.TestCase): +@@ -320,6 +320,8 @@ class NormalizationTest(unittest.TestCas + data = [int(x, 16) for x in data.split(" ")] + return "".join([chr(x) for x in data]) + ++ @unittest.skipUnless(is_resource_enabled('network'), ++ 'network is not enabled') + def test_normalization(self): + TESTDATAFILE = "NormalizationTest.txt" + TESTDATAURL = f"http://www.pythontest.net/unicode/{unicodedata.unidata_version}/{TESTDATAFILE}" diff --git a/python3.spec b/python3.spec index 864a084..4014bca 100644 --- a/python3.spec +++ b/python3.spec @@ -11,7 +11,7 @@ # tests which will not work on 64-bit platforms %define no64bit_tests -x test_audioop -x test_rgbimg -x test_imageop # tests which may fail because of builder environment limitations (no /proc or /dev/pts) -%define nobuilder_tests -x test_resource -x test_openpty -x test_socket -x test_nis -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization +%define nobuilder_tests -u-network -x test_resource -x test_openpty -x test_socket -x test_nis -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization # tests which fail because of some unknown/unresolved reason (this list should be %{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... @@ -568,6 +568,11 @@ fi --with-lto %endif +if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then + echo "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." >&2 + exit 1 +fi + %{__make} \ TESTOPTS="%{_smp_mflags} %{test_list}" \ 2>&1 | awk ' From 572776b35e7d6163d0ba0a6e02f6b97d46984e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 6 Feb 2021 12:59:51 +0100 Subject: [PATCH 116/180] - this is fixed in other ways: https://bugs.python.org/issue10496 --- nonexistent_user.patch | 44 ------------------------------------------ 1 file changed, 44 deletions(-) delete mode 100644 nonexistent_user.patch diff --git a/nonexistent_user.patch b/nonexistent_user.patch deleted file mode 100644 index 7a811e7..0000000 --- a/nonexistent_user.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/Lib/site.py b/Lib/site.py ---- a/Lib/site.py -+++ b/Lib/site.py -@@ -262,7 +266,7 @@ def addusersitepackages(known_paths): - # this call will also make sure USER_BASE and USER_SITE are set - user_site = getusersitepackages() - -- if ENABLE_USER_SITE and os.path.isdir(user_site): -+ if ENABLE_USER_SITE and user_site and os.path.isdir(user_site): - addsitedir(user_site, known_paths) - return known_paths - -diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py ---- a/Lib/sysconfig.py -+++ b/Lib/sysconfig.py -@@ -170,7 +170,13 @@ def _expand_vars(scheme, vars): - for key, value in _INSTALL_SCHEMES[scheme].items(): - if os.name in ('posix', 'nt'): - value = os.path.expanduser(value) -- res[key] = os.path.normpath(_subst_vars(value, vars)) -+ try: -+ path = _subst_vars(value, vars) -+ except AttributeError: -+ # a substitution variable doesn't exist (eg. '{userbase}'), -+ # don't create the variable -+ continue -+ res[key] = os.path.normpath(path) - return res - - def _get_default_scheme(): -@@ -488,7 +494,12 @@ def get_config_vars(*args): - # Setting 'userbase' is done below the call to the - # init function to enable using 'get_config_var' in - # the init-function. -- _CONFIG_VARS['userbase'] = _getuserbase() -+ try: -+ _CONFIG_VARS['userbase'] = _getuserbase() -+ except KeyError: -+ # catch getpwuid() error: don't create the variable if the user -+ # doesn't exist -+ pass - - if 'srcdir' not in _CONFIG_VARS: - _CONFIG_VARS['srcdir'] = _PROJECT_BASE From 689d42a22946f8263622c0afe2f87ec08b6ba23c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 19 Feb 2021 22:56:52 +0100 Subject: [PATCH 117/180] - up to 3.9.2; fixes CVE-2021-3177, CVE-2021-23336 --- python3.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/python3.spec b/python3.spec index 4014bca..bd4842d 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.1 -Release: 0.1 +Version: %{py_ver}.2 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 61981498e75ac8f00adcb908281fadb6 +# Source0-md5: f0dc9000312abeb16de4eccce9a870ab Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -67,8 +67,7 @@ Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch Patch10: %{name}-bdist_rpm.patch Patch11: %{name}-installcompile.patch -# https://bugs.python.org/file21896/nonexistent_user.patch -Patch12: nonexistent_user.patch + Patch13: %{name}-no-randomize-tests.patch Patch14: python3-profile-tests.patch Patch15: python3-tests.patch @@ -504,7 +503,7 @@ Moduły testowe dla Pythona. %patch9 -p1 %patch10 -p1 %patch11 -p1 -%patch12 -p1 + %patch13 -p1 %patch14 -p1 %patch15 -p1 From b10abc3a3255bfc7bc1044fcf4383c3397f800eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 25 Feb 2021 18:42:54 +0100 Subject: [PATCH 118/180] - rel 2; rediff patches --- python3-install_prefix.patch | 30 +++++------ python3-installcompile.patch | 16 +++--- python3-makefile-location.patch | 12 ++--- python3-multilib.patch | 62 ++++++++++----------- python3-no_cmdline_tests.patch | 22 ++++---- python3-tests.patch | 16 +++--- python3-tests_with_pythonpath.patch | 83 ++++++++++++++--------------- python3.spec | 2 +- 8 files changed, 121 insertions(+), 122 deletions(-) diff --git a/python3-install_prefix.patch b/python3-install_prefix.patch index a643c08..54cafea 100644 --- a/python3-install_prefix.patch +++ b/python3-install_prefix.patch @@ -1,7 +1,7 @@ -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py Python-3.5.0/Lib/distutils/command/install.py ---- Python-3.5.0.orig/Lib/distutils/command/install.py 2015-11-25 17:54:32.000000000 +0100 -+++ Python-3.5.0/Lib/distutils/command/install.py 2015-11-25 18:06:33.876268151 +0100 -@@ -9,6 +9,7 @@ +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/command/install.py Python-3.9.2/Lib/distutils/command/install.py +--- Python-3.9.2.org/Lib/distutils/command/install.py 2021-02-25 18:41:13.921266287 +0100 ++++ Python-3.9.2/Lib/distutils/command/install.py 2021-02-25 18:41:15.634652993 +0100 +@@ -9,6 +9,7 @@ from distutils import log from distutils.core import Command from distutils.debug import DEBUG from distutils.sysconfig import get_config_vars @@ -9,7 +9,7 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py from distutils.errors import DistutilsPlatformError from distutils.file_util import write_file from distutils.util import convert_path, subst_vars, change_root -@@ -418,8 +419,8 @@ +@@ -419,8 +420,8 @@ class install(Command): raise DistutilsOptionError( "must not supply exec-prefix without prefix") @@ -20,12 +20,10 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/install.py else: if self.exec_prefix is None: -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Python-3.5.0/Lib/distutils/sysconfig.py ---- Python-3.5.0.orig/Lib/distutils/sysconfig.py 2015-11-25 17:54:32.000000000 +0100 -+++ Python-3.5.0/Lib/distutils/sysconfig.py 2015-11-25 18:03:39.338573134 +0100 -@@ -17,8 +17,12 @@ - from .errors import DistutilsPlatformError - +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py +--- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-25 18:41:13.927933162 +0100 ++++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:41:15.634652993 +0100 +@@ -19,6 +19,10 @@ from .errors import DistutilsPlatformErr # These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) @@ -36,11 +34,11 @@ diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/sysconfig.py Pytho BASE_PREFIX = os.path.normpath(sys.base_prefix) BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/site.py Python-3.5.0/Lib/site.py ---- Python-3.5.0.orig/Lib/site.py 2015-11-25 17:54:32.000000000 +0100 -+++ Python-3.5.0/Lib/site.py 2015-11-25 17:56:39.979513073 +0100 -@@ -74,7 +74,7 @@ - import _sitebuiltins +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py +--- Python-3.9.2.org/Lib/site.py 2021-02-25 18:41:13.924599724 +0100 ++++ Python-3.9.2/Lib/site.py 2021-02-25 18:41:15.634652993 +0100 +@@ -76,7 +76,7 @@ import _sitebuiltins + import io # Prefixes for site-packages; add additional prefixes like /usr/local here -PREFIXES = [sys.prefix, sys.exec_prefix] diff --git a/python3-installcompile.patch b/python3-installcompile.patch index dd9268e..82c914e 100644 --- a/python3-installcompile.patch +++ b/python3-installcompile.patch @@ -1,15 +1,16 @@ ---- Python-3.5.0/Makefile.pre.in.orig 2016-02-28 20:07:09.864711963 +0100 -+++ Python-3.5.0/Makefile.pre.in 2016-02-28 20:10:18.334704006 +0100 -@@ -1029,7 +1029,7 @@ +diff -urNp -x '*.orig' Python-3.9.2.org/Makefile.pre.in Python-3.9.2/Makefile.pre.in +--- Python-3.9.2.org/Makefile.pre.in 2021-02-25 18:42:02.242771533 +0100 ++++ Python-3.9.2/Makefile.pre.in 2021-02-25 18:42:03.919490432 +0100 +@@ -1262,7 +1262,7 @@ altinstall: commoninstall - commoninstall: @FRAMEWORKALTINSTALLFIRST@ \ + commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \ altbininstall libinstall inclinstall libainstall \ - sharedinstall oldsharedinstall altmaninstall \ + sharedinstall oldsharedinstall altmaninstall installcompile \ @FRAMEWORKALTINSTALLLAST@ # Install shared libraries enabled by Setup -@@ -1262,6 +1262,8 @@ +@@ -1530,6 +1530,8 @@ libinstall: build_all $(srcdir)/Modules/ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ fi @@ -17,8 +18,8 @@ +installcompile: libainstall libinstall -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ -@@ -1939,7 +1939,7 @@ Python/thread.o: @THREADHEADERS@ $(srcdi + -j0 -d $(LIBDEST) -f \ +@@ -1938,7 +1940,7 @@ Python/thread.o: @THREADHEADERS@ $(srcdi .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools .PHONY: frameworkaltinstallunixtools recheck clean clobber distclean @@ -27,4 +28,3 @@ .PHONY: clean-retain-profile profile-removal run_profile_task .PHONY: build_all_generate_profile build_all_merge_profile .PHONY: gdbhooks - diff --git a/python3-makefile-location.patch b/python3-makefile-location.patch index 912e4cd..2dbb571 100644 --- a/python3-makefile-location.patch +++ b/python3-makefile-location.patch @@ -1,12 +1,12 @@ -diff -Nur Python-3.3.1.orig/Lib/distutils/sysconfig.py Python-3.3.1/Lib/distutils/sysconfig.py ---- Python-3.3.1.orig/Lib/distutils/sysconfig.py 2013-04-06 08:41:35.000000000 +0100 -+++ Python-3.3.1/Lib/distutils/sysconfig.py 2013-04-07 19:45:29.409178359 +0100 -@@ -256,7 +256,7 @@ +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py +--- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-25 18:40:49.900518043 +0100 ++++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:40:51.570570064 +0100 +@@ -260,7 +260,7 @@ def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: return os.path.join(_sys_home or project_base, "Makefile") - lib_dir = get_python_lib(plat_specific=0, standard_lib=1) + lib_dir = get_python_lib(plat_specific=1, standard_lib=1) config_file = 'config-{}{}'.format(get_python_version(), build_flags) - return os.path.join(lib_dir, config_file, 'Makefile') - + if hasattr(sys.implementation, '_multiarch'): + config_file += '-%s' % sys.implementation._multiarch diff --git a/python3-multilib.patch b/python3-multilib.patch index 9863ccb..f27da6f 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -1,7 +1,7 @@ -diff -urNp Python-3.8.7.org/Lib/distutils/command/install.py Python-3.8.7/Lib/distutils/command/install.py ---- Python-3.8.7.org/Lib/distutils/command/install.py 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/Lib/distutils/command/install.py 2021-02-06 00:56:02.718897271 +0100 -@@ -31,14 +31,14 @@ WINDOWS_SCHEME = { +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/command/install.py Python-3.9.2/Lib/distutils/command/install.py +--- Python-3.9.2.org/Lib/distutils/command/install.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/distutils/command/install.py 2021-02-25 18:40:00.705652346 +0100 +@@ -29,14 +29,14 @@ WINDOWS_SCHEME = { INSTALL_SCHEMES = { 'unix_prefix': { @@ -18,9 +18,9 @@ diff -urNp Python-3.8.7.org/Lib/distutils/command/install.py Python-3.8.7/Lib/di 'platlib': '$base/$platlibdir/python', 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', -diff -urNp Python-3.8.7.org/Lib/distutils/sysconfig.py Python-3.8.7/Lib/distutils/sysconfig.py ---- Python-3.8.7.org/Lib/distutils/sysconfig.py 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/Lib/distutils/sysconfig.py 2021-02-06 00:56:02.718897271 +0100 +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py +--- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 @@ -145,13 +145,13 @@ def get_python_lib(plat_specific=0, stan prefix = plat_specific and EXEC_PREFIX or PREFIX @@ -37,9 +37,9 @@ diff -urNp Python-3.8.7.org/Lib/distutils/sysconfig.py Python-3.8.7/Lib/distutil libpython = os.path.join(prefix, libdir, "python" + get_python_version()) if standard_lib: -diff -urNp Python-3.8.7.org/Lib/distutils/tests/test_install.py Python-3.8.7/Lib/distutils/tests/test_install.py ---- Python-3.8.7.org/Lib/distutils/tests/test_install.py 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/Lib/distutils/tests/test_install.py 2021-02-06 00:56:02.722230710 +0100 +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/tests/test_install.py Python-3.9.2/Lib/distutils/tests/test_install.py +--- Python-3.9.2.org/Lib/distutils/tests/test_install.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/distutils/tests/test_install.py 2021-02-25 18:40:00.705652346 +0100 @@ -56,7 +56,7 @@ class InstallTestCase(support.TempdirMan expected = os.path.normpath(expected) self.assertEqual(got, expected) @@ -47,11 +47,11 @@ diff -urNp Python-3.8.7.org/Lib/distutils/tests/test_install.py Python-3.8.7/Lib - libdir = os.path.join(destination, "lib", "python") + libdir = os.path.join(destination, sys.platlibdir, "python") check_path(cmd.install_lib, libdir) - check_path(cmd.install_platlib, libdir) - check_path(cmd.install_purelib, libdir) -diff -urNp Python-3.8.7.org/Lib/site.py Python-3.8.7/Lib/site.py ---- Python-3.8.7.org/Lib/site.py 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/Lib/site.py 2021-02-06 00:56:02.722230710 +0100 + platlibdir = os.path.join(destination, sys.platlibdir, "python") + check_path(cmd.install_platlib, platlibdir) +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py +--- Python-3.9.2.org/Lib/site.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/site.py 2021-02-25 18:40:00.705652346 +0100 @@ -344,6 +344,8 @@ def getsitepackages(prefixes=None): "python%d.%d" % sys.version_info[:2], "site-packages") @@ -61,10 +61,10 @@ diff -urNp Python-3.8.7.org/Lib/site.py Python-3.8.7/Lib/site.py else: sitepackages.append(prefix) -diff -urNp Python-3.8.7.org/Lib/sysconfig.py Python-3.8.7/Lib/sysconfig.py ---- Python-3.8.7.org/Lib/sysconfig.py 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/Lib/sysconfig.py 2021-02-06 00:56:02.722230710 +0100 -@@ -22,7 +22,7 @@ _INSTALL_SCHEMES = { +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py +--- Python-3.9.2.org/Lib/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 +@@ -27,7 +27,7 @@ _INSTALL_SCHEMES = { 'posix_prefix': { 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', @@ -73,7 +73,7 @@ diff -urNp Python-3.8.7.org/Lib/sysconfig.py Python-3.8.7/Lib/sysconfig.py 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', 'include': '{installed_base}/include/python{py_version_short}{abiflags}', -@@ -32,10 +32,10 @@ _INSTALL_SCHEMES = { +@@ -37,10 +37,10 @@ _INSTALL_SCHEMES = { 'data': '{base}', }, 'posix_home': { @@ -88,7 +88,7 @@ diff -urNp Python-3.8.7.org/Lib/sysconfig.py Python-3.8.7/Lib/sysconfig.py 'include': '{installed_base}/include/python', 'platinclude': '{installed_base}/include/python', 'scripts': '{base}/bin', -@@ -64,7 +64,7 @@ _INSTALL_SCHEMES = { +@@ -69,7 +69,7 @@ _INSTALL_SCHEMES = { 'posix_user': { 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', @@ -97,7 +97,7 @@ diff -urNp Python-3.8.7.org/Lib/sysconfig.py Python-3.8.7/Lib/sysconfig.py 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', 'include': '{userbase}/include/python{py_version_short}', 'scripts': '{userbase}/bin', -@@ -480,7 +480,11 @@ def get_config_h_filename(): +@@ -490,7 +490,11 @@ def get_config_h_filename(): else: inc_dir = _sys_home or _PROJECT_BASE else: @@ -110,10 +110,10 @@ diff -urNp Python-3.8.7.org/Lib/sysconfig.py Python-3.8.7/Lib/sysconfig.py return os.path.join(inc_dir, 'pyconfig.h') -diff -urNp Python-3.8.7.org/Makefile.pre.in Python-3.8.7/Makefile.pre.in ---- Python-3.8.7.org/Makefile.pre.in 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/Makefile.pre.in 2021-02-06 00:56:02.722230710 +0100 -@@ -1560,9 +1562,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf +diff -urNp -x '*.orig' Python-3.9.2.org/Makefile.pre.in Python-3.9.2/Makefile.pre.in +--- Python-3.9.2.org/Makefile.pre.in 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Makefile.pre.in 2021-02-25 18:40:00.705652346 +0100 +@@ -1634,9 +1634,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf @if test -d $(LIBRARY); then :; else \ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ if test "$(SHLIB_SUFFIX)" = .dll; then \ @@ -125,10 +125,10 @@ diff -urNp Python-3.8.7.org/Makefile.pre.in Python-3.8.7/Makefile.pre.in fi; \ else \ echo Skip install of $(LIBRARY) - use make frameworkinstall; \ -diff -urNp Python-3.8.7.org/setup.py Python-3.8.7/setup.py ---- Python-3.8.7.org/setup.py 2020-12-21 17:25:24.000000000 +0100 -+++ Python-3.8.7/setup.py 2021-02-06 00:56:02.728897587 +0100 -@@ -670,7 +670,7 @@ class PyBuildExt(build_ext): +diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py +--- Python-3.9.2.org/setup.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/setup.py 2021-02-25 18:40:00.708985783 +0100 +@@ -750,7 +750,7 @@ class PyBuildExt(build_ext): add_dir_to_list(self.compiler.include_dirs, sysconfig.get_config_var("INCLUDEDIR")) @@ -137,7 +137,7 @@ diff -urNp Python-3.8.7.org/setup.py Python-3.8.7/setup.py system_include_dirs = ['/usr/include'] # lib_dirs and inc_dirs are used to search for files; # if a file is found in one of those directories, it can -@@ -953,11 +953,11 @@ class PyBuildExt(build_ext): +@@ -1039,11 +1039,11 @@ class PyBuildExt(build_ext): elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(self.lib_dirs + diff --git a/python3-no_cmdline_tests.patch b/python3-no_cmdline_tests.patch index 392c63a..e786687 100644 --- a/python3-no_cmdline_tests.patch +++ b/python3-no_cmdline_tests.patch @@ -1,7 +1,7 @@ -diff -Nur Python-3.3.1.orig/Lib/test/test_compileall.py Python-3.3.1/Lib/test/test_compileall.py ---- Python-3.3.1.orig/Lib/test/test_compileall.py 2013-04-06 08:41:41.000000000 +0100 -+++ Python-3.3.1/Lib/test/test_compileall.py 2013-04-07 19:39:23.449157629 +0100 -@@ -233,6 +233,7 @@ class EncodingTest(unittest.TestCase): +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_compileall.py Python-3.9.2/Lib/test/test_compileall.py +--- Python-3.9.2.org/Lib/test/test_compileall.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_compileall.py 2021-02-25 18:40:29.876560976 +0100 +@@ -419,6 +419,7 @@ class EncodingTest(unittest.TestCase): sys.stdout = orig_stdout @@ -9,10 +9,10 @@ diff -Nur Python-3.3.1.orig/Lib/test/test_compileall.py Python-3.3.1/Lib/test/te class CommandLineTestsBase: """Test compileall's CLI.""" -diff -Nur Python-3.3.1.orig/Lib/test/test_warnings/__init__.py Python-3.3.1/Lib/test/test_warnings/__init__.py ---- Python-3.3.1.orig/Lib/test/test_warnings/__init__.py 2013-04-06 08:41:46.000000000 +0100 -+++ Python-3.3.1/Lib/test/test_warnings/__init__.py 2013-04-07 19:41:25.529164545 +0100 -@@ -717,6 +717,7 @@ +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Python-3.9.2/Lib/test/test_warnings/__init__.py +--- Python-3.9.2.org/Lib/test/test_warnings/__init__.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_warnings/__init__.py 2021-02-25 18:40:29.876560976 +0100 +@@ -1126,6 +1126,7 @@ class PyCatchWarningTests(CatchWarningTe module = py_warnings @@ -20,9 +20,9 @@ diff -Nur Python-3.3.1.orig/Lib/test/test_warnings/__init__.py Python-3.3.1/Lib/ class EnvironmentVariableTests(BaseTest): def test_single_warning(self): -@@ -762,14 +763,17 @@ - "['ignore:DeprecaciónWarning']".encode('utf-8')) - self.assertEqual(p.wait(), 0) +@@ -1206,14 +1207,17 @@ class EnvironmentVariableTests(BaseTest) + PYTHONDEVMODE="") + self.assertEqual(stdout, str([PYTHONWARNINGS]).encode()) +@unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled") class CEnvironmentVariableTests(EnvironmentVariableTests, unittest.TestCase): diff --git a/python3-tests.patch b/python3-tests.patch index 8baa77a..2ceb7f8 100644 --- a/python3-tests.patch +++ b/python3-tests.patch @@ -1,6 +1,7 @@ ---- Python-3.7.4/Lib/test/test_imaplib.py~ 2019-07-08 20:03:50.000000000 +0200 -+++ Python-3.7.4/Lib/test/test_imaplib.py 2019-08-05 19:25:53.119629647 +0200 -@@ -73,7 +73,7 @@ class TestImaplib(unittest.TestCase): +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_imaplib.py Python-3.9.2/Lib/test/test_imaplib.py +--- Python-3.9.2.org/Lib/test/test_imaplib.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_imaplib.py 2021-02-25 18:42:23.540101637 +0100 +@@ -74,7 +74,7 @@ class TestImaplib(unittest.TestCase): def test_imap4_host_default_value(self): # Check whether the IMAP4_PORT is truly unavailable. @@ -9,17 +10,18 @@ try: s.connect(('', imaplib.IMAP4_PORT)) self.skipTest( -@@ -84,7 +84,7 @@ class TestImaplib(unittest.TestCase): +@@ -85,7 +85,7 @@ class TestImaplib(unittest.TestCase): # This is the exception that should be raised. - expected_errnos = support.get_socket_conn_refused_errs() + expected_errnos = socket_helper.get_socket_conn_refused_errs() with self.assertRaises(OSError) as cm: - imaplib.IMAP4() + imaplib.IMAP4('0.0.0.0') self.assertIn(cm.exception.errno, expected_errnos) ---- Python-3.9.1/Lib/test/test_unicodedata.py~ 2020-12-07 15:02:38.000000000 +0100 -+++ Python-3.9.1/Lib/test/test_unicodedata.py 2021-02-06 11:25:21.864427644 +0100 +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_unicodedata.py Python-3.9.2/Lib/test/test_unicodedata.py +--- Python-3.9.2.org/Lib/test/test_unicodedata.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_unicodedata.py 2021-02-25 18:42:23.540101637 +0100 @@ -11,7 +11,7 @@ from http.client import HTTPException import sys import unicodedata diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index 579ef1e..e26fb51 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -1,5 +1,6 @@ ---- Python-3.7.0/Lib/test/test_asyncio/test_tasks.py~ 2018-06-28 20:51:03.000000000 +0200 -+++ Python-3.7.0/Lib/test/test_asyncio/test_tasks.py 2018-06-28 21:01:38.756365097 +0200 +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_asyncio/test_tasks.py Python-3.9.2/Lib/test/test_asyncio/test_tasks.py +--- Python-3.9.2.org/Lib/test/test_asyncio/test_tasks.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_asyncio/test_tasks.py 2021-02-25 18:41:41.098779547 +0100 @@ -6,6 +6,7 @@ import contextvars import functools import gc @@ -8,21 +9,18 @@ import random import re import sys -diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_asyncio/test_tasks.py Python-3.5.0/Lib/test/test_asyncio/test_tasks.py ---- Python-3.5.0.orig/Lib/test/test_asyncio/test_tasks.py 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Lib/test/test_asyncio/test_tasks.py 2015-12-03 18:35:52.223668265 +0100 -@@ -1870,6 +1870,7 @@ +@@ -3283,6 +3284,7 @@ class GatherTestsBase: cb.assert_called_once_with(fut) self.assertEqual(fut.result(), [3, 1, exc, exc2]) + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_env_var_debug(self): - aio_path = os.path.dirname(os.path.dirname(asyncio.__file__)) - -diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_cmd_line.py Python-3.5.0/Lib/test/test_cmd_line.py ---- Python-3.5.0.orig/Lib/test/test_cmd_line.py 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Lib/test/test_cmd_line.py 2015-12-03 18:35:52.227001621 +0100 -@@ -237,6 +237,7 @@ + code = '\n'.join(( + 'import asyncio.coroutines', +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_cmd_line.py Python-3.9.2/Lib/test/test_cmd_line.py +--- Python-3.9.2.org/Lib/test/test_cmd_line.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_cmd_line.py 2021-02-25 18:41:41.098779547 +0100 +@@ -265,6 +265,7 @@ class CmdLineTest(unittest.TestCase): self.assertEqual(rc, 0) self.assertTrue(data.startswith(b'x'), data) @@ -30,7 +28,7 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_cmd_line.py Python-3.5.0/Lib/t def test_large_PYTHONPATH(self): path1 = "ABCDE" * 100 path2 = "FGHIJ" * 100 -@@ -252,6 +253,7 @@ +@@ -280,6 +281,7 @@ class CmdLineTest(unittest.TestCase): self.assertIn(path1.encode('ascii'), out) self.assertIn(path2.encode('ascii'), out) @@ -38,18 +36,18 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_cmd_line.py Python-3.5.0/Lib/t def test_empty_PYTHONPATH_issue16309(self): # On Posix, it is documented that setting PATH to the # empty string is equivalent to not setting PATH at all, -diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_compileall.py Python-3.5.0/Lib/test/test_compileall.py ---- Python-3.5.0.orig/Lib/test/test_compileall.py 2015-12-03 18:35:31.483520885 +0100 -+++ Python-3.5.0/Lib/test/test_compileall.py 2015-12-03 18:35:52.227001621 +0100 -@@ -206,6 +206,7 @@ - def _cleanup(self): - support.rmtree(self.directory) +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_compileall.py Python-3.9.2/Lib/test/test_compileall.py +--- Python-3.9.2.org/Lib/test/test_compileall.py 2021-02-25 18:41:39.412060338 +0100 ++++ Python-3.9.2/Lib/test/test_compileall.py 2021-02-25 18:41:41.098779547 +0100 +@@ -486,6 +486,7 @@ class CommandLineTestsBase: + self.initfn = script_helper.make_script(self.pkgdir, '__init__', '') + self.barfn = script_helper.make_script(self.pkgdir, 'bar', '') + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_no_args_compiles_path(self): # Note that -l is implied for the no args case. - bazfn = script_helper.make_script(self.directory, 'baz', '') -@@ -220,6 +220,7 @@ class CommandLineTestsBase: + self._skip_if_sys_path_not_writable() +@@ -495,6 +496,7 @@ class CommandLineTestsBase: self.assertNotCompiled(self.initfn) self.assertNotCompiled(self.barfn) @@ -57,18 +55,18 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_compileall.py Python-3.5.0/Lib @without_source_date_epoch # timestamp invalidation test def test_no_args_respects_force_flag(self): self._skip_if_sys_path_not_writable() -@@ -230,6 +232,7 @@ +@@ -513,6 +515,7 @@ class CommandLineTestsBase: mtime2 = os.stat(pycpath).st_mtime self.assertNotEqual(mtime, mtime2) + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_no_args_respects_quiet_flag(self): + self._skip_if_sys_path_not_writable() script_helper.make_script(self.directory, 'baz', '') - noisy = self.assertRunOK(PYTHONPATH=self.directory) -diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_pydoc.py Python-3.5.0/Lib/test/test_pydoc.py ---- Python-3.5.0.orig/Lib/test/test_pydoc.py 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Lib/test/test_pydoc.py 2015-12-03 18:35:52.227001621 +0100 -@@ -631,6 +631,7 @@ +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_pydoc.py Python-3.9.2/Lib/test/test_pydoc.py +--- Python-3.9.2.org/Lib/test/test_pydoc.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_pydoc.py 2021-02-25 18:41:41.098779547 +0100 +@@ -885,6 +885,7 @@ class PydocImportTest(PydocBaseTest): self.addCleanup(rmtree, TESTFN) importlib.invalidate_caches() @@ -76,10 +74,10 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_pydoc.py Python-3.5.0/Lib/test def test_badimport(self): # This tests the fix for issue 5230, where if pydoc found the module # but the module had an internal import error pydoc would report no doc -diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_site.py Python-3.5.0/Lib/test/test_site.py ---- Python-3.5.0.orig/Lib/test/test_site.py 2015-09-13 13:41:23.000000000 +0200 -+++ Python-3.5.0/Lib/test/test_site.py 2015-12-03 18:37:57.484550877 +0100 -@@ -320,6 +320,7 @@ +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_site.py Python-3.9.2/Lib/test/test_site.py +--- Python-3.9.2.org/Lib/test/test_site.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_site.py 2021-02-25 18:41:41.098779547 +0100 +@@ -387,6 +387,7 @@ class ImportSideEffectTests(unittest.Tes """Restore sys.path""" sys.path[:] = self.sys_path @@ -87,17 +85,18 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_site.py Python-3.5.0/Lib/test/ def test_abs_paths(self): # Make sure all imported modules have their __file__ and __cached__ # attributes as absolute paths. Arranging to put the Lib directory on ---- Python-3.7.4/Lib/test/test_venv.py~ 2019-07-08 20:03:50.000000000 +0200 -+++ Python-3.7.4/Lib/test/test_venv.py 2019-07-09 08:37:18.251706609 +0200 -@@ -129,6 +129,7 @@ class BasicTest(BaseTest): - self.assertEqual(context.prompt, '(My prompt) ') +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/test/test_venv.py +--- Python-3.9.2.org/Lib/test/test_venv.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_venv.py 2021-02-25 18:41:41.098779547 +0100 +@@ -173,6 +173,7 @@ class BasicTest(BaseTest): + builder.upgrade_dependencies(fake_context) @requireVenvCreate + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_prefixes(self): """ Test that the prefix values are as expected. -@@ -266,6 +267,7 @@ class BasicTest(BaseTest): +@@ -310,6 +311,7 @@ class BasicTest(BaseTest): # point to the venv being used to run the test, and we lose the link # to the source build - so Python can't initialise properly. @requireVenvCreate @@ -105,18 +104,18 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_site.py Python-3.5.0/Lib/test/ def test_executable(self): """ Test that the sys.executable value is as expected. -@@ -326,6 +328,7 @@ class BasicTest(BaseTest): - self.assertEqual(out.strip(), "python".encode()) +@@ -406,6 +408,7 @@ class BasicTest(BaseTest): + self.assertEqual(out.strip(), 'False'.encode()) @requireVenvCreate +@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") class EnsurePipTest(BaseTest): """Test venv module installation of pip.""" def assert_pip_not_installed(self): -diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_warnings/__init__.py Python-3.5.0/Lib/test/test_warnings/__init__.py ---- Python-3.5.0.orig/Lib/test/test_warnings/__init__.py 2015-12-03 18:35:31.483520885 +0100 -+++ Python-3.5.0/Lib/test/test_warnings/__init__.py 2015-12-03 18:35:52.227001621 +0100 -@@ -918,6 +918,7 @@ +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Python-3.9.2/Lib/test/test_warnings/__init__.py +--- Python-3.9.2.org/Lib/test/test_warnings/__init__.py 2021-02-25 18:41:39.412060338 +0100 ++++ Python-3.9.2/Lib/test/test_warnings/__init__.py 2021-02-25 18:41:41.098779547 +0100 +@@ -1218,6 +1218,7 @@ class PyEnvironmentVariableTests(Environ class BootstrapTest(unittest.TestCase): @unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled") diff --git a/python3.spec b/python3.spec index bd4842d..2ab914f 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python From 385ad89c1b8e83250835b96e95d0ea7fe0736891 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sat, 27 Feb 2021 14:20:16 +0100 Subject: [PATCH 119/180] noarch examples --- python3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python3.spec b/python3.spec index 2ab914f..13cb437 100644 --- a/python3.spec +++ b/python3.spec @@ -467,6 +467,7 @@ kullanılan grafik bir arayüzdür. Summary: Example programs in Python Summary(pl.UTF-8): Przykładowe programy w Pythonie Group: Development/Languages/Python +BuildArch: noarch %description examples Example programs in Python. From 4c871dee7762ac78a9f7f544fd57e75dece96342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 5 Apr 2021 01:31:16 +0200 Subject: [PATCH 120/180] - up to 3.9.4 --- python3-tests.patch | 22 +--------------------- python3.spec | 6 +++--- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/python3-tests.patch b/python3-tests.patch index 2ceb7f8..83f26ea 100644 --- a/python3-tests.patch +++ b/python3-tests.patch @@ -19,24 +19,4 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_imaplib.py Python-3.9.2/Li self.assertIn(cm.exception.errno, expected_errnos) -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_unicodedata.py Python-3.9.2/Lib/test/test_unicodedata.py ---- Python-3.9.2.org/Lib/test/test_unicodedata.py 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/Lib/test/test_unicodedata.py 2021-02-25 18:42:23.540101637 +0100 -@@ -11,7 +11,7 @@ from http.client import HTTPException - import sys - import unicodedata - import unittest --from test.support import open_urlresource, requires_resource, script_helper -+from test.support import open_urlresource, requires_resource, script_helper, is_resource_enabled - - - class UnicodeMethodsTest(unittest.TestCase): -@@ -320,6 +320,8 @@ class NormalizationTest(unittest.TestCas - data = [int(x, 16) for x in data.split(" ")] - return "".join([chr(x) for x in data]) - -+ @unittest.skipUnless(is_resource_enabled('network'), -+ 'network is not enabled') - def test_normalization(self): - TESTDATAFILE = "NormalizationTest.txt" - TESTDATAURL = f"http://www.pythontest.net/unicode/{unicodedata.unidata_version}/{TESTDATAFILE}" + diff --git a/python3.spec b/python3.spec index 13cb437..32ae98c 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.2 -Release: 2 +Version: %{py_ver}.4 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: f0dc9000312abeb16de4eccce9a870ab +# Source0-md5: 2a3dba5fc75b695c45cf1806156e1a97 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 305b51c81b246770d25ca45d4cdfee573c0c94f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 10 May 2021 08:35:58 +0200 Subject: [PATCH 121/180] - up to 3.9.5 --- python3-tests_with_pythonpath.patch | 11 ----------- python3.spec | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index e26fb51..c24df66 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -74,17 +74,6 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_pydoc.py Python-3.9.2/Lib/ def test_badimport(self): # This tests the fix for issue 5230, where if pydoc found the module # but the module had an internal import error pydoc would report no doc -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_site.py Python-3.9.2/Lib/test/test_site.py ---- Python-3.9.2.org/Lib/test/test_site.py 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/Lib/test/test_site.py 2021-02-25 18:41:41.098779547 +0100 -@@ -387,6 +387,7 @@ class ImportSideEffectTests(unittest.Tes - """Restore sys.path""" - sys.path[:] = self.sys_path - -+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") - def test_abs_paths(self): - # Make sure all imported modules have their __file__ and __cached__ - # attributes as absolute paths. Arranging to put the Lib directory on diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/test/test_venv.py --- Python-3.9.2.org/Lib/test/test_venv.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/test/test_venv.py 2021-02-25 18:41:41.098779547 +0100 diff --git a/python3.spec b/python3.spec index 32ae98c..ab806cf 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.4 +Version: %{py_ver}.5 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 2a3dba5fc75b695c45cf1806156e1a97 +# Source0-md5: 71f7ada6bec9cdbf4538adc326120cfd Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 51826d16747a6f6fc7df7470204ecec8dc406888 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 15 Jun 2021 12:07:18 +0200 Subject: [PATCH 122/180] BR: autoconf-archive --- python3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python3.spec b/python3.spec index ab806cf..cdbd759 100644 --- a/python3.spec +++ b/python3.spec @@ -73,6 +73,7 @@ Patch14: python3-profile-tests.patch Patch15: python3-tests.patch URL: https://www.python.org/ BuildRequires: autoconf >= 2.65 +BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: bluez-libs-devel BuildRequires: bzip2-devel From a8c4c0ee16ed1789a24e55a26014f8ccf776c6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 29 Jun 2021 08:45:35 +0200 Subject: [PATCH 123/180] - up to 3.9.6 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index cdbd759..6bc2716 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.5 +Version: %{py_ver}.6 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 71f7ada6bec9cdbf4538adc326120cfd +# Source0-md5: ecc29a7688f86e550d29dba2ee66cf80 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 3696f31bc6104c7706a41ee975d81795863f108a Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 29 Jun 2021 15:42:04 +0000 Subject: [PATCH 124/180] build with -fno-semantic-interposition proposed by fedora where it's used by default and brings significant performance boost for dynamically linked python. to become upstream default in python 3.10. see https://bugs.python.org/issue38980 --- python3.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python3.spec b/python3.spec index 6bc2716..54f2012 100644 --- a/python3.spec +++ b/python3.spec @@ -7,6 +7,7 @@ %bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode %bcond_without optimizations # expensive, stable optimizations (PGO etc.) + LTO +%bcond_with semantic_interposition # build without \-fno-semantic-interposition # # tests which will not work on 64-bit platforms %define no64bit_tests -x test_audioop -x test_rgbimg -x test_imageop @@ -548,8 +549,10 @@ fi %configure \ CC="%{__cc}" \ OPT="%{rpmcflags}" \ + CFLAGS_NODIST="%{!?with_semantic_interposition: -fno-semantic-interposition}" \ CPPFLAGS="%{rpmcppflags}" \ LDFLAGS="%{rpmldflags}" \ + LDFLAGS_NODIST="%{!?with_semantic_interposition: -fno-semantic-interposition}" \ ac_cv_posix_semaphores_enabled=yes \ ac_cv_broken_sem_getvalue=no \ --enable-ipv6 \ From 7ed9eac5915b6ff5847a876027338c44c6739f9f Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Mon, 5 Jul 2021 10:08:10 +0200 Subject: [PATCH 125/180] include debug flags during linking python built with optimizations uses LTO and in order to have debug info all debug flags need to be repeated for linker --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 54f2012..c1530ae 100644 --- a/python3.spec +++ b/python3.spec @@ -552,7 +552,7 @@ fi CFLAGS_NODIST="%{!?with_semantic_interposition: -fno-semantic-interposition}" \ CPPFLAGS="%{rpmcppflags}" \ LDFLAGS="%{rpmldflags}" \ - LDFLAGS_NODIST="%{!?with_semantic_interposition: -fno-semantic-interposition}" \ + LDFLAGS_NODIST="%{debuginfocflags}%{!?with_semantic_interposition: -fno-semantic-interposition}" \ ac_cv_posix_semaphores_enabled=yes \ ac_cv_broken_sem_getvalue=no \ --enable-ipv6 \ From f769e4abdc045e837134c818f56dc64758a682bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 6 Sep 2021 17:11:50 +0200 Subject: [PATCH 126/180] Up to 3.9.7 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index c1530ae..4cbee6f 100644 --- a/python3.spec +++ b/python3.spec @@ -48,13 +48,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.6 +Version: %{py_ver}.7 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: ecc29a7688f86e550d29dba2ee66cf80 +# Source0-md5: fddb060b483bc01850a3f412eea1d954 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 41d971e797b4450d6d9edab1545c5eeab90d2948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Fri, 24 Sep 2021 23:40:32 +0200 Subject: [PATCH 127/180] rebuild with openssl 3.0.0 Release 2 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 4cbee6f..26e47a8 100644 --- a/python3.spec +++ b/python3.spec @@ -49,7 +49,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.7 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python From 8d01f99262f6604836c3f50bd0720d402a45d9bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 7 Nov 2021 19:46:26 +0100 Subject: [PATCH 128/180] Partial update to 3.10.0. --- python3-BLDLIBRARY.patch | 14 +++--- python3-install_prefix.patch | 26 +++++------ python3-makefile-location.patch | 12 ----- python3-multilib.patch | 78 +++++++++++---------------------- python3.spec | 12 ++--- 5 files changed, 51 insertions(+), 91 deletions(-) delete mode 100644 python3-makefile-location.patch diff --git a/python3-BLDLIBRARY.patch b/python3-BLDLIBRARY.patch index 10000ab..865b51b 100644 --- a/python3-BLDLIBRARY.patch +++ b/python3-BLDLIBRARY.patch @@ -11,18 +11,18 @@ @@ -588,7 +588,7 @@ clinic: check-clean-src $(srcdir)/Module # Build the interpreter - $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) + $(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS) - $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) ++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(LIBS) $(MODLIBS) $(SYSLIBS) platform: $(BUILDPYTHON) pybuilddir.txt $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform @@ -723,7 +723,7 @@ Makefile Modules/config.c: Makefile.pre - Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS) + Programs/_testembed: Programs/_testembed.o $(LIBRARY_DEPS) - $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) ++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(LIBS) $(MODLIBS) $(SYSLIBS) ############################################################################ # Importlib @@ -54,12 +54,12 @@ RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} INSTSONAME="$LDLIBRARY".$SOVERSION if test "$with_pydebug" != yes -@@ -1166,7 +1169,8 @@ +@@ -1147,7 +1147,8 @@ if test $enable_shared = "yes"; then ;; - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*) LDLIBRARY='libpython$(LDVERSION).so' - BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-L.' ++ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.' + BLDLIBRARY='-lpython$(VERSION)' RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} INSTSONAME="$LDLIBRARY".$SOVERSION diff --git a/python3-install_prefix.patch b/python3-install_prefix.patch index 54cafea..b342314 100644 --- a/python3-install_prefix.patch +++ b/python3-install_prefix.patch @@ -21,19 +21,19 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/command/install.py Python- else: if self.exec_prefix is None: diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py ---- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-25 18:41:13.927933162 +0100 -+++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:41:15.634652993 +0100 -@@ -19,6 +19,10 @@ from .errors import DistutilsPlatformErr - # These are needed in a couple of spots, so just compute them once. - PREFIX = os.path.normpath(sys.prefix) - EXEC_PREFIX = os.path.normpath(sys.exec_prefix) -+if PREFIX == "/usr": -+ PREFIX = "/usr/local" -+if EXEC_PREFIX == "/usr": -+ EXEC_PREFIX = "/usr/local" - BASE_PREFIX = os.path.normpath(sys.base_prefix) - BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) - +--- Python-3.10.0/Lib/distutils/sysconfig.py~ 2021-10-20 22:42:16.000000000 +0200 ++++ Python-3.10.0/Lib/distutils/sysconfig.py 2021-10-20 22:53:54.943156539 +0200 +@@ -320,6 +320,10 @@ def get_python_lib(plat_specific=0, stan + If 'prefix' is supplied, use it instead of sys.base_prefix or + sys.base_exec_prefix -- i.e., ignore 'plat_specific'. + """ ++ if PREFIX == "/usr": ++ PREFIX = "/usr/local" ++ if EXEC_PREFIX == "/usr": ++ EXEC_PREFIX = "/usr/local" + if prefix is None: + if standard_lib: + prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py --- Python-3.9.2.org/Lib/site.py 2021-02-25 18:41:13.924599724 +0100 +++ Python-3.9.2/Lib/site.py 2021-02-25 18:41:15.634652993 +0100 diff --git a/python3-makefile-location.patch b/python3-makefile-location.patch deleted file mode 100644 index 2dbb571..0000000 --- a/python3-makefile-location.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py ---- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-25 18:40:49.900518043 +0100 -+++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:40:51.570570064 +0100 -@@ -260,7 +260,7 @@ def get_makefile_filename(): - """Return full pathname of installed Makefile from the Python build.""" - if python_build: - return os.path.join(_sys_home or project_base, "Makefile") -- lib_dir = get_python_lib(plat_specific=0, standard_lib=1) -+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1) - config_file = 'config-{}{}'.format(get_python_version(), build_flags) - if hasattr(sys.implementation, '_multiarch'): - config_file += '-%s' % sys.implementation._multiarch diff --git a/python3-multilib.patch b/python3-multilib.patch index f27da6f..49417ce 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -1,23 +1,3 @@ -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/command/install.py Python-3.9.2/Lib/distutils/command/install.py ---- Python-3.9.2.org/Lib/distutils/command/install.py 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/Lib/distutils/command/install.py 2021-02-25 18:40:00.705652346 +0100 -@@ -29,14 +29,14 @@ WINDOWS_SCHEME = { - - INSTALL_SCHEMES = { - 'unix_prefix': { -- 'purelib': '$base/lib/python$py_version_short/site-packages', -+ 'purelib': '$base/$platlibdir/python$py_version_short/site-packages', - 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'unix_home': { -- 'purelib': '$base/lib/python', -+ 'purelib': '$base/$platlibdir/python', - 'platlib': '$base/$platlibdir/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py --- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 @@ -64,15 +44,6 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py --- Python-3.9.2.org/Lib/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 -@@ -27,7 +27,7 @@ _INSTALL_SCHEMES = { - 'posix_prefix': { - 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', - 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', -- 'purelib': '{base}/lib/python{py_version_short}/site-packages', -+ 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages', - 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', - 'include': - '{installed_base}/include/python{py_version_short}{abiflags}', @@ -37,10 +37,10 @@ _INSTALL_SCHEMES = { 'data': '{base}', }, @@ -88,15 +59,17 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon 'include': '{installed_base}/include/python', 'platinclude': '{installed_base}/include/python', 'scripts': '{base}/bin', -@@ -69,7 +69,7 @@ _INSTALL_SCHEMES = { - 'posix_user': { - 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', - 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', -- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'purelib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', - 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', - 'include': '{userbase}/include/python{py_version_short}', - 'scripts': '{userbase}/bin', +@@ -100,8 +100,8 @@ if _HAS_USER_BASE: + 'posix_user': { + 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', + 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', +- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', +- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', ++ 'purelib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', ++ 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', + 'include': '{userbase}/include/python{py_version_short}', + 'scripts': '{userbase}/bin', + 'data': '{userbase}', @@ -490,7 +490,11 @@ def get_config_h_filename(): else: inc_dir = _sys_home or _PROJECT_BASE @@ -109,22 +82,21 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon + inc_dir = os.path.join(get_path('stdlib'), config_dir_name) return os.path.join(inc_dir, 'pyconfig.h') - -diff -urNp -x '*.orig' Python-3.9.2.org/Makefile.pre.in Python-3.9.2/Makefile.pre.in ---- Python-3.9.2.org/Makefile.pre.in 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/Makefile.pre.in 2021-02-25 18:40:00.705652346 +0100 -@@ -1634,9 +1634,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf - @if test -d $(LIBRARY); then :; else \ - if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ - if test "$(SHLIB_SUFFIX)" = .dll; then \ -- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ -+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \ + +--- Python-3.10.0/Makefile.pre.in~ 2021-10-04 19:40:46.000000000 +0200 ++++ Python-3.10.0/Makefile.pre.in 2021-10-20 22:21:30.573156183 +0200 +@@ -1707,9 +1707,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf + if test -d $(LIBRARY); then :; else \ + if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ + if test "$(SHLIB_SUFFIX)" = .dll; then \ +- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ ++ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \ + else \ +- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ ++ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ + fi; \ else \ -- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ -+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ - fi; \ - else \ - echo Skip install of $(LIBRARY) - use make frameworkinstall; \ + echo Skip install of $(LIBRARY) - use make frameworkinstall; \ diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py --- Python-3.9.2.org/setup.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/setup.py 2021-02-25 18:40:00.708985783 +0100 diff --git a/python3.spec b/python3.spec index 26e47a8..6d7283a 100644 --- a/python3.spec +++ b/python3.spec @@ -30,7 +30,7 @@ %define _python_target_abi %{?_gnu} %endif -%define py_ver 3.9 +%define py_ver 3.10 %define py_abi %{py_ver} %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_python_target_abi} %define py_prefix %{_prefix} @@ -48,19 +48,19 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.7 -Release: 2 +Version: %{py_ver}.0 +Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: fddb060b483bc01850a3f412eea1d954 +# Source0-md5: 3e7035d272680f80e3ce4e8eb492d580 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch -Patch4: %{name}-makefile-location.patch + Patch5: %{name}-config.patch Patch6: %{name}-BLDLIBRARY.patch Patch7: %{name}-db.patch @@ -498,7 +498,7 @@ Moduły testowe dla Pythona. %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 + %patch5 -p1 %patch6 -p1 %patch7 -p1 From 6e46332d19b7bfd115dbccf2cb205b38d39ddd33 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sun, 7 Nov 2021 20:09:44 +0100 Subject: [PATCH 129/180] -fno-semantic-interposition is upstream now --- python3.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index 6d7283a..7b3165b 100644 --- a/python3.spec +++ b/python3.spec @@ -7,7 +7,6 @@ %bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode %bcond_without optimizations # expensive, stable optimizations (PGO etc.) + LTO -%bcond_with semantic_interposition # build without \-fno-semantic-interposition # # tests which will not work on 64-bit platforms %define no64bit_tests -x test_audioop -x test_rgbimg -x test_imageop @@ -549,10 +548,9 @@ fi %configure \ CC="%{__cc}" \ OPT="%{rpmcflags}" \ - CFLAGS_NODIST="%{!?with_semantic_interposition: -fno-semantic-interposition}" \ CPPFLAGS="%{rpmcppflags}" \ LDFLAGS="%{rpmldflags}" \ - LDFLAGS_NODIST="%{debuginfocflags}%{!?with_semantic_interposition: -fno-semantic-interposition}" \ + LDFLAGS_NODIST="%{debuginfocflags}" \ ac_cv_posix_semaphores_enabled=yes \ ac_cv_broken_sem_getvalue=no \ --enable-ipv6 \ From 703efa4d548587a5ce9b7e09ddd773e27bab02cc Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 1 Mar 2022 21:57:01 +0100 Subject: [PATCH 130/180] - versioned Obsoletes - clean after -devel-src removed in 3.2 - updated info bcond --- python3.spec | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/python3.spec b/python3.spec index 7b3165b..d168a00 100644 --- a/python3.spec +++ b/python3.spec @@ -233,8 +233,8 @@ Provides: python(abi) = %{py_ver} # for compatibility with existing Ac packages Provides: python(bytecode) = %{py_ver} Provides: python3-enum -Obsoletes: python3-enum -%{!?with_info:Obsoletes: python3-doc-info} +Obsoletes: python3-enum < 0.5 +%{!?with_info:Obsoletes: python3-doc-info < %{epoch}:%{version}-%{release}} %description libs Python shared library and very essental modules for Python binary. @@ -249,7 +249,7 @@ Summary(pl.UTF-8): Moduły języka Python Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} %{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.2-2} -Obsoletes: python3-modules-sqlite +Obsoletes: python3-modules-sqlite < 1:3.1-2 %requires_ge_to openssl openssl-devel %description modules @@ -294,6 +294,7 @@ Summary(tr.UTF-8): Python ile geliştirme yapmak için gerekli dosyalar Summary(uk.UTF-8): Бібліотеки та хедери для програмування на мові Python Group: Development/Languages/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} +Obsoletes: python3-devel-src < 1:3.2-1 %description devel The Python interpreter is relatively easy to extend with dynamically @@ -346,18 +347,6 @@ dosyalarını ve kitaplıkları içerir. розширень з динамічною загрузкою та вбудовується в інші програми. Цей пакет містить хедери та бібліотеки, необхідні для обох цих задач. -%package devel-src -Summary: Python module sources -Summary(pl.UTF-8): Pliki źródłowe modułów Pythona -Group: Development/Languages/Python -Requires: %{name}-modules = %{epoch}:%{version}-%{release} - -%description devel-src -Python module sources. - -%description devel-src -l pl.UTF-8 -Pliki źródłowe modułów Pythona. - %package devel-tools Summary: Python development tools Summary(pl.UTF-8): Narzędzia programistyczne języka Python @@ -595,6 +584,11 @@ WITHIN_PYTHON_RPM_BUILD=1 %{__make} test \ TESTOPTS="%{test_flags} %{test_list}" %endif +%if %{with info} +%{__make} -C Doc texinfo +%{__make} -C Doc/build/texinfo info +%endif + %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pkgconfigdir}} \ @@ -608,8 +602,7 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pkgconfigdir}} \ DESTDIR=$RPM_BUILD_ROOT %if %{with info} -%{__make} -C Doc/info -cp -p Doc/info/python*info* $RPM_BUILD_ROOT%{_infodir} +cp -p Doc/build/texinfo/python*info* $RPM_BUILD_ROOT%{_infodir} %endif install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} @@ -1387,7 +1380,7 @@ rm -rf $RPM_BUILD_ROOT %if %{with info} %files doc-info %defattr(644,root,root,755) -%{_infodir}/*.info* +%{_infodir}/python.info* %endif %if %{with tkinter} From 91530447b7fec1998c74eae52331d5762509b2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Wed, 23 Mar 2022 08:39:21 +0100 Subject: [PATCH 131/180] - up to 3.10.3, drop BLDLIBRARY and install_prefix patches BLDLIBRARY patch breaks build install_prefix is broken, breaks tests and why did we even had that hack? --- python3-BLDLIBRARY.patch | 83 ------------------------------------ python3-install_prefix.patch | 48 --------------------- python3-multilib.patch | 28 ++++++++++++ python3.spec | 26 +++++------ 4 files changed, 38 insertions(+), 147 deletions(-) delete mode 100644 python3-BLDLIBRARY.patch delete mode 100644 python3-install_prefix.patch diff --git a/python3-BLDLIBRARY.patch b/python3-BLDLIBRARY.patch deleted file mode 100644 index 865b51b..0000000 --- a/python3-BLDLIBRARY.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- Python-3.8.5/Makefile.pre.in.orig 2020-09-17 07:55:13.731893519 +0200 -+++ Python-3.8.5/Makefile.pre.in 2020-09-17 10:33:36.683744945 +0200 -@@ -224,6 +224,7 @@ - LIBRARY= @LIBRARY@ - LDLIBRARY= @LDLIBRARY@ - BLDLIBRARY= @BLDLIBRARY@ -+BLDLIBDIR= @BLDLIBDIR@ - PY3LIBRARY= @PY3LIBRARY@ - DLLLIBRARY= @DLLLIBRARY@ - LDLIBRARYDIR= @LDLIBRARYDIR@ -@@ -588,7 +588,7 @@ clinic: check-clean-src $(srcdir)/Module - - # Build the interpreter - $(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS) -- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(LIBS) $(MODLIBS) $(SYSLIBS) - - platform: $(BUILDPYTHON) pybuilddir.txt - $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform -@@ -723,7 +723,7 @@ Makefile Modules/config.c: Makefile.pre - - - Programs/_testembed: Programs/_testembed.o $(LIBRARY_DEPS) -- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(LIBS) $(MODLIBS) $(SYSLIBS) - - ############################################################################ - # Importlib ---- Python-3.8.5/configure.ac.orig 2020-09-17 07:55:13.735226834 +0200 -+++ Python-3.8.5/configure.ac 2020-09-17 10:46:44.172812084 +0200 -@@ -1033,6 +1033,7 @@ - # with the ABI build flags appended. - AC_SUBST(LDLIBRARY) - AC_SUBST(DLLLIBRARY) -+AC_SUBST(BLDLIBDIR) - AC_SUBST(BLDLIBRARY) - AC_SUBST(PY3LIBRARY) - AC_SUBST(LDLIBRARYDIR) -@@ -1040,6 +1041,7 @@ - AC_SUBST(RUNSHARED) - AC_SUBST(LDVERSION) - LDLIBRARY="$LIBRARY" -+BLDLIBDIR='' - BLDLIBRARY='$(LDLIBRARY)' - INSTSONAME='$(LDLIBRARY)' - DLLLIBRARY='' -@@ -1156,7 +1158,8 @@ - ;; - SunOS*) - LDLIBRARY='libpython$(LDVERSION).so' -- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.' -+ BLDLIBRARY='-lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - INSTSONAME="$LDLIBRARY".$SOVERSION - if test "$with_pydebug" != yes -@@ -1147,7 +1147,8 @@ if test $enable_shared = "yes"; then - ;; - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*) - LDLIBRARY='libpython$(LDVERSION).so' -- BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.' -+ BLDLIBRARY='-lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - INSTSONAME="$LDLIBRARY".$SOVERSION - if test "$with_pydebug" != yes -@@ -1183,12 +1187,14 @@ - LDLIBRARY='libpython$(LDVERSION).sl' - ;; - esac -- BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-Wl,+b,$(LIBDIR) -L.' -+ BLDLIBRARY='-lpython$(VERSION)' - RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} - ;; - Darwin*) - LDLIBRARY='libpython$(LDVERSION).dylib' -- BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-L.' -+ BLDLIBRARY='-lpython$(LDVERSION)' - RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} - ;; - AIX*) diff --git a/python3-install_prefix.patch b/python3-install_prefix.patch deleted file mode 100644 index b342314..0000000 --- a/python3-install_prefix.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/command/install.py Python-3.9.2/Lib/distutils/command/install.py ---- Python-3.9.2.org/Lib/distutils/command/install.py 2021-02-25 18:41:13.921266287 +0100 -+++ Python-3.9.2/Lib/distutils/command/install.py 2021-02-25 18:41:15.634652993 +0100 -@@ -9,6 +9,7 @@ from distutils import log - from distutils.core import Command - from distutils.debug import DEBUG - from distutils.sysconfig import get_config_vars -+from distutils.sysconfig import PREFIX, EXEC_PREFIX - from distutils.errors import DistutilsPlatformError - from distutils.file_util import write_file - from distutils.util import convert_path, subst_vars, change_root -@@ -419,8 +420,8 @@ class install(Command): - raise DistutilsOptionError( - "must not supply exec-prefix without prefix") - -- self.prefix = os.path.normpath(sys.prefix) -- self.exec_prefix = os.path.normpath(sys.exec_prefix) -+ self.prefix = PREFIX -+ self.exec_prefix = EXEC_PREFIX - - else: - if self.exec_prefix is None: -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py ---- Python-3.10.0/Lib/distutils/sysconfig.py~ 2021-10-20 22:42:16.000000000 +0200 -+++ Python-3.10.0/Lib/distutils/sysconfig.py 2021-10-20 22:53:54.943156539 +0200 -@@ -320,6 +320,10 @@ def get_python_lib(plat_specific=0, stan - If 'prefix' is supplied, use it instead of sys.base_prefix or - sys.base_exec_prefix -- i.e., ignore 'plat_specific'. - """ -+ if PREFIX == "/usr": -+ PREFIX = "/usr/local" -+ if EXEC_PREFIX == "/usr": -+ EXEC_PREFIX = "/usr/local" - if prefix is None: - if standard_lib: - prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py ---- Python-3.9.2.org/Lib/site.py 2021-02-25 18:41:13.924599724 +0100 -+++ Python-3.9.2/Lib/site.py 2021-02-25 18:41:15.634652993 +0100 -@@ -76,7 +76,7 @@ import _sitebuiltins - import io - - # Prefixes for site-packages; add additional prefixes like /usr/local here --PREFIXES = [sys.prefix, sys.exec_prefix] -+PREFIXES = ["/usr/local", sys.prefix, sys.exec_prefix] - # Enable per user site-packages directory - # set it to False to disable the feature or True to force the feature - ENABLE_USER_SITE = None diff --git a/python3-multilib.patch b/python3-multilib.patch index 49417ce..4e83d8c 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -32,6 +32,15 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/tests/test_install.py Pyth diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py --- Python-3.9.2.org/Lib/site.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/site.py 2021-02-25 18:40:00.705652346 +0100 +@@ -295,7 +295,7 @@ + if sys.platform == 'darwin' and sys._framework: + return f'{userbase}/lib/python/site-packages' + +- return f'{userbase}/lib/python{version[0]}.{version[1]}/site-packages' ++ return f'{userbase}/{sys.platlibdir}/python{version[0]}.{version[1]}/site-packages' + + + def getuserbase(): @@ -344,6 +344,8 @@ def getsitepackages(prefixes=None): "python%d.%d" % sys.version_info[:2], "site-packages") @@ -123,3 +132,22 @@ diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py extra_link_args=readline_extra_link_args, libraries=readline_libs)) else: +--- Python-3.10.3/Lib/test/test_sysconfig.py~ 2022-03-16 12:27:11.000000000 +0100 ++++ Python-3.10.3/Lib/test/test_sysconfig.py 2022-03-22 23:11:16.335919644 +0100 +@@ -299,13 +299,13 @@ + expected = global_path.replace(base, user, 1) + # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, + # whereas posix_prefix does. +- if name == 'platlib': ++ if name != 'platlib': + # Replace "/lib64/python3.11/site-packages" suffix + # with "/lib/python3.11/site-packages". + py_version_short = sysconfig.get_python_version() + suffix = f'python{py_version_short}/site-packages' +- expected = expected.replace(f'/{sys.platlibdir}/{suffix}', +- f'/lib/{suffix}') ++ expected = expected.replace(f'/lib/{suffix}', ++ f'/{sys.platlibdir}/{suffix}') + self.assertEqual(user_path, expected) + + def test_main(self): diff --git a/python3.spec b/python3.spec index d168a00..c4420e2 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.0 +Version: %{py_ver}.3 Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 3e7035d272680f80e3ce4e8eb492d580 +# Source0-md5: 21e0b70d70fdd4756aafc4caa55cc17e Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -61,9 +61,7 @@ Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch5: %{name}-config.patch -Patch6: %{name}-BLDLIBRARY.patch Patch7: %{name}-db.patch -Patch8: %{name}-install_prefix.patch Patch9: %{name}-tests_with_pythonpath.patch Patch10: %{name}-bdist_rpm.patch Patch11: %{name}-installcompile.patch @@ -488,9 +486,7 @@ Moduły testowe dla Pythona. %patch3 -p1 %patch5 -p1 -%patch6 -p1 %patch7 -p1 -%patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 @@ -525,6 +521,9 @@ sed -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \ find . -name '*.py' | xargs -r grep -El '^#! */usr/bin/env python3?' | xargs %{__sed} -i -e '1s,^#! */usr/bin/env python3\?,#!/usr/bin/python3,' +sed -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\1,' \ + Tools/c-analyzer/must-resolve.sh + %build if ! grep -q "tmpfs" /proc/self/mounts; then echo "You need to have /dev/shm mounted in order to build this package!" >&2 @@ -663,7 +662,7 @@ install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ve # that seems to be only an empty extension template, # which seems to be built only {with tests} -%{__rm} -f $RPM_BUILD_ROOT%{py_dyndir}/xxlimited.*.so +%{__rm} $RPM_BUILD_ROOT%{py_dyndir}/xxlimited*.*.so # already in %%doc %{__rm} $RPM_BUILD_ROOT%{py_libdir}/LICENSE.txt @@ -690,8 +689,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/python%{py_abi} %endif %attr(755,root,root) %{_bindir}/python3 -%{_mandir}/man1/python%{py_ver}.1* -%{_mandir}/man1/python3.1* +%{_mandir}/man1/python3*.1* %files libs %defattr(644,root,root,755) @@ -795,7 +793,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__future__.py %{py_libdir}/__phello__.foo.py %{py_libdir}/_aix_support.py -%{py_libdir}/_bootlocale.py %{py_libdir}/_bootsubprocess.py %{py_libdir}/_compat_pickle.py %{py_libdir}/_compression.py @@ -841,7 +838,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/filecmp.py %{py_libdir}/fileinput.py %{py_libdir}/fnmatch.py -%{py_libdir}/formatter.py %{py_libdir}/fractions.py %{py_libdir}/ftplib.py %{py_libdir}/getopt.py @@ -905,7 +901,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/struct.py %{py_libdir}/subprocess.py %{py_libdir}/sunau.py -%{py_libdir}/symbol.py %{py_libdir}/symtable.py %{py_libdir}/tabnanny.py %{py_libdir}/tarfile.py @@ -931,7 +926,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/__future__.cpython-*.py[co] %{py_libdir}/__pycache__/__phello__.foo.cpython-*.py[co] %{py_libdir}/__pycache__/_aix_support.cpython-*.py[co] -%{py_libdir}/__pycache__/_bootlocale.cpython-*.py[co] %{py_libdir}/__pycache__/_bootsubprocess.cpython-*.py[co] %{py_libdir}/__pycache__/_compat_pickle.cpython-*.py[co] %{py_libdir}/__pycache__/_compression.cpython-*.py[co] @@ -977,7 +971,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/filecmp.cpython-*.py[co] %{py_libdir}/__pycache__/fileinput.cpython-*.py[co] %{py_libdir}/__pycache__/fnmatch.cpython-*.py[co] -%{py_libdir}/__pycache__/formatter.cpython-*.py[co] %{py_libdir}/__pycache__/fractions.cpython-*.py[co] %{py_libdir}/__pycache__/ftplib.cpython-*.py[co] %{py_libdir}/__pycache__/getopt.cpython-*.py[co] @@ -1041,7 +1034,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/struct.cpython-*.py[co] %{py_libdir}/__pycache__/subprocess.cpython-*.py[co] %{py_libdir}/__pycache__/sunau.cpython-*.py[co] -%{py_libdir}/__pycache__/symbol.cpython-*.py[co] %{py_libdir}/__pycache__/symtable.cpython-*.py[co] %{py_libdir}/__pycache__/tabnanny.cpython-*.py[co] %{py_libdir}/__pycache__/tarfile.cpython-*.py[co] @@ -1136,7 +1128,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/mmap.cpython-*.so %attr(755,root,root) %{py_dyndir}/nis.cpython-*.so %attr(755,root,root) %{py_dyndir}/ossaudiodev.cpython-*.so -%attr(755,root,root) %{py_dyndir}/parser.cpython-*.so %attr(755,root,root) %{py_dyndir}/pyexpat.cpython-*.so %attr(755,root,root) %{py_dyndir}/readline.cpython-*.so %attr(755,root,root) %{py_dyndir}/resource.cpython-*.so @@ -1205,6 +1196,9 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/importlib %{py_libdir}/importlib/__pycache__ %{py_libdir}/importlib/*.py +%dir %{py_libdir}/importlib/metadata +%{py_libdir}/importlib/metadata/__pycache__ +%{py_libdir}/importlib/metadata/*.py %dir %{py_libdir}/json %{py_libdir}/json/__pycache__ From ec9eafa459a77b2a18227ccdac30e8d706d59a2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Fri, 25 Mar 2022 00:56:54 +0100 Subject: [PATCH 132/180] - rel 1 --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index c4420e2..bd93f4b 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.3 -Release: 0.1 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python From 7ff5f06e66943f70e9a59032b88df11bb40d6e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 25 Mar 2022 08:28:48 +0100 Subject: [PATCH 133/180] Up to 3.10.4. --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index bd93f4b..d58c718 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.3 +Version: %{py_ver}.4 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 21e0b70d70fdd4756aafc4caa55cc17e +# Source0-md5: 21f2e113e087083a1e8cf10553d93599 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 2608feab44b88c92c5e0032c7c586e3247322133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Sun, 27 Mar 2022 10:57:47 +0200 Subject: [PATCH 134/180] - rel 2, broken version leaked somewhere 1261426 openat(AT_FDCWD, "/usr/lib64/python3.10/site-packages/", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 1261426 openat(AT_FDCWD, "/usr/share/python3.1/site-packages/", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index d58c718..b98b107 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.4 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python From 96303402601c56655d7ecba7d0c5ad4de817dbf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Sun, 27 Mar 2022 12:50:07 +0200 Subject: [PATCH 135/180] - fixed another case of bad version assumption and parsing, rel 3 --- python3-multilib.patch | 2 +- python3.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python3-multilib.patch b/python3-multilib.patch index 4e83d8c..b5637ba 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -46,7 +46,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py "site-packages") sitepackages.append(path) + sitepackages.append(os.path.join(prefix, sys.platlibdir, "site-python")) -+ sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) ++ sitepackages.append(os.path.join(prefix, "share", "python%d.%d" % sys.version_info[:2], "site-packages")) else: sitepackages.append(prefix) diff --git a/python3.spec b/python3.spec index b98b107..e9aee71 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.4 -Release: 2 +Release: 3 Epoch: 1 License: PSF Group: Development/Languages/Python From 4b802a492846b0fbf101f55c9e8d72971d2d7a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Fri, 1 Apr 2022 00:09:09 +0200 Subject: [PATCH 136/180] - more multilib fixes, rel 4 --- python3-multilib.patch | 9 +++++++++ python3.spec | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/python3-multilib.patch b/python3-multilib.patch index b5637ba..ec90575 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -53,6 +53,15 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py --- Python-3.9.2.org/Lib/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 +@@ -27,7 +27,7 @@ + 'posix_prefix': { + 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', + 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', +- 'purelib': '{base}/lib/python{py_version_short}/site-packages', ++ 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages', + 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', + 'include': + '{installed_base}/include/python{py_version_short}{abiflags}', @@ -37,10 +37,10 @@ _INSTALL_SCHEMES = { 'data': '{base}', }, diff --git a/python3.spec b/python3.spec index e9aee71..cefbbe4 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.4 -Release: 3 +Release: 4 Epoch: 1 License: PSF Group: Development/Languages/Python From b852622fccb775108ed9d1a2197fed8f2d5a08fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Fri, 1 Apr 2022 08:48:00 +0200 Subject: [PATCH 137/180] - purelib: directory for non-platform-specific files, rel 5 --- python3-multilib.patch | 6 +++--- python3.spec | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python3-multilib.patch b/python3-multilib.patch index ec90575..cab410e 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -58,7 +58,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', - 'purelib': '{base}/lib/python{py_version_short}/site-packages', -+ 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages', ++ 'purelib': '{base}/share/python{py_version_short}/site-packages', 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', 'include': '{installed_base}/include/python{py_version_short}{abiflags}', @@ -72,7 +72,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon - 'platlib': '{base}/lib/python', + 'stdlib': '{installed_base}/{platlibdir}/python', + 'platstdlib': '{base}/{platlibdir}/python', -+ 'purelib': '{base}/{platlibdir}/python', ++ 'purelib': '{base}/share/python', + 'platlib': '{base}/{platlibdir}/python', 'include': '{installed_base}/include/python', 'platinclude': '{installed_base}/include/python', @@ -83,7 +83,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'purelib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', ++ 'purelib': '{userbase}/share/python{py_version_short}/site-packages', + 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', 'include': '{userbase}/include/python{py_version_short}', 'scripts': '{userbase}/bin', diff --git a/python3.spec b/python3.spec index cefbbe4..0fcc90e 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.4 -Release: 4 +Release: 5 Epoch: 1 License: PSF Group: Development/Languages/Python From f7356a7f00672b13cf800fb3fb3060be3e8347a1 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Mon, 22 Aug 2022 18:37:13 +0200 Subject: [PATCH 138/180] - updated to 3.10.6 - updated multilib,tests_with_pythonpath patches --- python3-multilib.patch | 8 ++++---- python3-tests_with_pythonpath.patch | 25 ++++++++++++------------- python3.spec | 6 +++--- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/python3-multilib.patch b/python3-multilib.patch index cab410e..b8e2fbd 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -141,10 +141,10 @@ diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py extra_link_args=readline_extra_link_args, libraries=readline_libs)) else: ---- Python-3.10.3/Lib/test/test_sysconfig.py~ 2022-03-16 12:27:11.000000000 +0100 -+++ Python-3.10.3/Lib/test/test_sysconfig.py 2022-03-22 23:11:16.335919644 +0100 -@@ -299,13 +299,13 @@ - expected = global_path.replace(base, user, 1) +--- Python-3.10.6/Lib/test/test_sysconfig.py.orig 2022-08-22 06:15:16.895139554 +0200 ++++ Python-3.10.6/Lib/test/test_sysconfig.py 2022-08-22 06:18:57.331178879 +0200 +@@ -299,13 +299,13 @@ class TestSysConfig(unittest.TestCase): + expected = os.path.normpath(global_path.replace(base, user, 1)) # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, # whereas posix_prefix does. - if name == 'platlib': diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index c24df66..03b450a 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -36,33 +36,32 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_cmd_line.py Python-3.9.2/L def test_empty_PYTHONPATH_issue16309(self): # On Posix, it is documented that setting PATH to the # empty string is equivalent to not setting PATH at all, -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_compileall.py Python-3.9.2/Lib/test/test_compileall.py ---- Python-3.9.2.org/Lib/test/test_compileall.py 2021-02-25 18:41:39.412060338 +0100 -+++ Python-3.9.2/Lib/test/test_compileall.py 2021-02-25 18:41:41.098779547 +0100 -@@ -486,6 +486,7 @@ class CommandLineTestsBase: - self.initfn = script_helper.make_script(self.pkgdir, '__init__', '') - self.barfn = script_helper.make_script(self.pkgdir, 'bar', '') +--- Python-3.10.6/Lib/test/test_compileall.py.orig 2022-08-21 08:24:26.562151782 +0200 ++++ Python-3.10.6/Lib/test/test_compileall.py 2022-08-22 16:36:51.754553471 +0200 +@@ -508,6 +508,7 @@ class CommandLineTestsBase: + path = importlib.util.cache_from_source(fn) + self.assertFalse(os.path.exists(path)) + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_no_args_compiles_path(self): # Note that -l is implied for the no args case. - self._skip_if_sys_path_not_writable() -@@ -495,6 +496,7 @@ class CommandLineTestsBase: - self.assertNotCompiled(self.initfn) - self.assertNotCompiled(self.barfn) + bazfn = script_helper.make_script(self.directory, 'baz', '') +@@ -517,6 +518,7 @@ class CommandLineTestsBase: + self.assertNotCompiled(self.initfn) + self.assertNotCompiled(self.barfn) + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") @without_source_date_epoch # timestamp invalidation test def test_no_args_respects_force_flag(self): - self._skip_if_sys_path_not_writable() -@@ -513,6 +515,7 @@ class CommandLineTestsBase: + bazfn = script_helper.make_script(self.directory, 'baz', '') +@@ -535,6 +537,7 @@ class CommandLineTestsBase: mtime2 = os.stat(pycpath).st_mtime self.assertNotEqual(mtime, mtime2) + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_no_args_respects_quiet_flag(self): - self._skip_if_sys_path_not_writable() script_helper.make_script(self.directory, 'baz', '') + with self.temporary_pycache_prefix() as env: diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_pydoc.py Python-3.9.2/Lib/test/test_pydoc.py --- Python-3.9.2.org/Lib/test/test_pydoc.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/test/test_pydoc.py 2021-02-25 18:41:41.098779547 +0100 diff --git a/python3.spec b/python3.spec index 0fcc90e..670676d 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.4 -Release: 5 +Version: %{py_ver}.6 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 21f2e113e087083a1e8cf10553d93599 +# Source0-md5: afc7e14f7118d10d1ba95ae8e2134bf0 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 2b9b74f16e2ce7bd9b1b35a4a0882fb145a28bcb Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Mon, 22 Aug 2022 20:16:55 +0200 Subject: [PATCH 139/180] - readded (unbroken) BLDLIBRARY patch (remove -L. from BLDLIBRARY in python runtime configuration) --- python3-BLDLIBRARY.patch | 83 ++++++++++++++++++++++++++++++++++++++++ python3.spec | 4 +- 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 python3-BLDLIBRARY.patch diff --git a/python3-BLDLIBRARY.patch b/python3-BLDLIBRARY.patch new file mode 100644 index 0000000..498878b --- /dev/null +++ b/python3-BLDLIBRARY.patch @@ -0,0 +1,83 @@ +--- Python-3.8.5/Makefile.pre.in.orig 2020-09-17 07:55:13.731893519 +0200 ++++ Python-3.8.5/Makefile.pre.in 2020-09-17 10:33:36.683744945 +0200 +@@ -224,6 +224,7 @@ + LIBRARY= @LIBRARY@ + LDLIBRARY= @LDLIBRARY@ + BLDLIBRARY= @BLDLIBRARY@ ++BLDLIBDIR= @BLDLIBDIR@ + PY3LIBRARY= @PY3LIBRARY@ + DLLLIBRARY= @DLLLIBRARY@ + LDLIBRARYDIR= @LDLIBRARYDIR@ +@@ -588,7 +588,7 @@ clinic: check-clean-src $(srcdir)/Module + + # Build the interpreter + $(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS) +- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) ++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + + platform: $(BUILDPYTHON) pybuilddir.txt + $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform +@@ -723,7 +723,7 @@ Makefile Modules/config.c: Makefile.pre + + + Programs/_testembed: Programs/_testembed.o $(LIBRARY_DEPS) +- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) ++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + + ############################################################################ + # Importlib +--- Python-3.8.5/configure.ac.orig 2020-09-17 07:55:13.735226834 +0200 ++++ Python-3.8.5/configure.ac 2020-09-17 10:46:44.172812084 +0200 +@@ -1033,6 +1033,7 @@ + # with the ABI build flags appended. + AC_SUBST(LDLIBRARY) + AC_SUBST(DLLLIBRARY) ++AC_SUBST(BLDLIBDIR) + AC_SUBST(BLDLIBRARY) + AC_SUBST(PY3LIBRARY) + AC_SUBST(LDLIBRARYDIR) +@@ -1040,6 +1041,7 @@ + AC_SUBST(RUNSHARED) + AC_SUBST(LDVERSION) + LDLIBRARY="$LIBRARY" ++BLDLIBDIR='' + BLDLIBRARY='$(LDLIBRARY)' + INSTSONAME='$(LDLIBRARY)' + DLLLIBRARY='' +@@ -1156,7 +1158,8 @@ + ;; + SunOS*) + LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.' ++ BLDLIBRARY='-lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + INSTSONAME="$LDLIBRARY".$SOVERSION + if test "$with_pydebug" != yes +@@ -1147,7 +1147,8 @@ if test $enable_shared = "yes"; then + ;; + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*) + LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.' ++ BLDLIBRARY='-lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + INSTSONAME="$LDLIBRARY".$SOVERSION + if test "$with_pydebug" != yes +@@ -1183,12 +1187,14 @@ + LDLIBRARY='libpython$(LDVERSION).sl' + ;; + esac +- BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-Wl,+b,$(LIBDIR) -L.' ++ BLDLIBRARY='-lpython$(VERSION)' + RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} + ;; + Darwin*) + LDLIBRARY='libpython$(LDVERSION).dylib' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-L.' ++ BLDLIBRARY='-lpython$(LDVERSION)' + RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} + ;; + AIX*) diff --git a/python3.spec b/python3.spec index 670676d..669e111 100644 --- a/python3.spec +++ b/python3.spec @@ -59,7 +59,7 @@ Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch - +Patch4: %{name}-BLDLIBRARY.patch Patch5: %{name}-config.patch Patch7: %{name}-db.patch Patch9: %{name}-tests_with_pythonpath.patch @@ -484,7 +484,7 @@ Moduły testowe dla Pythona. %patch1 -p1 %patch2 -p1 %patch3 -p1 - +%patch4 -p1 %patch5 -p1 %patch7 -p1 %patch9 -p1 From 649b64398f2f27839c18477b3d889df88d820f21 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 3 Sep 2022 19:56:21 +0200 Subject: [PATCH 140/180] - fixed Linux case in BLDLIBRARY patch --- python3-BLDLIBRARY.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3-BLDLIBRARY.patch b/python3-BLDLIBRARY.patch index 498878b..663e804 100644 --- a/python3-BLDLIBRARY.patch +++ b/python3-BLDLIBRARY.patch @@ -59,7 +59,7 @@ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*) LDLIBRARY='libpython$(LDVERSION).so' - BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.' ++ BLDLIBDIR='-L.' + BLDLIBRARY='-lpython$(VERSION)' RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} INSTSONAME="$LDLIBRARY".$SOVERSION From 158c0b0894045e7cae0a263fe816dcf0335577cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 8 Sep 2022 21:58:15 +0200 Subject: [PATCH 141/180] Up to 3.10.7. --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 669e111..b2aa8b7 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.6 +Version: %{py_ver}.7 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: afc7e14f7118d10d1ba95ae8e2134bf0 +# Source0-md5: b8094f007b3a835ca3be6bdf8116cccc Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From c8dd96c2d74eb336d9b3832516397aa4fac5c305 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Wed, 12 Oct 2022 23:33:01 +0200 Subject: [PATCH 142/180] up to 3.10.8 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index b2aa8b7..4180244 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.7 +Version: %{py_ver}.8 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: b8094f007b3a835ca3be6bdf8116cccc +# Source0-md5: e92356b012ed4d0e09675131d39b1bde Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From bbfafc62c81bddf0b48e9fb04ef8524ed7df7eff Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Thu, 13 Oct 2022 09:29:03 +0200 Subject: [PATCH 143/180] make sure setuptools does not override distutils --- python3.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python3.spec b/python3.spec index 4180244..b29a9f2 100644 --- a/python3.spec +++ b/python3.spec @@ -531,6 +531,8 @@ if ! grep -q "tmpfs" /proc/self/mounts; then exit 1 fi +export SETUPTOOLS_USE_DISTUTILS=stdlib + %{__aclocal} %{__autoconf} %configure \ From 41584f3d39bb0525ad3979f3e742e61a5a29cae9 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Thu, 13 Oct 2022 09:44:47 +0200 Subject: [PATCH 144/180] Release 2 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index b29a9f2..2138667 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.8 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python From 7a3d8fdd029a36ede122bc9fc1fb22be46cb5e90 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Fri, 18 Nov 2022 20:25:29 +0100 Subject: [PATCH 145/180] move pdb/profile/pstats from -devel-tools to -modules required by files in -modules - pdb: doctest - profile, pstats: cProfile --- python3.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/python3.spec b/python3.spec index 2138667..162c3eb 100644 --- a/python3.spec +++ b/python3.spec @@ -868,6 +868,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/opcode.py %{py_libdir}/optparse.py %{py_libdir}/pathlib.py +%{py_libdir}/pdb.py %{py_libdir}/pickle.py %{py_libdir}/pickletools.py %{py_libdir}/pipes.py @@ -876,6 +877,8 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/plistlib.py %{py_libdir}/poplib.py %{py_libdir}/pprint.py +%{py_libdir}/profile.py +%{py_libdir}/pstats.py %{py_libdir}/pty.py %{py_libdir}/py_compile.py %{py_libdir}/pyclbr.py @@ -884,13 +887,13 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/random.py %{py_libdir}/rlcompleter.py %{py_libdir}/runpy.py -%{py_libdir}/secrets.py -%{py_libdir}/signal.py %{py_libdir}/sched.py +%{py_libdir}/secrets.py %{py_libdir}/selectors.py %{py_libdir}/shelve.py %{py_libdir}/shlex.py %{py_libdir}/shutil.py +%{py_libdir}/signal.py %{py_libdir}/smtpd.py %{py_libdir}/smtplib.py %{py_libdir}/sndhdr.py @@ -954,13 +957,13 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/cgitb.cpython-*.py[co] %{py_libdir}/__pycache__/chunk.cpython-*.py[co] %{py_libdir}/__pycache__/cmd.cpython-*.py[co] -%{py_libdir}/__pycache__/contextvars.cpython-*.py[co] %{py_libdir}/__pycache__/code.cpython-*.py[co] %{py_libdir}/__pycache__/codeop.cpython-*.py[co] %{py_libdir}/__pycache__/colorsys.cpython-*.py[co] %{py_libdir}/__pycache__/compileall.cpython-*.py[co] %{py_libdir}/__pycache__/configparser.cpython-*.py[co] %{py_libdir}/__pycache__/contextlib.cpython-*.py[co] +%{py_libdir}/__pycache__/contextvars.cpython-*.py[co] %{py_libdir}/__pycache__/copy.cpython-*.py[co] %{py_libdir}/__pycache__/crypt.cpython-*.py[co] %{py_libdir}/__pycache__/csv.cpython-*.py[co] @@ -1001,6 +1004,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/opcode.cpython-*.py[co] %{py_libdir}/__pycache__/optparse.cpython-*.py[co] %{py_libdir}/__pycache__/pathlib.cpython-*.py[co] +%{py_libdir}/__pycache__/pdb.cpython-*.py[co] %{py_libdir}/__pycache__/pickle.cpython-*.py[co] %{py_libdir}/__pycache__/pickletools.cpython-*.py[co] %{py_libdir}/__pycache__/pipes.cpython-*.py[co] @@ -1009,6 +1013,8 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/plistlib.cpython-*.py[co] %{py_libdir}/__pycache__/poplib.cpython-*.py[co] %{py_libdir}/__pycache__/pprint.cpython-*.py[co] +%{py_libdir}/__pycache__/profile.cpython-*.py[co] +%{py_libdir}/__pycache__/pstats.cpython-*.py[co] %{py_libdir}/__pycache__/pty.cpython-*.py[co] %{py_libdir}/__pycache__/py_compile.cpython-*.py[co] %{py_libdir}/__pycache__/pyclbr.cpython-*.py[co] @@ -1330,13 +1336,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-devel* %attr(755,root,root) %{_bindir}/pygettext%{py_ver} %attr(755,root,root) %{_bindir}/pyreindent%{py_ver} -%{py_libdir}/pdb.py -%{py_libdir}/profile.py -%{py_libdir}/pstats.py %{py_libdir}/timeit.py -%{py_libdir}/__pycache__/pdb.cpython-*.py[co] -%{py_libdir}/__pycache__/profile.cpython-*.py[co] -%{py_libdir}/__pycache__/pstats.cpython-*.py[co] %{py_libdir}/__pycache__/timeit.cpython-*.py[co] %files 2to3 From 7cbd5c6e18b81f6f8c0e292656dea6eaa3fe1b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 7 Dec 2022 12:16:13 +0100 Subject: [PATCH 146/180] Up to 3.10.9; fixes CVE-2022-37454; blocks possibility of CVE-2022-42919 --- python3.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index 162c3eb..b2faa36 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.8 -Release: 2 +Version: %{py_ver}.9 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: e92356b012ed4d0e09675131d39b1bde +# Source0-md5: dc8c0f274b28ee9e95923d20cfc364c9 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From e12dda383f7fae7943524954b38fddcdbf502d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 1 Feb 2023 20:45:39 +0100 Subject: [PATCH 147/180] Release 2 (by relup.sh) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index b2faa36..b3deea6 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.9 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python From 85647d6bcf1a32cc7c048e11d5dc0de43ce0d739 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 11 Feb 2023 11:39:32 +0100 Subject: [PATCH 148/180] - updated to 3.10.10 --- python3.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index b3deea6..63eeecc 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.9 -Release: 2 +Version: %{py_ver}.10 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: dc8c0f274b28ee9e95923d20cfc364c9 +# Source0-md5: 7bf85df71bbe7f95e5370b983e6ae684 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch @@ -1113,6 +1113,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_statistics.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testclinic.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testinternalcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so From 859069a6cd82ded8dfada157961558dfbbd6e47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 10 Apr 2023 00:25:29 +0200 Subject: [PATCH 149/180] Up to 3.10.11. --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 63eeecc..5185461 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.10 +Version: %{py_ver}.11 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 7bf85df71bbe7f95e5370b983e6ae684 +# Source0-md5: 1bf8481a683e0881e14d52e0f23633a6 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From e03e034e1b48a6c8a6e1dd21f382b26e828faa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 8 Jun 2023 12:10:00 +0200 Subject: [PATCH 150/180] Up to 3.10.12. --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 5185461..96eed6e 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.11 +Version: %{py_ver}.12 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 1bf8481a683e0881e14d52e0f23633a6 +# Source0-md5: 49b0342476b984e106d308c25d657f12 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 265400ff562106968fe2753666b1585c42a37a19 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Fri, 25 Aug 2023 11:36:07 +0200 Subject: [PATCH 151/180] up to 3.10.13 (fixes CVE-2023-40217) --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 96eed6e..cde2e31 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.12 +Version: %{py_ver}.13 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 49b0342476b984e106d308c25d657f12 +# Source0-md5: 8847dc6458d1431d0ae0f55942deeb89 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch Patch1: %{name}-ac_fixes.patch From 9010b4daf37ae79207ce9f6455d4ff21250785b8 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Fri, 25 Aug 2023 11:36:43 +0200 Subject: [PATCH 152/180] rpm version for noarch subpackage --- python3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python3.spec b/python3.spec index cde2e31..a8f1dd9 100644 --- a/python3.spec +++ b/python3.spec @@ -93,6 +93,7 @@ BuildRequires: ncurses-ext-devel >= 5.2 BuildRequires: openssl-devel >= 0.9.7 BuildRequires: pkgconfig BuildRequires: readline-devel >= 5.0 +BuildRequires: rpm-build >= 4.6 BuildRequires: rpm-pythonprov BuildRequires: sed >= 4.0 BuildRequires: sqlite3-devel >= 3.3.5 From 3afbaaa2eb0468f97d3dcb5a758bb8f1c43f8264 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Fri, 25 Aug 2023 11:37:15 +0200 Subject: [PATCH 153/180] BRs for tar.xz source --- python3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python3.spec b/python3.spec index a8f1dd9..53c476c 100644 --- a/python3.spec +++ b/python3.spec @@ -101,6 +101,7 @@ BuildRequires: tar >= 1:1.22 %{?with_info:BuildRequires: tetex-makeindex} %{?with_tkinter:BuildRequires: tix-devel >= 1:8.1.4-4} %{?with_tkinter:BuildRequires: tk-devel >= 8.4.3} +BuildRequires: xz BuildRequires: xz-devel BuildRequires: zlib-devel Requires: %{name}-libs = %{epoch}:%{version}-%{release} From a5326af3a474c02de96c9c0d84ffbc0b512b4989 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 23 Sep 2023 12:47:27 +0200 Subject: [PATCH 154/180] - enhanced multilib patch to adjust venv lib symlinking; release 2 --- python3-multilib.patch | 16 ++++++++++++++++ python3.spec | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/python3-multilib.patch b/python3-multilib.patch index b8e2fbd..83174c6 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -160,3 +160,19 @@ diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py self.assertEqual(user_path, expected) def test_main(self): +--- Python-3.10.13/Lib/venv/__init__.py.orig 2023-08-24 14:46:25.000000000 +0200 ++++ Python-3.10.13/Lib/venv/__init__.py 2023-09-23 12:30:09.948046280 +0200 +@@ -137,10 +137,9 @@ class EnvBuilder: + context.inc_path = path = os.path.join(env_dir, incpath) + create_if_needed(path) + create_if_needed(libpath) +- # Issue 21197: create lib64 as a symlink to lib on 64-bit non-OS X POSIX +- if ((sys.maxsize > 2**32) and (os.name == 'posix') and +- (sys.platform != 'darwin')): +- link_path = os.path.join(env_dir, 'lib64') ++ # Issue 21197: create lib as a symlink to lib on 64-bit non-OS X POSIX ++ if sys.platlibdir != 'lib': ++ link_path = os.path.join(env_dir, sys.platlibdir) + if not os.path.exists(link_path): # Issue #21643 + os.symlink('lib', link_path) + context.bin_path = binpath = os.path.join(env_dir, binname) diff --git a/python3.spec b/python3.spec index 53c476c..cc4b1f4 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.13 -Release: 1 +Release: 2 Epoch: 1 License: PSF Group: Development/Languages/Python From 60c8751aa508d1a19c25ac766a119c81fcfa4265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 12 Jan 2024 16:35:52 +0100 Subject: [PATCH 155/180] Up to 3.12.1 (builds; starts; passes own test suite); needs some review from others --- python3-BLDLIBRARY.patch | 42 ++++++------- python3-ac_fixes.patch | 29 --------- python3-bdist_rpm.patch | 29 --------- python3-db.patch | 31 ---------- python3-installcompile.patch | 38 +++++------- python3-multilib.patch | 71 +++------------------- python3-no_cmdline_tests.patch | 4 +- python3-pythonpath.patch | 22 ------- python3-tests.patch | 4 +- python3-tests_with_pythonpath.patch | 31 +++++----- python3.spec | 92 ++++++++++------------------- 11 files changed, 95 insertions(+), 298 deletions(-) delete mode 100644 python3-ac_fixes.patch delete mode 100644 python3-bdist_rpm.patch delete mode 100644 python3-db.patch diff --git a/python3-BLDLIBRARY.patch b/python3-BLDLIBRARY.patch index 663e804..fcaecd9 100644 --- a/python3-BLDLIBRARY.patch +++ b/python3-BLDLIBRARY.patch @@ -8,37 +8,37 @@ PY3LIBRARY= @PY3LIBRARY@ DLLLIBRARY= @DLLLIBRARY@ LDLIBRARYDIR= @LDLIBRARYDIR@ -@@ -588,7 +588,7 @@ clinic: check-clean-src $(srcdir)/Module +@@ -780,7 +780,7 @@ clinic: check-clean-src $(srcdir)/Module # Build the interpreter - $(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS) -- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + $(BUILDPYTHON): Programs/python.o $(LINK_PYTHON_DEPS) +- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) ++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) - platform: $(BUILDPYTHON) pybuilddir.txt + platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform -@@ -723,7 +723,7 @@ Makefile Modules/config.c: Makefile.pre +@@ -1056,7 +1056,7 @@ regen-re: $(BUILDPYTHON) + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/generate_re_casefix.py $(srcdir)/Lib/re/_casefix.py - - Programs/_testembed: Programs/_testembed.o $(LIBRARY_DEPS) -- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) + Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS) +- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) ++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) ############################################################################ - # Importlib + # "Bootstrap Python" used to run deepfreeze.py --- Python-3.8.5/configure.ac.orig 2020-09-17 07:55:13.735226834 +0200 +++ Python-3.8.5/configure.ac 2020-09-17 10:46:44.172812084 +0200 -@@ -1033,6 +1033,7 @@ +@@ -1359,6 +1359,7 @@ AC_MSG_RESULT([$LIBRARY]) # with the ABI build flags appended. - AC_SUBST(LDLIBRARY) - AC_SUBST(DLLLIBRARY) -+AC_SUBST(BLDLIBDIR) - AC_SUBST(BLDLIBRARY) - AC_SUBST(PY3LIBRARY) - AC_SUBST(LDLIBRARYDIR) -@@ -1040,6 +1041,7 @@ - AC_SUBST(RUNSHARED) - AC_SUBST(LDVERSION) + AC_SUBST([LDLIBRARY]) + AC_SUBST([DLLLIBRARY]) ++AC_SUBST([BLDLIBDIR]) + AC_SUBST([BLDLIBRARY]) + AC_SUBST([PY3LIBRARY]) + AC_SUBST([LDLIBRARYDIR]) +@@ -1366,6 +1367,7 @@ AC_SUBST([INSTSONAME]) + AC_SUBST([RUNSHARED]) + AC_SUBST([LDVERSION]) LDLIBRARY="$LIBRARY" +BLDLIBDIR='' BLDLIBRARY='$(LDLIBRARY)' diff --git a/python3-ac_fixes.patch b/python3-ac_fixes.patch deleted file mode 100644 index 36e3783..0000000 --- a/python3-ac_fixes.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- Python-3.6.2/configure.ac~ 2017-07-08 05:33:27.000000000 +0200 -+++ Python-3.6.2/configure.ac 2017-08-07 10:28:44.498951134 +0200 -@@ -1485,25 +1485,6 @@ then - CFLAGS_ALIASING="-fno-strict-aliasing" - fi - -- case $ac_cv_prog_cc_g in -- yes) -- if test "$Py_DEBUG" = 'true' ; then -- # Optimization messes up debuggers, so turn it off for -- # debug builds. -- if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then -- OPT="-g -Og -Wall" -- else -- OPT="-g -O0 -Wall" -- fi -- else -- OPT="-g $WRAP -O3 -Wall" -- fi -- ;; -- *) -- OPT="-O3 -Wall" -- ;; -- esac -- - case $ac_sys_system in - SCO_SV*) OPT="$OPT -m486 -DSCO5" - ;; - diff --git a/python3-bdist_rpm.patch b/python3-bdist_rpm.patch deleted file mode 100644 index 4579c97..0000000 --- a/python3-bdist_rpm.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -dur -x '*~' -x '*.orig' Python-3.5.0.orig/Lib/distutils/command/bdist_rpm.py Python-3.5.0/Lib/distutils/command/bdist_rpm.py ---- Python-3.5.0.orig/Lib/distutils/command/bdist_rpm.py 2015-09-13 13:41:20.000000000 +0200 -+++ Python-3.5.0/Lib/distutils/command/bdist_rpm.py 2015-12-03 18:14:59.483958511 +0100 -@@ -324,6 +324,16 @@ - if self.rpm3_mode: - rpm_cmd.extend(['--define', - '_topdir %s' % os.path.abspath(self.rpm_base)]) -+ rpm_cmd.extend(['--define', -+ '_specdir %s/SPECS' % os.path.abspath(self.rpm_base)]) -+ rpm_cmd.extend(['--define', -+ '_sourcedir %s/SOURCES' % os.path.abspath(self.rpm_base)]) -+ rpm_cmd.extend(['--define', -+ '_builddir %s/BUILD' % os.path.abspath(self.rpm_base)]) -+ rpm_cmd.extend(['--define', -+ '_rpmdir %s/RPMS' % os.path.abspath(self.rpm_base)]) -+ rpm_cmd.extend(['--define', -+ '_srcrpmdir %s/SRPMS' % os.path.abspath(self.rpm_base)]) - if not self.keep_temp: - rpm_cmd.append('--clean') - -@@ -337,7 +347,7 @@ - # list is empty) - nvr_string = "%{name}-%{version}-%{release}" - src_rpm = nvr_string + ".src.rpm" -- non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm" -+ non_src_rpm = nvr_string + ".%{arch}.rpm" - q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % ( - src_rpm, non_src_rpm, spec_path) - diff --git a/python3-db.patch b/python3-db.patch deleted file mode 100644 index 928aa62..0000000 --- a/python3-db.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- Python-3.3.3/setup.py.orig 2013-11-21 18:36:59.259841950 +0100 -+++ Python-3.3.3/setup.py 2013-11-21 19:07:23.173098741 +0100 -@@ -835,7 +835,7 @@ - # a release. Most open source OSes come with one or more - # versions of BerkeleyDB already installed. - -- max_db_ver = (5, 3) -+ max_db_ver = (6, 2) - min_db_ver = (3, 3) - db_setup_debug = False # verbose debug prints from this script? - ---- Python-3.8.0/setup.py~ 2019-10-15 10:03:10.000000000 +0200 -+++ Python-3.8.0/setup.py 2019-10-15 10:03:52.493993277 +0200 -@@ -1275,16 +1275,7 @@ class PyBuildExt(build_ext): - for cand in dbm_order: - if cand == "ndbm": - if find_file("ndbm.h", self.inc_dirs, []) is not None: -- # Some systems have -lndbm, others have -lgdbm_compat, -- # others don't have either -- if self.compiler.find_library_file(self.lib_dirs, -- 'ndbm'): -- ndbm_libs = ['ndbm'] -- elif self.compiler.find_library_file(self.lib_dirs, -- 'gdbm_compat'): -- ndbm_libs = ['gdbm_compat'] -- else: -- ndbm_libs = [] -+ ndbm_libs = ['gdbm_compat'] - if dbm_setup_debug: print("building dbm using ndbm") - dbmext = Extension('_dbm', ['_dbmmodule.c'], - define_macros=[ diff --git a/python3-installcompile.patch b/python3-installcompile.patch index 82c914e..1611ffb 100644 --- a/python3-installcompile.patch +++ b/python3-installcompile.patch @@ -1,30 +1,20 @@ -diff -urNp -x '*.orig' Python-3.9.2.org/Makefile.pre.in Python-3.9.2/Makefile.pre.in ---- Python-3.9.2.org/Makefile.pre.in 2021-02-25 18:42:02.242771533 +0100 -+++ Python-3.9.2/Makefile.pre.in 2021-02-25 18:42:03.919490432 +0100 -@@ -1262,7 +1262,7 @@ altinstall: commoninstall - +--- a/Makefile.pre.in~ 2024-01-12 14:35:45.000000000 +0100 ++++ b/Makefile.pre.in 2024-01-12 14:40:01.203324556 +0100 +@@ -1921,7 +1921,7 @@ altinstall: commoninstall + .PHONY: commoninstall commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \ altbininstall libinstall inclinstall libainstall \ -- sharedinstall oldsharedinstall altmaninstall \ -+ sharedinstall oldsharedinstall altmaninstall installcompile \ - @FRAMEWORKALTINSTALLLAST@ +- sharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@ ++ sharedinstall altmaninstall installcompile @FRAMEWORKALTINSTALLLAST@ # Install shared libraries enabled by Setup -@@ -1530,6 +1530,8 @@ libinstall: build_all $(srcdir)/Modules/ - $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ - $(DESTDIR)$(LIBDEST)/distutils/tests ; \ - fi -+ + DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED) +@@ -2316,6 +2316,8 @@ libinstall: all $(srcdir)/Modules/xxmodu + $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ + $(DESTDIR)$(LIBDEST); \ + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt ++.PHONY: installcompile +installcompile: libainstall libinstall - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + @ # Build PYC files for the 3 optimization levels (0, 1, 2) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ - -j0 -d $(LIBDEST) -f \ -@@ -1938,7 +1940,7 @@ Python/thread.o: @THREADHEADERS@ $(srcdi - .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure - .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools - .PHONY: frameworkaltinstallunixtools recheck clean clobber distclean --.PHONY: smelly funny patchcheck touch altmaninstall commoninstall -+.PHONY: smelly funny patchcheck touch altmaninstall installcompile commoninstall - .PHONY: clean-retain-profile profile-removal run_profile_task - .PHONY: build_all_generate_profile build_all_merge_profile - .PHONY: gdbhooks diff --git a/python3-multilib.patch b/python3-multilib.patch index 83174c6..2421088 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -1,34 +1,3 @@ -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py ---- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 -@@ -145,13 +145,13 @@ def get_python_lib(plat_specific=0, stan - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -- if plat_specific or standard_lib: -+ if plat_specific or standard_lib or prefix != "/usr": - # Platform-specific modules (any module from a non-pure-Python - # module distribution) or standard Python library modules. - libdir = sys.platlibdir - else: - # Pure Python -- libdir = "lib" -+ libdir = "share" - libpython = os.path.join(prefix, libdir, - "python" + get_python_version()) - if standard_lib: -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/tests/test_install.py Python-3.9.2/Lib/distutils/tests/test_install.py ---- Python-3.9.2.org/Lib/distutils/tests/test_install.py 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/Lib/distutils/tests/test_install.py 2021-02-25 18:40:00.705652346 +0100 -@@ -56,7 +56,7 @@ class InstallTestCase(support.TempdirMan - expected = os.path.normpath(expected) - self.assertEqual(got, expected) - -- libdir = os.path.join(destination, "lib", "python") -+ libdir = os.path.join(destination, sys.platlibdir, "python") - check_path(cmd.install_lib, libdir) - platlibdir = os.path.join(destination, sys.platlibdir, "python") - check_path(cmd.install_platlib, platlibdir) diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py --- Python-3.9.2.org/Lib/site.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/site.py 2021-02-25 18:40:00.705652346 +0100 @@ -41,7 +10,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py def getuserbase(): -@@ -344,6 +344,8 @@ def getsitepackages(prefixes=None): +@@ -371,6 +371,8 @@ def getsitepackages(prefixes=None): "python%d.%d" % sys.version_info[:2], "site-packages") sitepackages.append(path) @@ -49,7 +18,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py + sitepackages.append(os.path.join(prefix, "share", "python%d.%d" % sys.version_info[:2], "site-packages")) else: sitepackages.append(prefix) - + sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py --- Python-3.9.2.org/Lib/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 @@ -90,7 +59,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon 'data': '{userbase}', @@ -490,7 +490,11 @@ def get_config_h_filename(): else: - inc_dir = _sys_home or _PROJECT_BASE + inc_dir = _PROJECT_BASE else: - inc_dir = get_path('platinclude') + if hasattr(sys, 'abiflags'): @@ -115,32 +84,6 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon fi; \ else \ echo Skip install of $(LIBRARY) - use make frameworkinstall; \ -diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py ---- Python-3.9.2.org/setup.py 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/setup.py 2021-02-25 18:40:00.708985783 +0100 -@@ -750,7 +750,7 @@ class PyBuildExt(build_ext): - add_dir_to_list(self.compiler.include_dirs, - sysconfig.get_config_var("INCLUDEDIR")) - -- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib'] -+ system_lib_dirs = ['/' + sys.platlibdir, '/usr/' + sys.platlibdir] - system_include_dirs = ['/usr/include'] - # lib_dirs and inc_dirs are used to search for files; - # if a file is found in one of those directories, it can -@@ -1039,11 +1039,11 @@ class PyBuildExt(build_ext): - elif curses_library: - readline_libs.append(curses_library) - elif self.compiler.find_library_file(self.lib_dirs + -- ['/usr/lib/termcap'], -+ ['/usr/' + sys.platlibdir + '/termcap'], - 'termcap'): - readline_libs.append('termcap') - self.add(Extension('readline', ['readline.c'], -- library_dirs=['/usr/lib/termcap'], -+ library_dirs=['/usr/' + sys.platlibdir + '/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs)) - else: --- Python-3.10.6/Lib/test/test_sysconfig.py.orig 2022-08-22 06:15:16.895139554 +0200 +++ Python-3.10.6/Lib/test/test_sysconfig.py 2022-08-22 06:18:57.331178879 +0200 @@ -299,13 +299,13 @@ class TestSysConfig(unittest.TestCase): @@ -162,9 +105,9 @@ diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py def test_main(self): --- Python-3.10.13/Lib/venv/__init__.py.orig 2023-08-24 14:46:25.000000000 +0200 +++ Python-3.10.13/Lib/venv/__init__.py 2023-09-23 12:30:09.948046280 +0200 -@@ -137,10 +137,9 @@ class EnvBuilder: - context.inc_path = path = os.path.join(env_dir, incpath) - create_if_needed(path) +@@ -145,10 +145,9 @@ class EnvBuilder: + create_if_needed(incpath) + context.lib_path = libpath create_if_needed(libpath) - # Issue 21197: create lib64 as a symlink to lib on 64-bit non-OS X POSIX - if ((sys.maxsize > 2**32) and (os.name == 'posix') and @@ -175,4 +118,4 @@ diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py + link_path = os.path.join(env_dir, sys.platlibdir) if not os.path.exists(link_path): # Issue #21643 os.symlink('lib', link_path) - context.bin_path = binpath = os.path.join(env_dir, binname) + context.bin_path = binpath diff --git a/python3-no_cmdline_tests.patch b/python3-no_cmdline_tests.patch index e786687..f33f8fc 100644 --- a/python3-no_cmdline_tests.patch +++ b/python3-no_cmdline_tests.patch @@ -20,7 +20,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Pytho class EnvironmentVariableTests(BaseTest): def test_single_warning(self): -@@ -1206,14 +1207,17 @@ class EnvironmentVariableTests(BaseTest) +@@ -1278,9 +1278,11 @@ class EnvironmentVariableTests(BaseTest) PYTHONDEVMODE="") self.assertEqual(stdout, str([PYTHONWARNINGS]).encode()) @@ -32,8 +32,10 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Pytho class PyEnvironmentVariableTests(EnvironmentVariableTests, unittest.TestCase): module = py_warnings +@@ -1326,6 +1328,7 @@ class _DeprecatedTest(BaseTest, unittest class BootstrapTest(unittest.TestCase): + + @unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled") def test_issue_8766(self): # "import encodings" emits a warning whereas the warnings is not loaded diff --git a/python3-pythonpath.patch b/python3-pythonpath.patch index 1342158..d2bd080 100644 --- a/python3-pythonpath.patch +++ b/python3-pythonpath.patch @@ -1,25 +1,3 @@ ---- Python-3.0.1/Lib/distutils/tests/test_build_scripts.py.wiget 2004-08-26 07:44:02.000000000 +0200 -+++ Python-3.0.1/Lib/distutils/tests/test_build_scripts.py 2009-03-14 18:12:32.000000000 +0100 -@@ -58,7 +58,7 @@ class BuildScriptsTestCase(support.Tempd - "pass\n")) - expected.append("script2.py") - self.write_script(dir, "script2.py", -- ("#!/usr/bin/python\n" -+ ("#!/usr/bin/python3\n" - "# bogus script w/ Python sh-bang\n" - "pass\n")) - expected.append("shell.sh") ---- Python-3.0.1/Lib/distutils/tests/test_install_scripts.py.wiget 2004-08-03 20:53:07.000000000 +0200 -+++ Python-3.0.1/Lib/distutils/tests/test_install_scripts.py 2009-03-14 18:12:32.000000000 +0100 -@@ -48,7 +48,7 @@ class InstallScriptsTestCase(support.Tem - write_script("script1.py", ("#! /usr/bin/env python2.3\n" - "# bogus script w/ Python sh-bang\n" - "pass\n")) -- write_script("script2.py", ("#!/usr/bin/python\n" -+ write_script("script2.py", ("#!/usr/bin/python3\n" - "# bogus script w/ Python sh-bang\n" - "pass\n")) - write_script("shell.sh", ("#!/bin/sh\n" --- Python-3.0.1/Lib/cgi.py.wiget 2008-12-04 21:11:57.000000000 +0100 +++ Python-3.0.1/Lib/cgi.py 2009-03-14 18:12:32.000000000 +0100 @@ -1,6 +1,6 @@ diff --git a/python3-tests.patch b/python3-tests.patch index 83f26ea..6695810 100644 --- a/python3-tests.patch +++ b/python3-tests.patch @@ -1,8 +1,8 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_imaplib.py Python-3.9.2/Lib/test/test_imaplib.py --- Python-3.9.2.org/Lib/test/test_imaplib.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/test/test_imaplib.py 2021-02-25 18:42:23.540101637 +0100 -@@ -74,7 +74,7 @@ class TestImaplib(unittest.TestCase): - +@@ -77,7 +77,7 @@ class TestImaplib(unittest.TestCase): + @socket_helper.skip_if_tcp_blackhole def test_imap4_host_default_value(self): # Check whether the IMAP4_PORT is truly unavailable. - with socket.socket() as s: diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index 03b450a..796532d 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -1,8 +1,8 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_asyncio/test_tasks.py Python-3.9.2/Lib/test/test_asyncio/test_tasks.py --- Python-3.9.2.org/Lib/test/test_asyncio/test_tasks.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/test/test_asyncio/test_tasks.py 2021-02-25 18:41:41.098779547 +0100 -@@ -6,6 +6,7 @@ import contextvars - import functools +@@ -4,6 +4,7 @@ import collections + import contextvars import gc import io +import os @@ -28,10 +28,11 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_cmd_line.py Python-3.9.2/L def test_large_PYTHONPATH(self): path1 = "ABCDE" * 100 path2 = "FGHIJ" * 100 -@@ -280,6 +281,7 @@ class CmdLineTest(unittest.TestCase): - self.assertIn(path1.encode('ascii'), out) - self.assertIn(path2.encode('ascii'), out) + +@@ -374,6 +374,7 @@ class CmdLineTest(unittest.TestCase): + @unittest.skipIf(sys.flags.safe_path, + 'PYTHONSAFEPATH changes default sys.path') + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_empty_PYTHONPATH_issue16309(self): # On Posix, it is documented that setting PATH to the @@ -46,18 +47,18 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_cmd_line.py Python-3.9.2/L def test_no_args_compiles_path(self): # Note that -l is implied for the no args case. bazfn = script_helper.make_script(self.directory, 'baz', '') -@@ -517,6 +518,7 @@ class CommandLineTestsBase: - self.assertNotCompiled(self.initfn) - self.assertNotCompiled(self.barfn) +@@ -558,6 +558,7 @@ class CommandLineTestsBase: -+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") @without_source_date_epoch # timestamp invalidation test + @support.requires_resource('cpu') ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_no_args_respects_force_flag(self): bazfn = script_helper.make_script(self.directory, 'baz', '') -@@ -535,6 +537,7 @@ class CommandLineTestsBase: - mtime2 = os.stat(pycpath).st_mtime + with self.temporary_pycache_prefix() as env: +@@ -577,6 +577,7 @@ class CommandLineTestsBase: self.assertNotEqual(mtime, mtime2) + @support.requires_resource('cpu') + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_no_args_respects_quiet_flag(self): script_helper.make_script(self.directory, 'baz', '') @@ -92,8 +93,8 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/t def test_executable(self): """ Test that the sys.executable value is as expected. -@@ -406,6 +408,7 @@ class BasicTest(BaseTest): - self.assertEqual(out.strip(), 'False'.encode()) +@@ -641,6 +641,7 @@ class BasicTest(BaseTest): + self.assertFalse(line.endswith(b'\r\n'), error_message) @requireVenvCreate +@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") @@ -103,9 +104,9 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/t diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Python-3.9.2/Lib/test/test_warnings/__init__.py --- Python-3.9.2.org/Lib/test/test_warnings/__init__.py 2021-02-25 18:41:39.412060338 +0100 +++ Python-3.9.2/Lib/test/test_warnings/__init__.py 2021-02-25 18:41:41.098779547 +0100 -@@ -1218,6 +1218,7 @@ class PyEnvironmentVariableTests(Environ - +@@ -1329,6 +1329,7 @@ class _DeprecatedTest(BaseTest, unittest class BootstrapTest(unittest.TestCase): + @unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled") + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_issue_8766(self): diff --git a/python3.spec b/python3.spec index cc4b1f4..30e9891 100644 --- a/python3.spec +++ b/python3.spec @@ -13,7 +13,7 @@ # tests which may fail because of builder environment limitations (no /proc or /dev/pts) %define nobuilder_tests -u-network -x test_resource -x test_openpty -x test_socket -x test_nis -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization -# tests which fail because of some unknown/unresolved reason (this list should be %{nil}) +# tests which fail because of some unknown/unresolved reason (this list should be %%{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... # test_gdb: fails, as the gdb uses old python version # test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error @@ -21,7 +21,7 @@ %define broken_tests_x32 -x test_time %undefine with_optimizations %endif -%define broken_tests -x test_embed -x test_nntplib -x test_gdb -x test_site -x test_distutils -x test_bdist_rpm -x test_ssl %{?broken_tests_x32} +%define broken_tests -x test_embed -x test_nntplib -x test_gdb -x test_site -x test_ssl %{?broken_tests_x32} %ifarch armv6hl armv7hl armv7hnl %define _python_target_abi %{?_gnu}hf @@ -29,7 +29,7 @@ %define _python_target_abi %{?_gnu} %endif -%define py_ver 3.10 +%define py_ver 3.12 %define py_abi %{py_ver} %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_python_target_abi} %define py_prefix %{_prefix} @@ -47,23 +47,23 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.13 -Release: 2 +Version: %{py_ver}.1 +Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 8847dc6458d1431d0ae0f55942deeb89 +# Source0-md5: 50f827c800483776c8ef86e6a53831fa Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch -Patch1: %{name}-ac_fixes.patch + Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch Patch4: %{name}-BLDLIBRARY.patch Patch5: %{name}-config.patch -Patch7: %{name}-db.patch + Patch9: %{name}-tests_with_pythonpath.patch -Patch10: %{name}-bdist_rpm.patch + Patch11: %{name}-installcompile.patch Patch13: %{name}-no-randomize-tests.patch @@ -483,14 +483,14 @@ Moduły testowe dla Pythona. %prep %setup -q -n Python-%{version} %patch0 -p1 -%patch1 -p1 + %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch7 -p1 + %patch9 -p1 -%patch10 -p1 + %patch11 -p1 %patch13 -p1 @@ -499,10 +499,6 @@ Moduły testowe dla Pythona. %{__rm} -r Modules/expat -for SUBDIR in darwin libffi_osx; do - %{__rm} -r Modules/_ctypes/$SUBDIR/* -done - %if "%{pld_release}" == "ac" files="md5module.c sha1module.c" files="$files sha256module.c sha512module.c" @@ -513,17 +509,16 @@ done sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \ Tools/gdb/libpython.py \ - Tools/pynche/pynche \ - Tools/pynche/pynche.pyw \ - Tools/scripts/2to3 sed -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \ Tools/scripts/idle3 \ + Tools/scripts/2to3 \ Tools/scripts/pydoc3 find . -name '*.py' | xargs -r grep -El '^#! */usr/bin/env python3?' | xargs %{__sed} -i -e '1s,^#! */usr/bin/env python3\?,#!/usr/bin/python3,' sed -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\1,' \ + Tools/build/regen-configure.sh \ Tools/c-analyzer/must-resolve.sh %build @@ -652,7 +647,7 @@ sed 's/=/ /' \ install -p Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver} # reindent python code -install -p Tools/scripts/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ver} +install -p Tools/patchcheck/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py_ver} # just to cut the noise, as they are not packaged (now) %{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib* @@ -734,7 +729,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/io.py %{py_libdir}/operator.py %{py_libdir}/posixpath.py -%{py_libdir}/re.py %{py_libdir}/reprlib.py %{py_libdir}/site.py %{py_libdir}/sre_*.py @@ -765,7 +759,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/io.cpython-*.py[co] %{py_libdir}/__pycache__/operator.cpython-*.py[co] %{py_libdir}/__pycache__/posixpath.cpython-*.py[co] -%{py_libdir}/__pycache__/re.cpython-*.py[co] %{py_libdir}/__pycache__/reprlib.cpython-*.py[co] %{py_libdir}/__pycache__/site.cpython-*.py[co] %{py_libdir}/__pycache__/sre_*.cpython-*.py[co] @@ -795,27 +788,25 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-modules* %{py_libdir}/__future__.py -%{py_libdir}/__phello__.foo.py +%{py_libdir}/__hello__.py %{py_libdir}/_aix_support.py -%{py_libdir}/_bootsubprocess.py %{py_libdir}/_compat_pickle.py %{py_libdir}/_compression.py %{py_libdir}/_markupbase.py %{py_libdir}/_osx_support.py %{py_libdir}/_pydecimal.py %{py_libdir}/_py_abc.py +%{py_libdir}/_pydatetime.py %{py_libdir}/_pyio.py +%{py_libdir}/_pylong.py %{py_libdir}/_strptime.py %{py_libdir}/_threading_local.py %{py_libdir}/aifc.py %{py_libdir}/antigravity.py %{py_libdir}/argparse.py %{py_libdir}/ast.py -%{py_libdir}/asynchat.py -%{py_libdir}/asyncore.py %{py_libdir}/base64.py %{py_libdir}/bdb.py -%{py_libdir}/binhex.py %{py_libdir}/bz2.py %{py_libdir}/cProfile.py %{py_libdir}/calendar.py @@ -854,7 +845,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/hmac.py %{py_libdir}/imaplib.py %{py_libdir}/imghdr.py -%{py_libdir}/imp.py %{py_libdir}/inspect.py %{py_libdir}/ipaddress.py %{py_libdir}/lzma.py @@ -896,7 +886,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/shlex.py %{py_libdir}/shutil.py %{py_libdir}/signal.py -%{py_libdir}/smtpd.py %{py_libdir}/smtplib.py %{py_libdir}/sndhdr.py %{py_libdir}/socket.py @@ -928,30 +917,27 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/webbrowser.py %{py_libdir}/xdrlib.py %{py_libdir}/zipapp.py -%{py_libdir}/zipfile.py %{py_libdir}/zipimport.py %{py_libdir}/__pycache__/__future__.cpython-*.py[co] -%{py_libdir}/__pycache__/__phello__.foo.cpython-*.py[co] +%{py_libdir}/__pycache__/__hello__.cpython-*.py[co] %{py_libdir}/__pycache__/_aix_support.cpython-*.py[co] -%{py_libdir}/__pycache__/_bootsubprocess.cpython-*.py[co] %{py_libdir}/__pycache__/_compat_pickle.cpython-*.py[co] %{py_libdir}/__pycache__/_compression.cpython-*.py[co] %{py_libdir}/__pycache__/_markupbase.cpython-*.py[co] %{py_libdir}/__pycache__/_osx_support.cpython-*.py[co] %{py_libdir}/__pycache__/_pydecimal.cpython-*.py[co] %{py_libdir}/__pycache__/_py_abc.cpython-*.py[co] +%{py_libdir}/__pycache__/_pydatetime.cpython-*.py[co] %{py_libdir}/__pycache__/_pyio.cpython-*.py[co] +%{py_libdir}/__pycache__/_pylong.cpython-*.py[co] %{py_libdir}/__pycache__/_strptime.cpython-*.py[co] %{py_libdir}/__pycache__/_threading_local.cpython-*.py[co] %{py_libdir}/__pycache__/aifc.cpython-*.py[co] %{py_libdir}/__pycache__/antigravity.cpython-*.py[co] %{py_libdir}/__pycache__/argparse.cpython-*.py[co] %{py_libdir}/__pycache__/ast.cpython-*.py[co] -%{py_libdir}/__pycache__/asynchat.cpython-*.py[co] -%{py_libdir}/__pycache__/asyncore.cpython-*.py[co] %{py_libdir}/__pycache__/base64.cpython-*.py[co] %{py_libdir}/__pycache__/bdb.cpython-*.py[co] -%{py_libdir}/__pycache__/binhex.cpython-*.py[co] %{py_libdir}/__pycache__/bz2.cpython-*.py[co] %{py_libdir}/__pycache__/cProfile.cpython-*.py[co] %{py_libdir}/__pycache__/calendar.cpython-*.py[co] @@ -990,7 +976,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/hmac.cpython-*.py[co] %{py_libdir}/__pycache__/imaplib.cpython-*.py[co] %{py_libdir}/__pycache__/imghdr.cpython-*.py[co] -%{py_libdir}/__pycache__/imp.cpython-*.py[co] %{py_libdir}/__pycache__/inspect.cpython-*.py[co] %{py_libdir}/__pycache__/ipaddress.cpython-*.py[co] %{py_libdir}/__pycache__/lzma.cpython-*.py[co] @@ -1032,7 +1017,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/shlex.cpython-*.py[co] %{py_libdir}/__pycache__/shutil.cpython-*.py[co] %{py_libdir}/__pycache__/signal.cpython-*.py[co] -%{py_libdir}/__pycache__/smtpd.cpython-*.py[co] %{py_libdir}/__pycache__/smtplib.cpython-*.py[co] %{py_libdir}/__pycache__/sndhdr.cpython-*.py[co] %{py_libdir}/__pycache__/socket.cpython-*.py[co] @@ -1064,7 +1048,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/webbrowser.cpython-*.py[co] %{py_libdir}/__pycache__/xdrlib.cpython-*.py[co] %{py_libdir}/__pycache__/zipapp.cpython-*.py[co] -%{py_libdir}/__pycache__/zipfile.cpython-*.py[co] %{py_libdir}/__pycache__/zipimport.cpython-*.py[co] # @@ -1109,6 +1092,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_queue.cpython-*.so %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha1.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_sha2.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha3.cpython-*.so %attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so @@ -1119,16 +1103,11 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_testinternalcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testsinglephase.cpython-*.so %attr(755,root,root) %{py_dyndir}/_uuid.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_xxinterpchannels.cpython-*.so %attr(755,root,root) %{py_dyndir}/_xxsubinterpreters.cpython-*.so %attr(755,root,root) %{py_dyndir}/_xxtestfuzz.cpython-*.so - -# for openssl < 0.9.8 package sha256 and sha512 modules -%if "%{pld_release}" != "ac" -%attr(755,root,root) %{py_dyndir}/_sha256.cpython-*.so -%attr(755,root,root) %{py_dyndir}/_sha512.cpython-*.so -%endif - %attr(755,root,root) %{py_dyndir}/array.cpython-*.so %attr(755,root,root) %{py_dyndir}/audioop.cpython-*.so %attr(755,root,root) %{py_dyndir}/binascii.cpython-*.so @@ -1147,8 +1126,11 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/termios.cpython-*.so %attr(755,root,root) %{py_dyndir}/spwd.cpython-*.so %attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so +%attr(755,root,root) %{py_dyndir}/xxsubtype.cpython-*.so %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so +%{py_libdir}/__phello__ + %dir %{py_libdir}/asyncio %{py_libdir}/asyncio/__pycache__ %{py_libdir}/asyncio/*.py @@ -1172,15 +1154,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/dbm/__pycache__ %{py_libdir}/dbm/*.py -%dir %{py_libdir}/distutils -%dir %{py_libdir}/distutils/command -%doc %{py_libdir}/distutils/README -%{py_libdir}/distutils/__pycache__ -%{py_libdir}/distutils/command/__pycache__ -%{py_libdir}/distutils/*.py -%{py_libdir}/distutils/command/*.py -%{py_libdir}/distutils/command/command_template - %dir %{py_libdir}/email %dir %{py_libdir}/email/mime %{py_libdir}/email/__pycache__ @@ -1210,6 +1183,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/importlib/metadata %{py_libdir}/importlib/metadata/__pycache__ %{py_libdir}/importlib/metadata/*.py +%{py_libdir}/importlib/resources %dir %{py_libdir}/json %{py_libdir}/json/__pycache__ @@ -1226,6 +1200,8 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/multiprocessing/dummy/__pycache__ %{py_libdir}/multiprocessing/dummy/*.py +%{py_libdir}/re +%{py_libdir}/tomllib %{py_libdir}/turtledemo %dir %{py_libdir}/unittest @@ -1271,6 +1247,8 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/xmlrpc/__pycache__ %{py_libdir}/xmlrpc/*.py +%{py_libdir}/zipfile + %attr(755,root,root) %{py_dyndir}/_sqlite3.cpython-*.so %dir %{py_libdir}/sqlite3 %{py_libdir}/sqlite3/__pycache__ @@ -1369,12 +1347,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %{py_libdir}/idlelib/idle_test %{py_libdir}/test -%{py_libdir}/ctypes/test -%{py_libdir}/distutils/tests -%{py_libdir}/lib2to3/tests -%{py_libdir}/sqlite3/test -%{py_libdir}/tkinter/test -%{py_libdir}/unittest/test %if %{with info} %files doc-info From e8c84e65b3c52b63638b64aafec39375f6f5b564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 21 Feb 2024 21:02:31 +0100 Subject: [PATCH 156/180] Up to 3.12.2 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 30e9891..503d98b 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.1 +Version: %{py_ver}.2 Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 50f827c800483776c8ef86e6a53831fa +# Source0-md5: e7c178b97bf8f7ccd677b94d614f7b3c Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch From d073fb40c26996aedc0c52fdea5af8b596e4f395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 25 Mar 2024 09:58:15 +0100 Subject: [PATCH 157/180] python points to python3 now --- python3.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python3.spec b/python3.spec index 503d98b..686f876 100644 --- a/python3.spec +++ b/python3.spec @@ -669,6 +669,9 @@ install -p Tools/patchcheck/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py %{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_platform}/pyconfig.h %{__sed} -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_platform}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h +# python points to python3 now +ln -s python3 $RPM_BUILD_ROOT%{_bindir}/python + %clean rm -rf $RPM_BUILD_ROOT @@ -687,6 +690,7 @@ rm -rf $RPM_BUILD_ROOT %if "%{py_ver}" != "%{py_abi}" %attr(755,root,root) %{_bindir}/python%{py_abi} %endif +%attr(755,root,root) %{_bindir}/python %attr(755,root,root) %{_bindir}/python3 %{_mandir}/man1/python3*.1* From 6f69083faf3557a3dce2a2986c9d1bfe574cb6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Go=C5=82=C4=99biowski?= Date: Wed, 15 May 2024 10:35:10 +0200 Subject: [PATCH 158/180] - strict expat dep due to: python3 -c "from pyexpat import *" Traceback (most recent call last): File "", line 1, in ImportError: /usr/lib64/python3.10/lib-dynload/pyexpat.cpython-310-x86_64-linux-gnu.so: undefined symbol: XML_SetReparseDeferralEnabled --- python3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python3.spec b/python3.spec index 686f876..bf73588 100644 --- a/python3.spec +++ b/python3.spec @@ -250,6 +250,7 @@ Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} %{?with_system_mpdecimal:Requires: mpdecimal >= 2.4.2-2} Obsoletes: python3-modules-sqlite < 1:3.1-2 +%requires_ge_to expat expat-devel %requires_ge_to openssl openssl-devel %description modules From 42fc8d7e8e493d18fdcf3d1a16ff1a325818977e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 30 Jul 2024 23:04:39 +0200 Subject: [PATCH 159/180] Up to 3.12.3 --- python3-tests_with_pythonpath.patch | 6 +++--- python3.spec | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index 796532d..4729c16 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -63,9 +63,9 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_cmd_line.py Python-3.9.2/L def test_no_args_respects_quiet_flag(self): script_helper.make_script(self.directory, 'baz', '') with self.temporary_pycache_prefix() as env: -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_pydoc.py Python-3.9.2/Lib/test/test_pydoc.py ---- Python-3.9.2.org/Lib/test/test_pydoc.py 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/Lib/test/test_pydoc.py 2021-02-25 18:41:41.098779547 +0100 +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_pydoc/test_pydoc.py Python-3.9.2/Lib/test/test_pydoc/test_pydoc.py +--- Python-3.9.2.org/Lib/test/test_pydoc/test_pydoc.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/test/test_pydoc/test_pydoc.py 2021-02-25 18:41:41.098779547 +0100 @@ -885,6 +885,7 @@ class PydocImportTest(PydocBaseTest): self.addCleanup(rmtree, TESTFN) importlib.invalidate_caches() diff --git a/python3.spec b/python3.spec index bf73588..3a75f7d 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.2 +Version: %{py_ver}.3 Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: e7c178b97bf8f7ccd677b94d614f7b3c +# Source0-md5: 8defb33f0c37aa4bdd3a38ba52abde4e Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch From d94da3928e19d2efdea83f6b3b2b3a7685e1c2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 13 Aug 2024 09:28:02 +0200 Subject: [PATCH 160/180] Up to 3.12.5 --- python3-no_cmdline_tests.patch | 9 ++++----- python3-tests_with_pythonpath.patch | 4 ++-- python3.spec | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/python3-no_cmdline_tests.patch b/python3-no_cmdline_tests.patch index f33f8fc..af46837 100644 --- a/python3-no_cmdline_tests.patch +++ b/python3-no_cmdline_tests.patch @@ -1,8 +1,7 @@ -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_compileall.py Python-3.9.2/Lib/test/test_compileall.py ---- Python-3.9.2.org/Lib/test/test_compileall.py 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/Lib/test/test_compileall.py 2021-02-25 18:40:29.876560976 +0100 -@@ -419,6 +419,7 @@ class EncodingTest(unittest.TestCase): - sys.stdout = orig_stdout +--- Python-3.12.5/Lib/test/test_compileall.py~ 2024-08-06 21:08:49.000000000 +0200 ++++ Python-3.12.5/Lib/test/test_compileall.py 2024-08-13 08:27:07.623262579 +0200 +@@ -498,6 +498,7 @@ class EncodingTest(unittest.TestCase): + self.assertNotIn('UnicodeEncodeError', res) +@unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled") diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index 4729c16..2492cae 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -93,8 +93,8 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/t def test_executable(self): """ Test that the sys.executable value is as expected. -@@ -641,6 +641,7 @@ class BasicTest(BaseTest): - self.assertFalse(line.endswith(b'\r\n'), error_message) +@@ -673,6 +673,7 @@ class BasicTest(BaseTest): + self.assertFalse(same_path(path1, path2)) @requireVenvCreate +@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") diff --git a/python3.spec b/python3.spec index 3a75f7d..7c2bba3 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.3 +Version: %{py_ver}.5 Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 8defb33f0c37aa4bdd3a38ba52abde4e +# Source0-md5: 02c7d269e077f4034963bba6befdc715 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch From 7f520304adc538fcfc4bccc8adaa2b6c40ba5f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 8 Sep 2024 01:49:19 +0200 Subject: [PATCH 161/180] Up to 13.12.6 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 7c2bba3..60412a0 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.5 +Version: %{py_ver}.6 Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 02c7d269e077f4034963bba6befdc715 +# Source0-md5: cb669514937d3e894e74081627722aa5 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch From 96d920f24b5bda781a6f3ba506f26b02c4fcc3a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 3 Oct 2024 08:06:51 +0200 Subject: [PATCH 162/180] Up to 3.12.7 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 60412a0..238edd0 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.6 +Version: %{py_ver}.7 Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: cb669514937d3e894e74081627722aa5 +# Source0-md5: c6c933c1a0db52597cb45a7910490f93 Source1: pyconfig.h.in Patch0: %{name}-pythonpath.patch From 02d39b3f1a50ccc938e616a52e64a481559e567c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 8 Oct 2024 13:12:11 +0200 Subject: [PATCH 163/180] Up to 3.13.0 --- python3-BLDLIBRARY.patch | 72 +++++++++--------- python3-installcompile.patch | 9 ++- python3-multilib.patch | 78 +++++++++---------- python3-no-randomize-tests.patch | 10 --- python3-pythonpath.patch | 12 --- python3.spec | 127 +++++++------------------------ 6 files changed, 107 insertions(+), 201 deletions(-) delete mode 100644 python3-no-randomize-tests.patch delete mode 100644 python3-pythonpath.patch diff --git a/python3-BLDLIBRARY.patch b/python3-BLDLIBRARY.patch index fcaecd9..81b054e 100644 --- a/python3-BLDLIBRARY.patch +++ b/python3-BLDLIBRARY.patch @@ -17,7 +17,7 @@ platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform -@@ -1056,7 +1056,7 @@ regen-re: $(BUILDPYTHON) +@@ -1433,7 +1433,7 @@ regen-re: $(BUILDPYTHON) $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/generate_re_casefix.py $(srcdir)/Lib/re/_casefix.py Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS) @@ -25,7 +25,7 @@ + $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) ############################################################################ - # "Bootstrap Python" used to run deepfreeze.py + # "Bootstrap Python" used to run Programs/_freeze_module.py --- Python-3.8.5/configure.ac.orig 2020-09-17 07:55:13.735226834 +0200 +++ Python-3.8.5/configure.ac 2020-09-17 10:46:44.172812084 +0200 @@ -1359,6 +1359,7 @@ AC_MSG_RESULT([$LIBRARY]) @@ -44,40 +44,40 @@ BLDLIBRARY='$(LDLIBRARY)' INSTSONAME='$(LDLIBRARY)' DLLLIBRARY='' -@@ -1156,7 +1158,8 @@ - ;; +@@ -1548,7 +1548,8 @@ if test $enable_shared = "yes"; then + ;; SunOS*) - LDLIBRARY='libpython$(LDVERSION).so' -- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.' -+ BLDLIBRARY='-lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - INSTSONAME="$LDLIBRARY".$SOVERSION - if test "$with_pydebug" != yes -@@ -1147,7 +1147,8 @@ if test $enable_shared = "yes"; then - ;; + LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.' ++ BLDLIBRARY='-lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + INSTSONAME="$LDLIBRARY".$SOVERSION + if test "$with_pydebug" != yes +@@ -1558,7 +1559,8 @@ if test $enable_shared = "yes"; then + ;; Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*) - LDLIBRARY='libpython$(LDVERSION).so' -- BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-L.' -+ BLDLIBRARY='-lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - INSTSONAME="$LDLIBRARY".$SOVERSION - if test "$with_pydebug" != yes -@@ -1183,12 +1187,14 @@ - LDLIBRARY='libpython$(LDVERSION).sl' - ;; - esac -- BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-Wl,+b,$(LIBDIR) -L.' -+ BLDLIBRARY='-lpython$(VERSION)' - RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} - ;; + LDLIBRARY='libpython$(LDVERSION).so' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-L.' ++ BLDLIBRARY='-lpython$(VERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + + # The Android Gradle plugin will only package libraries whose names end +@@ -1581,12 +1583,14 @@ if test $enable_shared = "yes"; then + LDLIBRARY='libpython$(LDVERSION).sl' + ;; + esac +- BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-Wl,+b,$(LIBDIR) -L.' ++ BLDLIBRARY='-lpython$(VERSION)' + RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} + ;; Darwin*) - LDLIBRARY='libpython$(LDVERSION).dylib' -- BLDLIBRARY='-L. -lpython$(LDVERSION)' -+ BLDLIBDIR='-L.' -+ BLDLIBRARY='-lpython$(LDVERSION)' - RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} - ;; - AIX*) + LDLIBRARY='libpython$(LDVERSION).dylib' +- BLDLIBRARY='-L. -lpython$(LDVERSION)' ++ BLDLIBDIR='-L.' ++ BLDLIBRARY='-lpython$(LDVERSION)' + RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} + ;; + iOS) diff --git a/python3-installcompile.patch b/python3-installcompile.patch index 1611ffb..a2f57bb 100644 --- a/python3-installcompile.patch +++ b/python3-installcompile.patch @@ -9,12 +9,13 @@ # Install shared libraries enabled by Setup DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED) -@@ -2316,6 +2316,8 @@ libinstall: all $(srcdir)/Modules/xxmodu - $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ - $(DESTDIR)$(LIBDEST); \ - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt +@@ -2576,6 +2576,8 @@ libinstall: all $(srcdir)/Modules/xxmodu + echo "Applying app store compliance patch"; \ + patch --force --reject-file "$(abs_builddir)/app-store-compliance.rej" --strip 2 --directory "$(DESTDIR)$(LIBDEST)" --input "$(abs_srcdir)/$(APP_STORE_COMPLIANCE_PATCH)" || true ; \ + fi +.PHONY: installcompile +installcompile: libainstall libinstall @ # Build PYC files for the 3 optimization levels (0, 1, 2) -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + diff --git a/python3-multilib.patch b/python3-multilib.patch index 2421088..2d1bc21 100644 --- a/python3-multilib.patch +++ b/python3-multilib.patch @@ -3,58 +3,58 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py +++ Python-3.9.2/Lib/site.py 2021-02-25 18:40:00.705652346 +0100 @@ -295,7 +295,7 @@ if sys.platform == 'darwin' and sys._framework: - return f'{userbase}/lib/python/site-packages' + return f'{userbase}/lib/{implementation_lower}/site-packages' -- return f'{userbase}/lib/python{version[0]}.{version[1]}/site-packages' -+ return f'{userbase}/{sys.platlibdir}/python{version[0]}.{version[1]}/site-packages' +- return f'{userbase}/lib/python{version[0]}.{version[1]}{abi_thread}/site-packages' ++ return f'{userbase}/{sys.platlibdir}/python{version[0]}.{version[1]}{abi_thread}/site-packages' def getuserbase(): -@@ -371,6 +371,8 @@ def getsitepackages(prefixes=None): - "python%d.%d" % sys.version_info[:2], +@@ -408,6 +408,8 @@ def getsitepackages(prefixes=None): + f"{implementation}{ver[0]}.{ver[1]}{abi_thread}", "site-packages") sitepackages.append(path) -+ sitepackages.append(os.path.join(prefix, sys.platlibdir, "site-python")) -+ sitepackages.append(os.path.join(prefix, "share", "python%d.%d" % sys.version_info[:2], "site-packages")) ++ sitepackages.append(os.path.join(prefix, sys.platlibdir, "site-python")) ++ sitepackages.append(os.path.join(prefix, "share", f"{implementation}{ver[0]}.{ver[1]}{abi_thread}", "site-packages")) else: sitepackages.append(prefix) sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) -diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py ---- Python-3.9.2.org/Lib/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 -+++ Python-3.9.2/Lib/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 -@@ -27,7 +27,7 @@ +diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig/__init__.py Python-3.9.2/Lib/sysconfig/__init__.py +--- Python-3.9.2.org/Lib/sysconfig/__init__.py 2021-02-19 13:31:44.000000000 +0100 ++++ Python-3.9.2/Lib/sysconfig/__init__.py 2021-02-25 18:40:00.705652346 +0100 +@@ -29,7 +29,7 @@ _INSTALL_SCHEMES = { 'posix_prefix': { - 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', - 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', -- 'purelib': '{base}/lib/python{py_version_short}/site-packages', -+ 'purelib': '{base}/share/python{py_version_short}/site-packages', - 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', + 'stdlib': '{installed_base}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}', + 'platstdlib': '{platbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}', +- 'purelib': '{base}/lib/{implementation_lower}{py_version_short}{abi_thread}/site-packages', ++ 'purelib': '{base}/share/{implementation_lower}{py_version_short}{abi_thread}/site-packages', + 'platlib': '{platbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}/site-packages', 'include': - '{installed_base}/include/python{py_version_short}{abiflags}', -@@ -37,10 +37,10 @@ _INSTALL_SCHEMES = { + '{installed_base}/include/{implementation_lower}{py_version_short}{abiflags}', +@@ -39,10 +39,10 @@ _INSTALL_SCHEMES = { 'data': '{base}', }, 'posix_home': { -- 'stdlib': '{installed_base}/lib/python', -- 'platstdlib': '{base}/lib/python', -- 'purelib': '{base}/lib/python', -- 'platlib': '{base}/lib/python', -+ 'stdlib': '{installed_base}/{platlibdir}/python', -+ 'platstdlib': '{base}/{platlibdir}/python', -+ 'purelib': '{base}/share/python', -+ 'platlib': '{base}/{platlibdir}/python', - 'include': '{installed_base}/include/python', - 'platinclude': '{installed_base}/include/python', +- 'stdlib': '{installed_base}/lib/{implementation_lower}', +- 'platstdlib': '{base}/lib/{implementation_lower}', +- 'purelib': '{base}/lib/{implementation_lower}', +- 'platlib': '{base}/lib/{implementation_lower}', ++ 'stdlib': '{installed_base}/{platlibdir}/{implementation_lower}', ++ 'platstdlib': '{base}/{platlibdir}/{implementation_lower}', ++ 'purelib': '{base}/share/{implementation_lower}', ++ 'platlib': '{base}/{platlibdir}/{implementation_lower}', + 'include': '{installed_base}/include/{implementation_lower}', + 'platinclude': '{installed_base}/include/{implementation_lower}', 'scripts': '{base}/bin', -@@ -100,8 +100,8 @@ if _HAS_USER_BASE: +@@ -150,8 +150,8 @@ if _HAS_USER_BASE: 'posix_user': { - 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', - 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', -- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', -- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', -+ 'purelib': '{userbase}/share/python{py_version_short}/site-packages', -+ 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', - 'include': '{userbase}/include/python{py_version_short}', + 'stdlib': '{userbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}', + 'platstdlib': '{userbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}', +- 'purelib': '{userbase}/lib/{implementation_lower}{py_version_short}{abi_thread}/site-packages', +- 'platlib': '{userbase}/lib/{implementation_lower}{py_version_short}{abi_thread}/site-packages', ++ 'purelib': '{userbase}/share/{implementation_lower}{py_version_short}{abi_thread}/site-packages', ++ 'platlib': '{userbase}/{platlibdir}/{implementation_lower}{py_version_short}{abi_thread}/site-packages', + 'include': '{userbase}/include/{implementation_lower}{py_version_short}{abi_thread}', 'scripts': '{userbase}/bin', 'data': '{userbase}', @@ -490,7 +490,11 @@ def get_config_h_filename(): @@ -86,7 +86,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon echo Skip install of $(LIBRARY) - use make frameworkinstall; \ --- Python-3.10.6/Lib/test/test_sysconfig.py.orig 2022-08-22 06:15:16.895139554 +0200 +++ Python-3.10.6/Lib/test/test_sysconfig.py 2022-08-22 06:18:57.331178879 +0200 -@@ -299,13 +299,13 @@ class TestSysConfig(unittest.TestCase): +@@ -414,13 +414,13 @@ class TestSysConfig(unittest.TestCase): expected = os.path.normpath(global_path.replace(base, user, 1)) # bpo-44860: platlib of posix_user doesn't use sys.platlibdir, # whereas posix_prefix does. @@ -94,8 +94,8 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/syscon + if name != 'platlib': # Replace "/lib64/python3.11/site-packages" suffix # with "/lib/python3.11/site-packages". - py_version_short = sysconfig.get_python_version() - suffix = f'python{py_version_short}/site-packages' + py_version_abi = sysconfig._get_python_version_abi() + suffix = f'python{py_version_abi}/site-packages' - expected = expected.replace(f'/{sys.platlibdir}/{suffix}', - f'/lib/{suffix}') + expected = expected.replace(f'/lib/{suffix}', diff --git a/python3-no-randomize-tests.patch b/python3-no-randomize-tests.patch deleted file mode 100644 index a3f2c0e..0000000 --- a/python3-no-randomize-tests.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- ./Tools/scripts/run_tests.py~ 2018-06-27 05:07:35.000000000 +0200 -+++ ./Tools/scripts/run_tests.py 2018-06-29 09:40:05.838625461 +0200 -@@ -31,7 +31,6 @@ def main(regrtest_args): - args.extend(test.support.args_from_interpreter_flags()) - - args.extend(['-m', 'test', # Run the test suite -- '-r', # Randomize test order - '-w', # Re-run failed tests in verbose mode - ]) - if sys.platform == 'win32': diff --git a/python3-pythonpath.patch b/python3-pythonpath.patch deleted file mode 100644 index d2bd080..0000000 --- a/python3-pythonpath.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- Python-3.0.1/Lib/cgi.py.wiget 2008-12-04 21:11:57.000000000 +0100 -+++ Python-3.0.1/Lib/cgi.py 2009-03-14 18:12:32.000000000 +0100 -@@ -1,6 +1,6 @@ --#! /usr/local/bin/python -+#! /usr/bin/python3 - --# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is -+# NOTE: the above "/usr/bin/python3" is NOT a mistake. It is - # intentionally NOT "/usr/bin/env python". On many systems - # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI - # scripts, and /usr/local/bin is the default directory where Python is - diff --git a/python3.spec b/python3.spec index 238edd0..e942d9d 100644 --- a/python3.spec +++ b/python3.spec @@ -9,9 +9,9 @@ %bcond_without optimizations # expensive, stable optimizations (PGO etc.) + LTO # # tests which will not work on 64-bit platforms -%define no64bit_tests -x test_audioop -x test_rgbimg -x test_imageop +%define no64bit_tests -x test_rgbimg -x test_imageop # tests which may fail because of builder environment limitations (no /proc or /dev/pts) -%define nobuilder_tests -u-network -x test_resource -x test_openpty -x test_socket -x test_nis -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization +%define nobuilder_tests -u-network -x test_resource -x test_openpty -x test_socket -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization # tests which fail because of some unknown/unresolved reason (this list should be %%{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... @@ -21,7 +21,7 @@ %define broken_tests_x32 -x test_time %undefine with_optimizations %endif -%define broken_tests -x test_embed -x test_nntplib -x test_gdb -x test_site -x test_ssl %{?broken_tests_x32} +%define broken_tests -x test_embed -x test_gdb -x test_site -x test_ssl %{?broken_tests_x32} %ifarch armv6hl armv7hl armv7hnl %define _python_target_abi %{?_gnu}hf @@ -29,7 +29,7 @@ %define _python_target_abi %{?_gnu} %endif -%define py_ver 3.12 +%define py_ver 3.13 %define py_abi %{py_ver} %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_python_target_abi} %define py_prefix %{_prefix} @@ -47,15 +47,14 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.7 +Version: %{py_ver}.0 Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: c6c933c1a0db52597cb45a7910490f93 +# Source0-md5: 726e5b829fcf352326874c1ae599abaa Source1: pyconfig.h.in -Patch0: %{name}-pythonpath.patch Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch @@ -66,7 +65,6 @@ Patch9: %{name}-tests_with_pythonpath.patch Patch11: %{name}-installcompile.patch -Patch13: %{name}-no-randomize-tests.patch Patch14: python3-profile-tests.patch Patch15: python3-tests.patch URL: https://www.python.org/ @@ -361,30 +359,6 @@ Python development tools such as profilers and debugger. Narzędzia programistyczne języka Python takie jak profiler oraz debugger. -%package 2to3 -Summary: Automated Python 2 to 3 code translation -Summary(pl.UTF-8): Automatyczne tłumaczenie kodu Pythona 2 do 3 -Group: Development/Languages/Python - -%description 2to3 -2to3 is a Python program that reads Python 2.x source code and applies -a series of fixers to transform it into valid Python 3.x code. The -standard library contains a rich set of fixers that will handle almost -all code. 2to3 supporting library lib2to3 is, however, a flexible and -generic library, so it is possible to write your own fixers for 2to3. -lib2to3 could also be adapted to custom applications in which Python -code needs to be edited automatically. - -%description 2to3 -l pl.UTF-8 -2to3 to program w Pythonie czytający od źródłowy w Pythonie 2.x i -aplikujący serię poprawek przekształcających go w poprawny kod w -Pythonie 3.x. Biblioteka standardowa zawiera duży zbiór poprawek -obsługujących większość kodu. Biblioteka wspierająca 2to3 (lib2to3) -jest jednak elastyczną i ogólną biblioteką, więc można pisać własne -poprawki dla 2to3. lib2to3 można także zaadaptować na potrzeby -własnych zastosowań, w których kod w Pythonie musi być modyfikowany -automatycznie. - %package static Summary: Static python library Summary(pl.UTF-8): Statyczna biblioteka Pythona @@ -483,7 +457,6 @@ Moduły testowe dla Pythona. %prep %setup -q -n Python-%{version} -%patch0 -p1 %patch2 -p1 %patch3 -p1 @@ -494,7 +467,6 @@ Moduły testowe dla Pythona. %patch11 -p1 -%patch13 -p1 %patch14 -p1 %patch15 -p1 @@ -513,7 +485,6 @@ sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' -e '1s,#!\s sed -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \ Tools/scripts/idle3 \ - Tools/scripts/2to3 \ Tools/scripts/pydoc3 find . -name '*.py' | xargs -r grep -El '^#! */usr/bin/env python3?' | xargs %{__sed} -i -e '1s,^#! */usr/bin/env python3\?,#!/usr/bin/python3,' @@ -551,7 +522,6 @@ export SETUPTOOLS_USE_DISTUTILS=stdlib %{?with_debug:--with-pydebug} \ --with-ssl-default-suites=openssl \ --with-system-expat \ - --with-system-ffi \ %{?with_system_mpdecimal:--with-system-libmpdec} \ %if %{with optimizations} --enable-optimizations \ @@ -657,9 +627,6 @@ install -p Tools/patchcheck/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html %{__rm} $RPM_BUILD_ROOT%{py_libdir}/site-packages/README.txt -# currently provided by python-2to3, consider switching to this one -%{__rm} $RPM_BUILD_ROOT%{_bindir}/2to3 - # that seems to be only an empty extension template, # which seems to be built only {with tests} %{__rm} $RPM_BUILD_ROOT%{py_dyndir}/xxlimited*.*.so @@ -738,7 +705,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/site.py %{py_libdir}/sre_*.py %{py_libdir}/stat.py -%{py_libdir}/sysconfig.py %{py_libdir}/token.py %{py_libdir}/tokenize.py %{py_libdir}/traceback.py @@ -768,7 +734,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/site.cpython-*.py[co] %{py_libdir}/__pycache__/sre_*.cpython-*.py[co] %{py_libdir}/__pycache__/stat.cpython-*.py[co] -%{py_libdir}/__pycache__/sysconfig.cpython-*.py[co] %{py_libdir}/__pycache__/token.cpython-*.py[co] %{py_libdir}/__pycache__/tokenize.cpython-*.py[co] %{py_libdir}/__pycache__/traceback.cpython-*.py[co] @@ -776,12 +741,10 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/os.cpython-*.py[co] %{py_libdir}/__pycache__/types.cpython-*.py[co] +# main modules needed by core python %{py_libdir}/collections - -# encodings required by python library -%dir %{py_libdir}/encodings -%{py_libdir}/encodings/__pycache__ -%{py_libdir}/encodings/*.py +%{py_libdir}/encodings +%{py_libdir}/sysconfig %dir %{py_libdir}/config-%{py_platform} %{py_libdir}/config-%{py_platform}/Makefile @@ -795,9 +758,13 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__future__.py %{py_libdir}/__hello__.py %{py_libdir}/_aix_support.py +%{py_libdir}/_android_support.py +%{py_libdir}/_colorize.py %{py_libdir}/_compat_pickle.py %{py_libdir}/_compression.py +%{py_libdir}/_ios_support.py %{py_libdir}/_markupbase.py +%{py_libdir}/_opcode_metadata.py %{py_libdir}/_osx_support.py %{py_libdir}/_pydecimal.py %{py_libdir}/_py_abc.py @@ -806,7 +773,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/_pylong.py %{py_libdir}/_strptime.py %{py_libdir}/_threading_local.py -%{py_libdir}/aifc.py %{py_libdir}/antigravity.py %{py_libdir}/argparse.py %{py_libdir}/ast.py @@ -815,9 +781,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/bz2.py %{py_libdir}/cProfile.py %{py_libdir}/calendar.py -%{py_libdir}/cgi.py -%{py_libdir}/cgitb.py -%{py_libdir}/chunk.py %{py_libdir}/cmd.py %{py_libdir}/code.py %{py_libdir}/codeop.py @@ -827,7 +790,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/contextlib.py %{py_libdir}/contextvars.py %{py_libdir}/copy.py -%{py_libdir}/crypt.py %{py_libdir}/csv.py %{py_libdir}/dataclasses.py %{py_libdir}/datetime.py @@ -849,26 +811,21 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/hashlib.py %{py_libdir}/hmac.py %{py_libdir}/imaplib.py -%{py_libdir}/imghdr.py %{py_libdir}/inspect.py %{py_libdir}/ipaddress.py %{py_libdir}/lzma.py %{py_libdir}/mailbox.py -%{py_libdir}/mailcap.py %{py_libdir}/mimetypes.py %{py_libdir}/modulefinder.py %{py_libdir}/netrc.py -%{py_libdir}/nntplib.py %{py_libdir}/ntpath.py %{py_libdir}/nturl2path.py %{py_libdir}/numbers.py %{py_libdir}/opcode.py %{py_libdir}/optparse.py -%{py_libdir}/pathlib.py %{py_libdir}/pdb.py %{py_libdir}/pickle.py %{py_libdir}/pickletools.py -%{py_libdir}/pipes.py %{py_libdir}/pkgutil.py %{py_libdir}/platform.py %{py_libdir}/plistlib.py @@ -892,7 +849,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/shutil.py %{py_libdir}/signal.py %{py_libdir}/smtplib.py -%{py_libdir}/sndhdr.py %{py_libdir}/socket.py %{py_libdir}/socketserver.py %{py_libdir}/ssl.py @@ -901,11 +857,9 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/stringprep.py %{py_libdir}/struct.py %{py_libdir}/subprocess.py -%{py_libdir}/sunau.py %{py_libdir}/symtable.py %{py_libdir}/tabnanny.py %{py_libdir}/tarfile.py -%{py_libdir}/telnetlib.py %{py_libdir}/tempfile.py %{py_libdir}/textwrap.py %{py_libdir}/this.py @@ -915,20 +869,22 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/tty.py %{py_libdir}/turtle.py %{py_libdir}/typing.py -%{py_libdir}/uu.py %{py_libdir}/uuid.py %{py_libdir}/warnings.py %{py_libdir}/wave.py %{py_libdir}/webbrowser.py -%{py_libdir}/xdrlib.py %{py_libdir}/zipapp.py %{py_libdir}/zipimport.py %{py_libdir}/__pycache__/__future__.cpython-*.py[co] %{py_libdir}/__pycache__/__hello__.cpython-*.py[co] %{py_libdir}/__pycache__/_aix_support.cpython-*.py[co] +%{py_libdir}/__pycache__/_android_support.cpython-*.py[co] +%{py_libdir}/__pycache__/_colorize.cpython-*.py[co] %{py_libdir}/__pycache__/_compat_pickle.cpython-*.py[co] %{py_libdir}/__pycache__/_compression.cpython-*.py[co] +%{py_libdir}/__pycache__/_ios_support.cpython-*.py[co] %{py_libdir}/__pycache__/_markupbase.cpython-*.py[co] +%{py_libdir}/__pycache__/_opcode_metadata.cpython-*.py[co] %{py_libdir}/__pycache__/_osx_support.cpython-*.py[co] %{py_libdir}/__pycache__/_pydecimal.cpython-*.py[co] %{py_libdir}/__pycache__/_py_abc.cpython-*.py[co] @@ -937,7 +893,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/_pylong.cpython-*.py[co] %{py_libdir}/__pycache__/_strptime.cpython-*.py[co] %{py_libdir}/__pycache__/_threading_local.cpython-*.py[co] -%{py_libdir}/__pycache__/aifc.cpython-*.py[co] %{py_libdir}/__pycache__/antigravity.cpython-*.py[co] %{py_libdir}/__pycache__/argparse.cpython-*.py[co] %{py_libdir}/__pycache__/ast.cpython-*.py[co] @@ -946,9 +901,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/bz2.cpython-*.py[co] %{py_libdir}/__pycache__/cProfile.cpython-*.py[co] %{py_libdir}/__pycache__/calendar.cpython-*.py[co] -%{py_libdir}/__pycache__/cgi.cpython-*.py[co] -%{py_libdir}/__pycache__/cgitb.cpython-*.py[co] -%{py_libdir}/__pycache__/chunk.cpython-*.py[co] %{py_libdir}/__pycache__/cmd.cpython-*.py[co] %{py_libdir}/__pycache__/code.cpython-*.py[co] %{py_libdir}/__pycache__/codeop.cpython-*.py[co] @@ -958,7 +910,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/contextlib.cpython-*.py[co] %{py_libdir}/__pycache__/contextvars.cpython-*.py[co] %{py_libdir}/__pycache__/copy.cpython-*.py[co] -%{py_libdir}/__pycache__/crypt.cpython-*.py[co] %{py_libdir}/__pycache__/csv.cpython-*.py[co] %{py_libdir}/__pycache__/dataclasses.cpython-*.py[co] %{py_libdir}/__pycache__/datetime.cpython-*.py[co] @@ -980,26 +931,21 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/hashlib.cpython-*.py[co] %{py_libdir}/__pycache__/hmac.cpython-*.py[co] %{py_libdir}/__pycache__/imaplib.cpython-*.py[co] -%{py_libdir}/__pycache__/imghdr.cpython-*.py[co] %{py_libdir}/__pycache__/inspect.cpython-*.py[co] %{py_libdir}/__pycache__/ipaddress.cpython-*.py[co] %{py_libdir}/__pycache__/lzma.cpython-*.py[co] %{py_libdir}/__pycache__/mailbox.cpython-*.py[co] -%{py_libdir}/__pycache__/mailcap.cpython-*.py[co] %{py_libdir}/__pycache__/mimetypes.cpython-*.py[co] %{py_libdir}/__pycache__/modulefinder.cpython-*.py[co] %{py_libdir}/__pycache__/netrc.cpython-*.py[co] -%{py_libdir}/__pycache__/nntplib.cpython-*.py[co] %{py_libdir}/__pycache__/ntpath.cpython-*.py[co] %{py_libdir}/__pycache__/nturl2path.cpython-*.py[co] %{py_libdir}/__pycache__/numbers.cpython-*.py[co] %{py_libdir}/__pycache__/opcode.cpython-*.py[co] %{py_libdir}/__pycache__/optparse.cpython-*.py[co] -%{py_libdir}/__pycache__/pathlib.cpython-*.py[co] %{py_libdir}/__pycache__/pdb.cpython-*.py[co] %{py_libdir}/__pycache__/pickle.cpython-*.py[co] %{py_libdir}/__pycache__/pickletools.cpython-*.py[co] -%{py_libdir}/__pycache__/pipes.cpython-*.py[co] %{py_libdir}/__pycache__/pkgutil.cpython-*.py[co] %{py_libdir}/__pycache__/platform.cpython-*.py[co] %{py_libdir}/__pycache__/plistlib.cpython-*.py[co] @@ -1023,7 +969,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/shutil.cpython-*.py[co] %{py_libdir}/__pycache__/signal.cpython-*.py[co] %{py_libdir}/__pycache__/smtplib.cpython-*.py[co] -%{py_libdir}/__pycache__/sndhdr.cpython-*.py[co] %{py_libdir}/__pycache__/socket.cpython-*.py[co] %{py_libdir}/__pycache__/socketserver.cpython-*.py[co] %{py_libdir}/__pycache__/ssl.cpython-*.py[co] @@ -1032,11 +977,9 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/stringprep.cpython-*.py[co] %{py_libdir}/__pycache__/struct.cpython-*.py[co] %{py_libdir}/__pycache__/subprocess.cpython-*.py[co] -%{py_libdir}/__pycache__/sunau.cpython-*.py[co] %{py_libdir}/__pycache__/symtable.cpython-*.py[co] %{py_libdir}/__pycache__/tabnanny.cpython-*.py[co] %{py_libdir}/__pycache__/tarfile.cpython-*.py[co] -%{py_libdir}/__pycache__/telnetlib.cpython-*.py[co] %{py_libdir}/__pycache__/tempfile.cpython-*.py[co] %{py_libdir}/__pycache__/textwrap.cpython-*.py[co] %{py_libdir}/__pycache__/this.cpython-*.py[co] @@ -1046,12 +989,10 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/tty.cpython-*.py[co] %{py_libdir}/__pycache__/turtle.cpython-*.py[co] %{py_libdir}/__pycache__/typing.cpython-*.py[co] -%{py_libdir}/__pycache__/uu.cpython-*.py[co] %{py_libdir}/__pycache__/uuid.cpython-*.py[co] %{py_libdir}/__pycache__/warnings.cpython-*.py[co] %{py_libdir}/__pycache__/wave.cpython-*.py[co] %{py_libdir}/__pycache__/webbrowser.cpython-*.py[co] -%{py_libdir}/__pycache__/xdrlib.cpython-*.py[co] %{py_libdir}/__pycache__/zipapp.cpython-*.py[co] %{py_libdir}/__pycache__/zipimport.cpython-*.py[co] @@ -1070,7 +1011,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_codecs_kr.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_tw.cpython-*.so %attr(755,root,root) %{py_dyndir}/_contextvars.cpython-*.so -%attr(755,root,root) %{py_dyndir}/_crypt.cpython-*.so %attr(755,root,root) %{py_dyndir}/_csv.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ctypes*.cpython-*.so %attr(755,root,root) %{py_dyndir}/_curses_panel.cpython-*.so @@ -1084,6 +1024,9 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_gdbm.cpython-*.so %attr(755,root,root) %{py_dyndir}/_hashlib.cpython-*.so %attr(755,root,root) %{py_dyndir}/_heapq.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_interpchannels.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_interpqueues.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_interpreters.cpython-*.so %attr(755,root,root) %{py_dyndir}/_json.cpython-*.so %attr(755,root,root) %{py_dyndir}/_lsprof.cpython-*.so %attr(755,root,root) %{py_dyndir}/_lzma.cpython-*.so @@ -1105,35 +1048,33 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_testbuffer.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testclinic.cpython-*.so -%attr(755,root,root) %{py_dyndir}/_testinternalcapi.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testclinic_limited.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testexternalinspection.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testinternalcapi.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_testlimitedcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testmultiphase.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testsinglephase.cpython-*.so %attr(755,root,root) %{py_dyndir}/_uuid.cpython-*.so -%attr(755,root,root) %{py_dyndir}/_xxinterpchannels.cpython-*.so -%attr(755,root,root) %{py_dyndir}/_xxsubinterpreters.cpython-*.so %attr(755,root,root) %{py_dyndir}/_xxtestfuzz.cpython-*.so %attr(755,root,root) %{py_dyndir}/array.cpython-*.so -%attr(755,root,root) %{py_dyndir}/audioop.cpython-*.so %attr(755,root,root) %{py_dyndir}/binascii.cpython-*.so %attr(755,root,root) %{py_dyndir}/cmath.cpython-*.so %attr(755,root,root) %{py_dyndir}/fcntl.cpython-*.so %attr(755,root,root) %{py_dyndir}/grp.cpython-*.so %attr(755,root,root) %{py_dyndir}/math.cpython-*.so %attr(755,root,root) %{py_dyndir}/mmap.cpython-*.so -%attr(755,root,root) %{py_dyndir}/nis.cpython-*.so -%attr(755,root,root) %{py_dyndir}/ossaudiodev.cpython-*.so %attr(755,root,root) %{py_dyndir}/pyexpat.cpython-*.so %attr(755,root,root) %{py_dyndir}/readline.cpython-*.so %attr(755,root,root) %{py_dyndir}/resource.cpython-*.so %attr(755,root,root) %{py_dyndir}/select.cpython-*.so %attr(755,root,root) %{py_dyndir}/syslog.cpython-*.so %attr(755,root,root) %{py_dyndir}/termios.cpython-*.so -%attr(755,root,root) %{py_dyndir}/spwd.cpython-*.so %attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so %attr(755,root,root) %{py_dyndir}/xxsubtype.cpython-*.so %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so +%{py_libdir}/_pyrepl %{py_libdir}/__phello__ %dir %{py_libdir}/asyncio @@ -1205,6 +1146,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/multiprocessing/dummy/__pycache__ %{py_libdir}/multiprocessing/dummy/*.py +%{py_libdir}/pathlib %{py_libdir}/re %{py_libdir}/tomllib %{py_libdir}/turtledemo @@ -1224,9 +1166,9 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/venv/scripts/common %{py_libdir}/venv/scripts/common/Activate.ps1 %{py_libdir}/venv/scripts/common/activate +%{py_libdir}/venv/scripts/common/activate.fish %dir %{py_libdir}/venv/scripts/posix %{py_libdir}/venv/scripts/posix/activate.csh -%{py_libdir}/venv/scripts/posix/activate.fish %dir %{py_libdir}/wsgiref %{py_libdir}/wsgiref/__pycache__ @@ -1325,21 +1267,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/timeit.py %{py_libdir}/__pycache__/timeit.cpython-*.py[co] -%files 2to3 -%defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/2to3-%{py_ver} -%dir %{py_libdir}/lib2to3 -%{py_libdir}/lib2to3/__pycache__ -%{py_libdir}/lib2to3/*.txt -%{py_libdir}/lib2to3/*.pickle -%{py_libdir}/lib2to3/*.py -%dir %{py_libdir}/lib2to3/fixes -%{py_libdir}/lib2to3/fixes/__pycache__ -%{py_libdir}/lib2to3/fixes/*.py -%dir %{py_libdir}/lib2to3/pgen2 -%{py_libdir}/lib2to3/pgen2/__pycache__ -%{py_libdir}/lib2to3/pgen2/*.py - %files static %defattr(644,root,root,755) %{_libdir}/libpython%{py_abi}.a From 1f4ac8845b9d038ef5d24eabacd9c750913e0ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 8 Oct 2024 15:15:11 +0200 Subject: [PATCH 164/180] Run tests verbose; fix part of test_site test --- python3-tests.patch | 20 +++++++++++++++++++- python3.spec | 6 ++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/python3-tests.patch b/python3-tests.patch index 6695810..dff75eb 100644 --- a/python3-tests.patch +++ b/python3-tests.patch @@ -19,4 +19,22 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_imaplib.py Python-3.9.2/Li self.assertIn(cm.exception.errno, expected_errnos) - +--- a/Lib/test/test_site.py 2024-10-07 07:02:14.000000000 +0200 ++++ b/Lib/test/test_site.py.new 2024-10-08 14:14:57.416459147 +0200 +@@ -326,14 +326,14 @@ class HelperFunctionsTests(unittest.Test + if os.sep == '/': + # OS X, Linux, FreeBSD, etc + if sys.platlibdir != "lib": +- self.assertEqual(len(dirs), 2) ++ self.assertEqual(len(dirs), 6) + wanted = os.path.join('xoxo', sys.platlibdir, + f'python{sysconfig._get_python_version_abi()}', + 'site-packages') + self.assertEqual(dirs[0], wanted) + else: + self.assertEqual(len(dirs), 1) +- wanted = os.path.join('xoxo', 'lib', ++ wanted = os.path.join('xoxo', 'share', + f'python{sysconfig._get_python_version_abi()}', + 'site-packages') + self.assertEqual(dirs[-1], wanted) diff --git a/python3.spec b/python3.spec index e942d9d..71b2d7f 100644 --- a/python3.spec +++ b/python3.spec @@ -549,8 +549,10 @@ END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }' LC_ALL=C.UTF-8 export LC_ALL %if %{with tests} -WITHIN_PYTHON_RPM_BUILD=1 %{__make} test \ - TESTOPTS="%{test_flags} %{test_list}" +WITHIN_PYTHON_RPM_BUILD=1 \ +EXTRATESTOPTS="-v" \ + %{__make} test \ + TESTOPTS="%{test_flags} %{test_list}" %endif %if %{with info} From 8e8685183304714e890b0fca60c5cce72d7225d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 10 Oct 2024 10:44:34 +0200 Subject: [PATCH 165/180] Don't rebuild things for tests --- python3.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python3.spec b/python3.spec index 71b2d7f..c144bdb 100644 --- a/python3.spec +++ b/python3.spec @@ -549,10 +549,13 @@ END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }' LC_ALL=C.UTF-8 export LC_ALL %if %{with tests} +cp -a Makefile Makefile.org +sed -i -e 's#^test: all.*#test:#g' Makefile WITHIN_PYTHON_RPM_BUILD=1 \ EXTRATESTOPTS="-v" \ %{__make} test \ TESTOPTS="%{test_flags} %{test_list}" +cp -a Makefile.org Makefile %endif %if %{with info} From cd072efc98f5eea0a28256984b5b65e5e41ff6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Sun, 2 Mar 2025 01:07:57 +0100 Subject: [PATCH 166/180] - use patch -P --- python3.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/python3.spec b/python3.spec index c144bdb..8a6e260 100644 --- a/python3.spec +++ b/python3.spec @@ -458,17 +458,17 @@ Moduły testowe dla Pythona. %prep %setup -q -n Python-%{version} -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +%patch -P 2 -p1 +%patch -P 3 -p1 +%patch -P 4 -p1 +%patch -P 5 -p1 -%patch9 -p1 +%patch -P 9 -p1 -%patch11 -p1 +%patch -P 11 -p1 -%patch14 -p1 -%patch15 -p1 +%patch -P 14 -p1 +%patch -P 15 -p1 %{__rm} -r Modules/expat From 4dcc0060498f643c96260ed79330c93fa70eff48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Sat, 8 Mar 2025 15:00:13 +0100 Subject: [PATCH 167/180] - up to 3.13.2 --- python3-tests_with_pythonpath.patch | 2 +- python3.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index 2492cae..c79f15a 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -94,7 +94,7 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/t """ Test that the sys.executable value is as expected. @@ -673,6 +673,7 @@ class BasicTest(BaseTest): - self.assertFalse(same_path(path1, path2)) + @requireVenvCreate +@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") diff --git a/python3.spec b/python3.spec index 8a6e260..8de330c 100644 --- a/python3.spec +++ b/python3.spec @@ -47,13 +47,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.0 +Version: %{py_ver}.2 Release: 0.1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 726e5b829fcf352326874c1ae599abaa +# Source0-md5: 4c2d9202ab4db02c9d0999b14655dfe5 Source1: pyconfig.h.in Patch2: %{name}-multilib.patch @@ -754,7 +754,9 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/config-%{py_platform} %{py_libdir}/config-%{py_platform}/Makefile %{py_libdir}/config-%{py_platform}/Setup +%{py_libdir}/config-%{py_platform}/Setup.bootstrap %{py_libdir}/config-%{py_platform}/Setup.local +%{py_libdir}/config-%{py_platform}/Setup.stdlib %{py_libdir}/config-%{py_platform}/pyconfig.h %files modules @@ -764,6 +766,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__hello__.py %{py_libdir}/_aix_support.py %{py_libdir}/_android_support.py +%{py_libdir}/_apple_support.py %{py_libdir}/_colorize.py %{py_libdir}/_compat_pickle.py %{py_libdir}/_compression.py @@ -884,6 +887,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/__hello__.cpython-*.py[co] %{py_libdir}/__pycache__/_aix_support.cpython-*.py[co] %{py_libdir}/__pycache__/_android_support.cpython-*.py[co] +%{py_libdir}/__pycache__/_apple_support.cpython-*.py[co] %{py_libdir}/__pycache__/_colorize.cpython-*.py[co] %{py_libdir}/__pycache__/_compat_pickle.cpython-*.py[co] %{py_libdir}/__pycache__/_compression.cpython-*.py[co] From 2d046ced62d15beb99141e7234cf98b52f02c3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20R=C4=99korajski?= Date: Sun, 9 Mar 2025 20:59:51 +0100 Subject: [PATCH 168/180] - rel 1 --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 8de330c..34a3ad7 100644 --- a/python3.spec +++ b/python3.spec @@ -48,7 +48,7 @@ Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 Version: %{py_ver}.2 -Release: 0.1 +Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python From 5d0dd6109cc62f35c953052f26b0d8e59cef30d1 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 13 Mar 2025 20:11:05 +0100 Subject: [PATCH 169/180] - install gdb script with python3 shebang, added default_python bcond --- python3.spec | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/python3.spec b/python3.spec index 34a3ad7..484666c 100644 --- a/python3.spec +++ b/python3.spec @@ -1,6 +1,7 @@ # NOTE: tests require processes limit >128 (256 is sufficient) # # Conditional build: +%bcond_without default_python # build as default system Python %bcond_with info # info pages (requires emacs) %bcond_without system_mpdecimal # system libmpdec library %bcond_without tkinter # disables tkinter module building @@ -104,6 +105,9 @@ BuildRequires: xz-devel BuildRequires: zlib-devel Requires: %{name}-libs = %{epoch}:%{version}-%{release} Suggests: pip +%if %{with default_python} +Conflicts: python < 1:2.7.18-10 +%endif BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define specflags_ppc -D__ppc__=1 @@ -480,8 +484,8 @@ for f in $files; do done %endif -sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \ - Tools/gdb/libpython.py \ +sed -i -e '1s,/usr/bin/python$,%{__python3},' \ + Tools/gdb/libpython.py sed -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \ Tools/scripts/idle3 \ @@ -588,7 +592,7 @@ ln -s libpython%{py_abi}.so $RPM_BUILD_ROOT%{_libdir}/libpython3.so # gdb helper that will end up in -debuginfo package soname=$(ls -1d $RPM_BUILD_ROOT%{_libdir}/libpython%{py_abi}.so.*.* | sed -e "s#^$RPM_BUILD_ROOT##g") -cp -a Tools/gdb/libpython.py "$RPM_BUILD_ROOT%{_prefix}/lib/debug/$soname-gdb.py" +cp -a Tools/gdb/libpython.py "$RPM_BUILD_ROOT%{_prefix}/lib/debug/${soname}-gdb.py" # # create several useful aliases, such as timeit.py, profile.py, pdb.py, smtpd.py @@ -642,8 +646,11 @@ install -p Tools/patchcheck/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py %{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_platform}/pyconfig.h %{__sed} -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_platform}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h +%if %{with default_python} # python points to python3 now ln -s python3 $RPM_BUILD_ROOT%{_bindir}/python +echo '.so python3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/python.1 +%endif %clean rm -rf $RPM_BUILD_ROOT @@ -663,9 +670,12 @@ rm -rf $RPM_BUILD_ROOT %if "%{py_ver}" != "%{py_abi}" %attr(755,root,root) %{_bindir}/python%{py_abi} %endif -%attr(755,root,root) %{_bindir}/python %attr(755,root,root) %{_bindir}/python3 %{_mandir}/man1/python3*.1* +%if %{with default_python} +%attr(755,root,root) %{_bindir}/python +%{_mandir}/man1/python.1* +%endif %files libs %defattr(644,root,root,755) From 95ca99689edd3324a9d17297626340b49004af29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Mon, 17 Mar 2025 21:44:40 +0100 Subject: [PATCH 170/180] Move few libs to main package (it will work without modules now but pyrepl won't be available) --- python3.spec | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/python3.spec b/python3.spec index 484666c..07fde45 100644 --- a/python3.spec +++ b/python3.spec @@ -698,6 +698,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_struct.cpython-*.so # modules required by python library +%{py_libdir}/__future__.py %{py_libdir}/_collections_abc.py %{py_libdir}/_sitebuiltins.py %{py_libdir}/_sysconfigdata_*.py @@ -727,6 +728,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/os.py # needed by the dynamic sys.lib patch %{py_libdir}/types.py +%{py_libdir}/__pycache__/__future__.cpython-*.py[co] %{py_libdir}/__pycache__/_sitebuiltins.cpython-*.py[co] %{py_libdir}/__pycache__/_sysconfigdata_*.cpython-*.py[co] %{py_libdir}/__pycache__/_weakrefset.cpython-*.py[co] @@ -757,8 +759,10 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/types.cpython-*.py[co] # main modules needed by core python +%{py_libdir}/_pyrepl %{py_libdir}/collections %{py_libdir}/encodings +%{py_libdir}/importlib %{py_libdir}/sysconfig %dir %{py_libdir}/config-%{py_platform} @@ -772,7 +776,6 @@ rm -rf $RPM_BUILD_ROOT %files modules %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-modules* -%{py_libdir}/__future__.py %{py_libdir}/__hello__.py %{py_libdir}/_aix_support.py %{py_libdir}/_android_support.py @@ -1093,7 +1096,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/xxsubtype.cpython-*.so %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so -%{py_libdir}/_pyrepl %{py_libdir}/__phello__ %dir %{py_libdir}/asyncio @@ -1142,14 +1144,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{py_libdir}/idlelib -%dir %{py_libdir}/importlib -%{py_libdir}/importlib/__pycache__ -%{py_libdir}/importlib/*.py -%dir %{py_libdir}/importlib/metadata -%{py_libdir}/importlib/metadata/__pycache__ -%{py_libdir}/importlib/metadata/*.py -%{py_libdir}/importlib/resources - %dir %{py_libdir}/json %{py_libdir}/json/__pycache__ %{py_libdir}/json/*.py From b2a984c172b08060042824509acaa9ff1572828e Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 20 May 2025 01:16:33 +0200 Subject: [PATCH 171/180] BR:/R: libatomic-devel on archs without support for 64-bit atomics --- python3.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python3.spec b/python3.spec index 07fde45..95bda6d 100644 --- a/python3.spec +++ b/python3.spec @@ -83,6 +83,9 @@ BuildRequires: gdbm-devel >= 1.8.3 BuildRequires: glibc-localedb-all %endif BuildRequires: gmp-devel >= 4.0 +%ifnarch %arch_with_atomics64 +BuildRequires: libatomic-devel +%endif BuildRequires: libffi-devel BuildRequires: libnsl-devel BuildRequires: libstdc++-devel @@ -94,6 +97,7 @@ BuildRequires: pkgconfig BuildRequires: readline-devel >= 5.0 BuildRequires: rpm-build >= 4.6 BuildRequires: rpm-pythonprov +BuildRequires: rpmbuild(macros) >= 2.025 BuildRequires: sed >= 4.0 BuildRequires: sqlite3-devel >= 3.3.5 BuildRequires: tar >= 1:1.22 @@ -297,6 +301,9 @@ Summary(tr.UTF-8): Python ile geliştirme yapmak için gerekli dosyalar Summary(uk.UTF-8): Бібліотеки та хедери для програмування на мові Python Group: Development/Languages/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} +%ifnarch %arch_with_atomics64 +Requires: libatomic-devel +%endif Obsoletes: python3-devel-src < 1:3.2-1 %description devel From 53997754bb44e31e774071e290cd21a3c74b6d8e Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 20 May 2025 09:32:19 +0200 Subject: [PATCH 172/180] up to 3.13.3 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 95bda6d..cbc3142 100644 --- a/python3.spec +++ b/python3.spec @@ -48,13 +48,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.2 +Version: %{py_ver}.3 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 4c2d9202ab4db02c9d0999b14655dfe5 +# Source0-md5: 8bb5f0b8c9d9d7b87d7d98510e8d58e5 Source1: pyconfig.h.in Patch2: %{name}-multilib.patch From a772d3bb36cfb844607363924cc62485cf86c2ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 5 Jun 2025 21:13:13 +0200 Subject: [PATCH 173/180] Up to 3.13.4 (build hangs here forever) --- python3.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3.spec b/python3.spec index cbc3142..773e478 100644 --- a/python3.spec +++ b/python3.spec @@ -12,7 +12,7 @@ # tests which will not work on 64-bit platforms %define no64bit_tests -x test_rgbimg -x test_imageop # tests which may fail because of builder environment limitations (no /proc or /dev/pts) -%define nobuilder_tests -u-network -x test_resource -x test_openpty -x test_socket -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization +%define nobuilder_tests -u-network -x test_resource -x test_openpty -x test_socket -x test_posix -x test_locale -x test_pty -x test_asyncio -x test_os -x test_readline -x test_normalization -x test_zoneinfo # tests which fail because of some unknown/unresolved reason (this list should be %%{nil}) # test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib... @@ -48,13 +48,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.3 +Version: %{py_ver}.4 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 8bb5f0b8c9d9d7b87d7d98510e8d58e5 +# Source0-md5: 2e2a8eb2e1be50049dc4248d99a52f89 Source1: pyconfig.h.in Patch2: %{name}-multilib.patch From 35bd54bca61641f64ab2241526a626c7ddcd66d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 14 Jun 2025 11:06:18 +0200 Subject: [PATCH 174/180] Up to 3.13.5 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 773e478..c9e22d3 100644 --- a/python3.spec +++ b/python3.spec @@ -48,13 +48,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.4 +Version: %{py_ver}.5 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 2e2a8eb2e1be50049dc4248d99a52f89 +# Source0-md5: dbaa8833aa736eddbb18a6a6ae0c10fa Source1: pyconfig.h.in Patch2: %{name}-multilib.patch From feb296611ecb27d9e77a04c395f9e20e9874b67b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 12 Aug 2025 08:23:49 +0200 Subject: [PATCH 175/180] Up to 3.13.6 --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index c9e22d3..4bf85aa 100644 --- a/python3.spec +++ b/python3.spec @@ -48,13 +48,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.5 +Version: %{py_ver}.6 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: dbaa8833aa736eddbb18a6a6ae0c10fa +# Source0-md5: 4170b57e642c15a1dfed17313ec57cc2 Source1: pyconfig.h.in Patch2: %{name}-multilib.patch From 53416c266cbb9d198d9c783cd93c1fac6f8ebc77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 22 Aug 2025 08:42:42 +0200 Subject: [PATCH 176/180] Up to 3.13.7 (fixes ssl related regression in .6) --- python3.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 4bf85aa..044d76b 100644 --- a/python3.spec +++ b/python3.spec @@ -48,13 +48,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.6 +Version: %{py_ver}.7 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 4170b57e642c15a1dfed17313ec57cc2 +# Source0-md5: 256cdb3bbf45cdce7499e52ba6c36ea3 Source1: pyconfig.h.in Patch2: %{name}-multilib.patch From 2ca232e2ce182188c1d9034af71e5144644b9ddb Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 23 Aug 2025 11:41:43 +0200 Subject: [PATCH 177/180] - BC: python3-hunter --- python3.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/python3.spec b/python3.spec index 044d76b..3822aa2 100644 --- a/python3.spec +++ b/python3.spec @@ -107,6 +107,7 @@ BuildRequires: tar >= 1:1.22 BuildRequires: xz BuildRequires: xz-devel BuildRequires: zlib-devel +BuildConflicts: python3-hunter <= 3.7.0 Requires: %{name}-libs = %{epoch}:%{version}-%{release} Suggests: pip %if %{with default_python} From 6ffff3b3fab322d07c33c0895bdb2d07ac637ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Fri, 10 Oct 2025 00:05:32 +0200 Subject: [PATCH 178/180] Up to 3.14.0 --- python3-tests_with_pythonpath.patch | 5 ++--- python3.spec | 29 ++++++++++++++++++----------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/python3-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch index c79f15a..3b745ff 100644 --- a/python3-tests_with_pythonpath.patch +++ b/python3-tests_with_pythonpath.patch @@ -20,15 +20,14 @@ diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_asyncio/test_tasks.py Pyth diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_cmd_line.py Python-3.9.2/Lib/test/test_cmd_line.py --- Python-3.9.2.org/Lib/test/test_cmd_line.py 2021-02-19 13:31:44.000000000 +0100 +++ Python-3.9.2/Lib/test/test_cmd_line.py 2021-02-25 18:41:41.098779547 +0100 -@@ -265,6 +265,7 @@ class CmdLineTest(unittest.TestCase): +@@ -383,6 +383,7 @@ class CmdLineTest(unittest.TestCase): self.assertEqual(rc, 0) - self.assertTrue(data.startswith(b'x'), data) + self.assertStartsWith(data, b'x') + @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") def test_large_PYTHONPATH(self): path1 = "ABCDE" * 100 path2 = "FGHIJ" * 100 - @@ -374,6 +374,7 @@ class CmdLineTest(unittest.TestCase): @unittest.skipIf(sys.flags.safe_path, diff --git a/python3.spec b/python3.spec index 3822aa2..4af687e 100644 --- a/python3.spec +++ b/python3.spec @@ -30,7 +30,7 @@ %define _python_target_abi %{?_gnu} %endif -%define py_ver 3.13 +%define py_ver 3.14 %define py_abi %{py_ver} %define py_platform %{py_abi}-%{_target_base_arch}-%{_target_os}%{?_python_target_abi} %define py_prefix %{_prefix} @@ -48,13 +48,13 @@ Summary(ru.UTF-8): Язык программирования очень высо Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом Name: python3 -Version: %{py_ver}.7 +Version: %{py_ver}.0 Release: 1 Epoch: 1 License: PSF Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: 256cdb3bbf45cdce7499e52ba6c36ea3 +# Source0-md5: 41389edaf9c643263cbed9b5ed307df8 Source1: pyconfig.h.in Patch2: %{name}-multilib.patch @@ -773,6 +773,9 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/importlib %{py_libdir}/sysconfig +%{py_libdir}/build-details.json +%{py_libdir}/_sysconfig_vars__*.json + %dir %{py_libdir}/config-%{py_platform} %{py_libdir}/config-%{py_platform}/Makefile %{py_libdir}/config-%{py_platform}/Setup @@ -788,9 +791,9 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/_aix_support.py %{py_libdir}/_android_support.py %{py_libdir}/_apple_support.py +%{py_libdir}/_ast_unparse.py %{py_libdir}/_colorize.py %{py_libdir}/_compat_pickle.py -%{py_libdir}/_compression.py %{py_libdir}/_ios_support.py %{py_libdir}/_markupbase.py %{py_libdir}/_opcode_metadata.py @@ -800,8 +803,10 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/_pydatetime.py %{py_libdir}/_pyio.py %{py_libdir}/_pylong.py +%{py_libdir}/_py_warnings.py %{py_libdir}/_strptime.py %{py_libdir}/_threading_local.py +%{py_libdir}/annotationlib.py %{py_libdir}/antigravity.py %{py_libdir}/argparse.py %{py_libdir}/ast.py @@ -882,7 +887,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/socketserver.py %{py_libdir}/ssl.py %{py_libdir}/statistics.py -%{py_libdir}/string.py %{py_libdir}/stringprep.py %{py_libdir}/struct.py %{py_libdir}/subprocess.py @@ -909,9 +913,9 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/_aix_support.cpython-*.py[co] %{py_libdir}/__pycache__/_android_support.cpython-*.py[co] %{py_libdir}/__pycache__/_apple_support.cpython-*.py[co] +%{py_libdir}/__pycache__/_ast_unparse.cpython-*.py[co] %{py_libdir}/__pycache__/_colorize.cpython-*.py[co] %{py_libdir}/__pycache__/_compat_pickle.cpython-*.py[co] -%{py_libdir}/__pycache__/_compression.cpython-*.py[co] %{py_libdir}/__pycache__/_ios_support.cpython-*.py[co] %{py_libdir}/__pycache__/_markupbase.cpython-*.py[co] %{py_libdir}/__pycache__/_opcode_metadata.cpython-*.py[co] @@ -921,8 +925,10 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/_pydatetime.cpython-*.py[co] %{py_libdir}/__pycache__/_pyio.cpython-*.py[co] %{py_libdir}/__pycache__/_pylong.cpython-*.py[co] +%{py_libdir}/__pycache__/_py_warnings.cpython-*.py[co] %{py_libdir}/__pycache__/_strptime.cpython-*.py[co] %{py_libdir}/__pycache__/_threading_local.cpython-*.py[co] +%{py_libdir}/__pycache__/annotationlib.cpython-*.py[co] %{py_libdir}/__pycache__/antigravity.cpython-*.py[co] %{py_libdir}/__pycache__/argparse.cpython-*.py[co] %{py_libdir}/__pycache__/ast.cpython-*.py[co] @@ -1003,7 +1009,6 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/__pycache__/socketserver.cpython-*.py[co] %{py_libdir}/__pycache__/ssl.cpython-*.py[co] %{py_libdir}/__pycache__/statistics.cpython-*.py[co] -%{py_libdir}/__pycache__/string.cpython-*.py[co] %{py_libdir}/__pycache__/stringprep.cpython-*.py[co] %{py_libdir}/__pycache__/struct.cpython-*.py[co] %{py_libdir}/__pycache__/subprocess.cpython-*.py[co] @@ -1040,12 +1045,10 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_codecs_jp.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_kr.cpython-*.so %attr(755,root,root) %{py_dyndir}/_codecs_tw.cpython-*.so -%attr(755,root,root) %{py_dyndir}/_contextvars.cpython-*.so %attr(755,root,root) %{py_dyndir}/_csv.cpython-*.so %attr(755,root,root) %{py_dyndir}/_ctypes*.cpython-*.so %attr(755,root,root) %{py_dyndir}/_curses_panel.cpython-*.so %attr(755,root,root) %{py_dyndir}/_curses.cpython-*.so -%attr(755,root,root) %{py_dyndir}/_datetime.cpython-*.so %ifnarch sparc64 %attr(755,root,root) %{py_dyndir}/_dbm.cpython-*.so %endif @@ -1054,6 +1057,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_gdbm.cpython-*.so %attr(755,root,root) %{py_dyndir}/_hashlib.cpython-*.so %attr(755,root,root) %{py_dyndir}/_heapq.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_hmac.cpython-*.so %attr(755,root,root) %{py_dyndir}/_interpchannels.cpython-*.so %attr(755,root,root) %{py_dyndir}/_interpqueues.cpython-*.so %attr(755,root,root) %{py_dyndir}/_interpreters.cpython-*.so @@ -1063,12 +1067,12 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_md5.cpython-*.so %attr(755,root,root) %{py_dyndir}/_multibytecodec.cpython-*.so %attr(755,root,root) %{py_dyndir}/_multiprocessing.cpython-*.so -%attr(755,root,root) %{py_dyndir}/_opcode.cpython-*.so %attr(755,root,root) %{py_dyndir}/_pickle.cpython-*.so %attr(755,root,root) %{py_dyndir}/_posixshmem.cpython-*.so %attr(755,root,root) %{py_dyndir}/_posixsubprocess.cpython-*.so %attr(755,root,root) %{py_dyndir}/_queue.cpython-*.so %attr(755,root,root) %{py_dyndir}/_random.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_remote_debugging.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha1.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha2.cpython-*.so %attr(755,root,root) %{py_dyndir}/_sha3.cpython-*.so @@ -1079,7 +1083,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testclinic.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testclinic_limited.cpython-*.so -%attr(755,root,root) %{py_dyndir}/_testexternalinspection.cpython-*.so +#%attr(755,root,root) %{py_dyndir}/_testexternalinspection.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testimportmultiple.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testinternalcapi.cpython-*.so %attr(755,root,root) %{py_dyndir}/_testlimitedcapi.cpython-*.so @@ -1087,6 +1091,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{py_dyndir}/_testsinglephase.cpython-*.so %attr(755,root,root) %{py_dyndir}/_uuid.cpython-*.so %attr(755,root,root) %{py_dyndir}/_xxtestfuzz.cpython-*.so +%attr(755,root,root) %{py_dyndir}/_zstd.cpython-*.so %attr(755,root,root) %{py_dyndir}/array.cpython-*.so %attr(755,root,root) %{py_dyndir}/binascii.cpython-*.so %attr(755,root,root) %{py_dyndir}/cmath.cpython-*.so @@ -1110,6 +1115,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/asyncio/__pycache__ %{py_libdir}/asyncio/*.py +%{py_libdir}/compression %{py_libdir}/concurrent %dir %{py_libdir}/ctypes @@ -1169,6 +1175,7 @@ rm -rf $RPM_BUILD_ROOT %{py_libdir}/pathlib %{py_libdir}/re +%{py_libdir}/string %{py_libdir}/tomllib %{py_libdir}/turtledemo From 1c4c7f390e4724f8c1210104baed1181bfbc4fe4 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 23 Dec 2025 18:21:01 +0100 Subject: [PATCH 179/180] mark distro provided python as externally managed https://peps.python.org/pep-0668/ --- externally-managed | 3 +++ python3.spec | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 externally-managed diff --git a/externally-managed b/externally-managed new file mode 100644 index 0000000..f2ba3ff --- /dev/null +++ b/externally-managed @@ -0,0 +1,3 @@ +[externally-managed] +Error=To install Python packages system-wide, use poldek -i python3-xyz, + where xyz is the package you are trying to install. diff --git a/python3.spec b/python3.spec index 4af687e..750a672 100644 --- a/python3.spec +++ b/python3.spec @@ -56,6 +56,8 @@ Group: Development/Languages/Python Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz # Source0-md5: 41389edaf9c643263cbed9b5ed307df8 Source1: pyconfig.h.in +# https://peps.python.org/pep-0668/ +Source2: externally-managed Patch2: %{name}-multilib.patch Patch3: %{name}-no_cmdline_tests.patch @@ -653,6 +655,7 @@ install -p Tools/patchcheck/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{py %{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config-%{py_platform}/pyconfig.h %{__sed} -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g;s#@PY_ABI@#%{py_platform}#g' %{SOURCE1} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h +cp -p %{SOURCE2} $RPM_BUILD_ROOT%{py_libdir}/EXTERNALLY-MANAGED %if %{with default_python} # python points to python3 now @@ -705,6 +708,7 @@ rm -rf $RPM_BUILD_ROOT # shared modules required by python library %attr(755,root,root) %{py_dyndir}/_struct.cpython-*.so +%{py_libdir}/EXTERNALLY-MANAGED # modules required by python library %{py_libdir}/__future__.py %{py_libdir}/_collections_abc.py From eb3215dcb4b671a133eb22627b72b612fac2b79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 11 Apr 2026 16:39:22 +0200 Subject: [PATCH 180/180] Bump to mpdecimal 2.6.1 (x32 fixes) --- python3.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 750a672..b87e30c 100644 --- a/python3.spec +++ b/python3.spec @@ -92,7 +92,7 @@ BuildRequires: libffi-devel BuildRequires: libnsl-devel BuildRequires: libstdc++-devel BuildRequires: libtirpc-devel -%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.5.0} +%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.5.1} BuildRequires: ncurses-ext-devel >= 5.2 BuildRequires: openssl-devel >= 0.9.7 BuildRequires: pkgconfig