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/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/pyconfig.h.in b/pyconfig.h.in new file mode 100644 index 0000000..4de8ae0 --- /dev/null +++ b/pyconfig.h.in @@ -0,0 +1,11 @@ +#ifndef Py_PYCONFIG_H +#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 +#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/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-BLDLIBRARY.patch b/python3-BLDLIBRARY.patch new file mode 100644 index 0000000..81b054e --- /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@ +@@ -780,7 +780,7 @@ clinic: check-clean-src $(srcdir)/Module + + # Build the interpreter + $(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: $(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 +@@ -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) +- $(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) + + ############################################################################ + # "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]) + # with the ABI build flags appended. + 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)' + INSTSONAME='$(LDLIBRARY)' + DLLLIBRARY='' +@@ -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 +@@ -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}} + + # 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}} + ;; + iOS) 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-ac_fixes.patch b/python3-ac_fixes.patch deleted file mode 100644 index a7f5530..0000000 --- a/python3-ac_fixes.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- 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 - # Optimization messes up debuggers, so turn it off for - # debug builds. -- OPT="-g -O0 -Wall $STRICT_PROTO" -+ OPT="-g $CPPFLAGS $CFLAGS -Wall $STRICT_PROTO" - 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 - case $ac_sys_system in 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-installcompile.patch b/python3-installcompile.patch new file mode 100644 index 0000000..a2f57bb --- /dev/null +++ b/python3-installcompile.patch @@ -0,0 +1,21 @@ +--- 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 altmaninstall @FRAMEWORKALTINSTALLLAST@ ++ sharedinstall altmaninstall installcompile @FRAMEWORKALTINSTALLLAST@ + + # Install shared libraries enabled by Setup + DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED) +@@ -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-lib64.patch b/python3-lib64.patch deleted file mode 100644 index e61ea0e..0000000 --- a/python3-lib64.patch +++ /dev/null @@ -1,290 +0,0 @@ ---- 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 @@ - 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" -+ ;; -+*:*) -+ LIB="lib" -+ ;; -+esac -+AC_MSG_RESULT($LIB) -+ - - 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 @@ - /* 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); ---- 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 - -+libname = sys.lib -+ - if sys.version < "2.2": - WINDOWS_SCHEME = { - 'purelib': '$base', -@@ -47,14 +49,14 @@ - INSTALL_SCHEMES = { - 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', -- 'platlib': '$platbase/lib/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', -- 'platlib': '$base/lib/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 - - if os.name == "posix": -+ if plat_specific: -+ lib = sys.lib -+ else: -+ lib = 'lib' - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib, "python" + get_python_version()) - 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 @@ - self.assertEqual(got, expected) - - libdir = os.path.join(destination, "lib", "python") -+ platlibdir = 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_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 -@@ -285,13 +285,16 @@ - if sys.platform in ('os2emx', 'riscos'): - sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) - elif os.sep == '/': -- sitepackages.append(os.path.join(prefix, "lib", -+ 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")) -+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) - 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 @@ - - _INSTALL_SCHEMES = { - 'posix_prefix': { -- 'stdlib': '{installed_base}/lib/python{py_version_short}', -- 'platstdlib': '{platbase}/lib/python{py_version_short}', -+ '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', -+ 'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages', - 'include': - '{installed_base}/include/python{py_version_short}{abiflags}', - 'platinclude': -@@ -33,10 +33,10 @@ - 'data': '{base}', - }, - 'posix_home': { -- 'stdlib': '{installed_base}/lib/python', -- 'platstdlib': '{base}/lib/python', -+ 'stdlib': '{installed_base}/' + sys.lib + '/python', -+ 'platstdlib': '{base}/' + sys.lib + '/python', - 'purelib': '{base}/lib/python', -- 'platlib': '{base}/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 @@ - - # Machine-dependent subdirectories - MACHDEP= @MACHDEP@ -+LIB= @LIB@ -+ARCH= @ARCH@ - - # Install prefix for architecture-independent files - prefix= @prefix@ -@@ -106,7 +108,7 @@ - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/lib -+SCRIPTDIR= $(prefix)/$(LIB) - ABIFLAGS= @ABIFLAGS@ - - # Detailed destination directories -@@ -611,7 +613,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 ---- 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 @@ - #define EXEC_PREFIX PREFIX - #endif - -+#ifndef LIB_PYTHON -+#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) -+#define LIB_PYTHON L"lib64/python" -+#else -+#define LIB_PYTHON L"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 -@@ -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; - - static void - reduce(wchar_t *dir) ---- 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 @@ - { - 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; -+} ---- 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 @@ - 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("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 @@ - # 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'] - exts = [] -@@ -643,11 +643,11 @@ - elif curses_library: - readline_libs.append(curses_library) - elif self.compiler.find_library_file(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) ) - else: diff --git a/python3-makefile-location.patch b/python3-makefile-location.patch deleted file mode 100644 index 912e4cd..0000000 --- a/python3-makefile-location.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 @@ - """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') - diff --git a/python3-multilib.patch b/python3-multilib.patch new file mode 100644 index 0000000..2d1bc21 --- /dev/null +++ b/python3-multilib.patch @@ -0,0 +1,121 @@ +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/{implementation_lower}/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(): +@@ -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", 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/__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}/{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/{implementation_lower}{py_version_short}{abiflags}', +@@ -39,10 +39,10 @@ _INSTALL_SCHEMES = { + 'data': '{base}', + }, + 'posix_home': { +- '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', +@@ -150,8 +150,8 @@ if _HAS_USER_BASE: + 'posix_user': { + '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(): + else: + inc_dir = _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') + + +--- 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 \ + 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 +@@ -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. +- if name == 'platlib': ++ if name != 'platlib': + # Replace "/lib64/python3.11/site-packages" suffix + # with "/lib/python3.11/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}', ++ f'/{sys.platlibdir}/{suffix}') + 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 +@@ -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 +- (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 diff --git a/python3-no_cmdline_tests.patch b/python3-no_cmdline_tests.patch index ad01727..af46837 100644 --- a/python3-no_cmdline_tests.patch +++ b/python3-no_cmdline_tests.patch @@ -1,31 +1,17 @@ -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 -@@ -130,7 +130,7 @@ - finally: - 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") - class CommandLineTests(unittest.TestCase): + class CommandLineTestsBase: """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 -@@ -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 @@ -33,9 +19,9 @@ diff -Nur Python-3.3.1.orig/Lib/test/test_warnings.py Python-3.3.1/Lib/test/test class EnvironmentVariableTests(BaseTest): def test_single_warning(self): -@@ -762,14 +763,17 @@ - "['ignore:DeprecaciónWarning']".encode('utf-8')) - self.assertEqual(p.wait(), 0) +@@ -1278,9 +1278,11 @@ 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): @@ -45,8 +31,10 @@ diff -Nur Python-3.3.1.orig/Lib/test/test_warnings.py Python-3.3.1/Lib/test/test 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-noarch_to_datadir.patch b/python3-noarch_to_datadir.patch deleted file mode 100644 index 8520db6..0000000 --- a/python3-noarch_to_datadir.patch +++ /dev/null @@ -1,180 +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/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,9 +289,8 @@ - "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")) -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}', -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 -@@ -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) ; \ - 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 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 -@@ -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; - } -@@ -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; -@@ -320,7 +322,7 @@ - - /* Look at configure's PREFIX */ - wcsncpy(prefix, _prefix, MAXPATHLEN); -- joinpath(prefix, lib_python); -+ joinpath(prefix, share_python); - joinpath(prefix, LANDMARK); - if (ismodule(prefix)) - return 1; -@@ -578,7 +580,7 @@ - fprintf(stderr, - "Could not find platform independent libraries \n"); - wcsncpy(prefix, _prefix, MAXPATHLEN); -- joinpath(prefix, lib_python); -+ joinpath(prefix, share_python); - } - else - reduce(prefix); -@@ -591,7 +593,7 @@ - } - else - wcsncpy(zip_path, _prefix, MAXPATHLEN); -- joinpath(zip_path, L"lib/python00.zip"); -+ joinpath(zip_path, 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-profile-tests.patch b/python3-profile-tests.patch new file mode 100644 index 0000000..1148214 --- /dev/null +++ b/python3-profile-tests.patch @@ -0,0 +1,11 @@ +--- 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@ + # 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-pythonpath.patch b/python3-pythonpath.patch deleted file mode 100644 index fe5e48e..0000000 --- a/python3-pythonpath.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- 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 @@ --#! /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 ---- 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") ---- 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-tests.patch b/python3-tests.patch new file mode 100644 index 0000000..dff75eb --- /dev/null +++ b/python3-tests.patch @@ -0,0 +1,40 @@ +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 +@@ -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: ++ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + try: + s.connect(('', imaplib.IMAP4_PORT)) + self.skipTest( +@@ -85,7 +85,7 @@ class TestImaplib(unittest.TestCase): + # This is the exception that should be raised. + 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) + + +--- 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-tests_with_pythonpath.patch b/python3-tests_with_pythonpath.patch new file mode 100644 index 0000000..3b745ff --- /dev/null +++ b/python3-tests_with_pythonpath.patch @@ -0,0 +1,113 @@ +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 +@@ -4,6 +4,7 @@ import collections + import contextvars + import gc + import io ++import os + import random + import re + import sys +@@ -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): + 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 +@@ -383,6 +383,7 @@ class CmdLineTest(unittest.TestCase): + self.assertEqual(rc, 0) + 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, + '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 + # empty string is equivalent to not setting PATH at all, +--- 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. + bazfn = script_helper.make_script(self.directory, 'baz', '') +@@ -558,6 +558,7 @@ class CommandLineTestsBase: + + @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', '') + 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', '') + with self.temporary_pycache_prefix() as env: +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() + ++ @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 -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. +@@ -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 ++ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set") + def test_executable(self): + """ + Test that the sys.executable value is as expected. +@@ -673,6 +673,7 @@ class BasicTest(BaseTest): + + + @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 -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 +@@ -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): + # "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 37bb5c5..b87e30c 100644 --- a/python3.spec +++ b/python3.spec @@ -1,27 +1,38 @@ -# 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 -# - --with-system-libmpdec when new version released [BR: mpdecimal-devel > 2.3] +# 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 -%bcond_with tests # disables Python testing +%bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode +%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_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 +%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 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 +# test_time: test_AsTimeval (test.test_time.TestCPyTime), rounding error +%ifarch x32 +%define broken_tests_x32 -x test_time +%undefine with_optimizations +%endif +%define broken_tests -x test_embed -x test_gdb -x test_site -x test_ssl %{?broken_tests_x32} -%define py_ver 3.3 -%define py_abi %{py_ver}m +%ifarch armv6hl armv7hl armv7hnl +%define _python_target_abi %{?_gnu}hf +%else +%define _python_target_abi %{?_gnu} +%endif + +%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} %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver} %define py_incdir %{_includedir}/python%{py_abi} @@ -37,24 +48,32 @@ 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: Applications -Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -# Source0-md5: c94b78ea3b68a9bbc9906af4d5b4fdc7 -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: libc-cloexec.patch -Patch7: python-distro.patch -Patch8: %{name}-CVE-2013-4238.patch -URL: http://www.python.org/ +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 +Patch4: %{name}-BLDLIBRARY.patch +Patch5: %{name}-config.patch + +Patch9: %{name}-tests_with_pythonpath.patch + +Patch11: %{name}-installcompile.patch + +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 BuildRequires: db-devel >= 4 @@ -62,30 +81,49 @@ 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 +%ifnarch %arch_with_atomics64 +BuildRequires: libatomic-devel +%endif BuildRequires: libffi-devel +BuildRequires: libnsl-devel BuildRequires: libstdc++-devel +BuildRequires: libtirpc-devel +%{?with_system_mpdecimal:BuildRequires: mpdecimal-devel >= 2.5.1} 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: rpmbuild(macros) >= 2.025 BuildRequires: sed >= 4.0 BuildRequires: sqlite3-devel >= 3.3.5 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 +BuildConflicts: python3-hunter <= 3.7.0 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 %define specflags_ppc64 -D__ppc64__=1 %if %{with verbose_tests} -%define test_flags -v -l -x +%define test_flags -v %else -%define test_flags -w -l -x +%define test_flags -wW %endif %ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664} @@ -95,7 +133,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 @@ -203,7 +241,9 @@ 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} +Provides: python3-enum +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. @@ -217,7 +257,10 @@ Summary: Python modules Summary(pl.UTF-8): Moduły języka Python Group: Libraries/Python Requires: %{name}-libs = %{epoch}:%{version}-%{release} -Obsoletes: python3-modules-sqlite +%{?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 Python officially distributed modules. @@ -261,6 +304,10 @@ 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 The Python interpreter is relatively easy to extend with dynamically @@ -313,18 +360,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 @@ -338,30 +373,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/Pythona - -%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 @@ -435,6 +446,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. @@ -446,32 +458,54 @@ 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 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 - -%{__rm} -r Modules/zlib -%{__rm} -r Modules/expat -for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx; do - %{__rm} -r Modules/_ctypes/$SUBDIR -done +%patch -P 2 -p1 +%patch -P 3 -p1 +%patch -P 4 -p1 +%patch -P 5 -p1 + +%patch -P 9 -p1 + +%patch -P 11 -p1 + +%patch -P 14 -p1 +%patch -P 15 -p1 +%{__rm} -r Modules/expat + +%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 + +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 \ + 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 if ! grep -q "tmpfs" /proc/self/mounts; then @@ -480,50 +514,67 @@ if ! grep -q "tmpfs" /proc/self/mounts; then exit 1 fi +export SETUPTOOLS_USE_DISTUTILS=stdlib + +%{__aclocal} %{__autoconf} -CPPFLAGS="-I/usr/include/ncursesw %{rpmcppflags} -Wall %{!?debug:-DNDEBUG=1}"; export CPPFLAGS %configure \ + CC="%{__cc}" \ + OPT="%{rpmcflags}" \ + CPPFLAGS="%{rpmcppflags}" \ + LDFLAGS="%{rpmldflags}" \ + LDFLAGS_NODIST="%{debuginfocflags}" \ ac_cv_posix_semaphores_enabled=yes \ ac_cv_broken_sem_getvalue=no \ - %{?with_debug:--with-pydebug} \ - --with-cxx-main="%{__cxx}" \ - --enable-shared \ --enable-ipv6 \ - --with-dbmliborder=gdbm:bdb \ - --with-signal-module \ -%ifarch %{ix86} %{x8664} ppc ppc64 - --with-tsc \ -%endif - --with-threads \ + --enable-shared \ + --with-computed-gotos \ + --with-dbmliborder=gdbm:ndbm:bdb \ --with-doc-strings \ - --with-fpectl \ + --without-ensurepip \ + --with-platlibdir="%{_lib}" \ + %{?with_debug:--with-pydebug} \ + --with-ssl-default-suites=openssl \ --with-system-expat \ - --with-system-ffi \ - --with-computed-gotos \ - LINKCC='$(PURIFY) $(CXX)' \ - LDSHARED='$(CC) $(CFLAGS) -shared' \ - BLDSHARED='$(CC) $(CFLAGS) -shared' \ - LDFLAGS="%{rpmcflags} %{rpmldflags}" + %{?with_system_mpdecimal:--with-system-libmpdec} \ +%if %{with optimizations} + --enable-optimizations \ + --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} \ - OPT="%{rpmcflags} %{rpmcppflags} -fno-caller-saves" 2>&1 | awk ' + TESTOPTS="%{_smp_mflags} %{test_list}" \ + 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); } }' -LC_ALL=C +LC_ALL=C.UTF-8 export LC_ALL %if %{with tests} -binlibdir=`echo build/lib.*` -%{__make} test \ - TESTOPTS="%{test_flags} %{test_list}" \ - TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/$binlibdir ./python -tt" +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} +%{__make} -C Doc texinfo +%{__make} -C Doc/build/texinfo info %endif %install @@ -532,14 +583,14 @@ 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 %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} @@ -549,16 +600,20 @@ 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 # # 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/=/ /' \ @@ -567,7 +622,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/=/ /' \ @@ -581,33 +636,32 @@ 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/patchcheck/reindent.py $RPM_BUILD_ROOT%{_bindir}/pyreindent%{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 -%{__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 - -# currently provided by python-2to3, consider switching to this one -%{__rm} $RPM_BUILD_ROOT%{_bindir}/2to3 +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib* +%{__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.txt # 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_scriptdir}/LICENSE.txt +%{__rm} $RPM_BUILD_ROOT%{py_libdir}/LICENSE.txt + +%{__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 +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 @@ -624,10 +678,15 @@ 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* +%{_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) @@ -641,339 +700,348 @@ 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__ # 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_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}/__future__.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}/enum.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}/operator.py +%{py_libdir}/posixpath.py +%{py_libdir}/reprlib.py +%{py_libdir}/site.py +%{py_libdir}/sre_*.py +%{py_libdir}/stat.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__/_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__/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 - -# encodings required by python library -%dir %{py_scriptdir}/encodings -%{py_scriptdir}/encodings/__pycache__ -%{py_scriptdir}/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}/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] +%{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__/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] +%{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__/operator.cpython-*.py[co] +%{py_libdir}/__pycache__/posixpath.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__/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] + +# main modules needed by core python +%{py_libdir}/_pyrepl +%{py_libdir}/collections +%{py_libdir}/encodings +%{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 +%{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 %defattr(644,root,root,755) -/etc/shrc.d/python*-modules* -%attr(755,root,root) %{_bindir}/pyvenv -%attr(755,root,root) %{_bindir}/pyvenv-3.3 -%{py_scriptdir}/__future__.py -%{py_scriptdir}/__phello__.foo.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}/_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}/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}/optparse.py -%{py_scriptdir}/os2emxpath.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}/sched.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}/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}/tty.py -%{py_scriptdir}/turtle.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}/zipfile.py -%{py_scriptdir}/__pycache__/__future__.cpython-*.py[co] -%{py_scriptdir}/__pycache__/__phello__.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__/_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__/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__/optparse.cpython-*.py[co] -%{py_scriptdir}/__pycache__/os2emxpath.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__/shelve.cpython-*.py[co] -%{py_scriptdir}/__pycache__/shlex.cpython-*.py[co] -%{py_scriptdir}/__pycache__/shutil.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__/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__/tty.cpython-*.py[co] -%{py_scriptdir}/__pycache__/turtle.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__/zipfile.cpython-*.py[co] +%config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python*-modules* +%{py_libdir}/__hello__.py +%{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}/_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 +%{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 +%{py_libdir}/base64.py +%{py_libdir}/bdb.py +%{py_libdir}/bz2.py +%{py_libdir}/cProfile.py +%{py_libdir}/calendar.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}/contextvars.py +%{py_libdir}/copy.py +%{py_libdir}/csv.py +%{py_libdir}/dataclasses.py +%{py_libdir}/datetime.py +%{py_libdir}/decimal.py +%{py_libdir}/difflib.py +%{py_libdir}/dis.py +%{py_libdir}/doctest.py +%{py_libdir}/filecmp.py +%{py_libdir}/fileinput.py +%{py_libdir}/fnmatch.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}/graphlib.py +%{py_libdir}/gzip.py +%{py_libdir}/hashlib.py +%{py_libdir}/hmac.py +%{py_libdir}/imaplib.py +%{py_libdir}/inspect.py +%{py_libdir}/ipaddress.py +%{py_libdir}/lzma.py +%{py_libdir}/mailbox.py +%{py_libdir}/mimetypes.py +%{py_libdir}/modulefinder.py +%{py_libdir}/netrc.py +%{py_libdir}/ntpath.py +%{py_libdir}/nturl2path.py +%{py_libdir}/numbers.py +%{py_libdir}/opcode.py +%{py_libdir}/optparse.py +%{py_libdir}/pdb.py +%{py_libdir}/pickle.py +%{py_libdir}/pickletools.py +%{py_libdir}/pkgutil.py +%{py_libdir}/platform.py +%{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 +%{py_libdir}/queue.py +%{py_libdir}/quopri.py +%{py_libdir}/random.py +%{py_libdir}/rlcompleter.py +%{py_libdir}/runpy.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}/smtplib.py +%{py_libdir}/socket.py +%{py_libdir}/socketserver.py +%{py_libdir}/ssl.py +%{py_libdir}/statistics.py +%{py_libdir}/stringprep.py +%{py_libdir}/struct.py +%{py_libdir}/subprocess.py +%{py_libdir}/symtable.py +%{py_libdir}/tabnanny.py +%{py_libdir}/tarfile.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}/uuid.py +%{py_libdir}/warnings.py +%{py_libdir}/wave.py +%{py_libdir}/webbrowser.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__/_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__/_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] +%{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] +%{py_libdir}/__pycache__/base64.cpython-*.py[co] +%{py_libdir}/__pycache__/bdb.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__/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__/contextvars.cpython-*.py[co] +%{py_libdir}/__pycache__/copy.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] +%{py_libdir}/__pycache__/dis.cpython-*.py[co] +%{py_libdir}/__pycache__/doctest.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__/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__/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] +%{py_libdir}/__pycache__/imaplib.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__/mimetypes.cpython-*.py[co] +%{py_libdir}/__pycache__/modulefinder.cpython-*.py[co] +%{py_libdir}/__pycache__/netrc.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__/pdb.cpython-*.py[co] +%{py_libdir}/__pycache__/pickle.cpython-*.py[co] +%{py_libdir}/__pycache__/pickletools.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__/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] +%{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__/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] +%{py_libdir}/__pycache__/shutil.cpython-*.py[co] +%{py_libdir}/__pycache__/signal.cpython-*.py[co] +%{py_libdir}/__pycache__/smtplib.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__/stringprep.cpython-*.py[co] +%{py_libdir}/__pycache__/struct.cpython-*.py[co] +%{py_libdir}/__pycache__/subprocess.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__/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__/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__/zipapp.cpython-*.py[co] +%{py_libdir}/__pycache__/zipimport.cpython-*.py[co] # # 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 @@ -981,12 +1049,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}/_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 %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 @@ -995,228 +1061,243 @@ 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 %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}/_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 %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 - -# for openssl < 0.9.8 package sha256 and sha512 modules -%if 0%(pkg-config openssl --atleast-version=0.9.8; echo $?) -%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}/_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}/_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}/_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}/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 %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}/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 %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}/xxsubtype.cpython-*.so %attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so -%dir %{py_scriptdir}/plat-* -%{py_scriptdir}/plat-*/__pycache__ -%{py_scriptdir}/plat-*/*.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}/html -%{py_scriptdir}/html/*.py -%{py_scriptdir}/html/__pycache__ - -%dir %{py_scriptdir}/http -%{py_scriptdir}/http/__pycache__ -%{py_scriptdir}/http/*.py - -%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 -%{py_scriptdir}/unittest - -%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/pydoc - -%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 +%{py_libdir}/__phello__ + +%dir %{py_libdir}/asyncio +%{py_libdir}/asyncio/__pycache__ +%{py_libdir}/asyncio/*.py + +%{py_libdir}/compression +%{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}/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}/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}/pathlib +%{py_libdir}/re +%{py_libdir}/string +%{py_libdir}/tomllib +%{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/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 + +%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 + +%{py_libdir}/zipfile %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 + +%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 -%attr(755,root,root) %{_bindir}/pydoc3.3 -%{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 +%attr(755,root,root) %{_bindir}/pydoc%{py_ver} +%{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.3 -%dir %{py_scriptdir}/idlelib -%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 +%attr(755,root,root) %{_bindir}/idle%{py_ver} +%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) %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 -%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_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 +%{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_ver}-embed.pc +%{_pkgconfigdir}/python3-embed.pc +%if "%{py_ver}" != "%{py_abi}" %{_pkgconfigdir}/python-%{py_abi}.pc +%endif %{_pkgconfigdir}/python3.pc %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} -%{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] - -%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 +%attr(755,root,root) %{_bindir}/pyreindent%{py_ver} +%{py_libdir}/timeit.py +%{py_libdir}/__pycache__/timeit.cpython-*.py[co] %files static %defattr(644,root,root,755) @@ -1226,17 +1307,22 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %{_examplesdir}/%{name}-%{version} +%files test +%defattr(644,root,root,755) +%{py_libdir}/idlelib/idle_test +%{py_libdir}/test + %if %{with info} %files doc-info %defattr(644,root,root,755) -%{_infodir}/*.info* +%{_infodir}/python.info* %endif %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