summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hsuan Yen2019-11-09 12:00:49 +0800
committerChih-Hsuan Yen2019-11-09 12:00:58 +0800
commit9a07f79d65011176aed8374923591f332cfcb902 (patch)
tree1e8fac85ec319537b8d078499413bc324e2f5135
parentb55a62dbe137541905d284ce8a215da749e523ec (diff)
downloadaur-9a07f79d65011176aed8374923591f332cfcb902.tar.gz
python-git: make it build again
See https://gitlab.com/yan12125/aur/issues/41#note_229485524 for the removal of 0001-compileall-Fix-ddir-when-recursing.patch.
-rw-r--r--.SRCINFO8
-rw-r--r--0001-compileall-Fix-ddir-when-recursing.patch57
-rw-r--r--PKGBUILD12
-rw-r--r--python-git-issue38692.diff13
4 files changed, 23 insertions, 67 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2e4a1392771a..181fd079f1f2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-git
pkgdesc = Next generation of the python high-level scripting language
- pkgver = 3.9.0a0.r105547.3e04cd268e
- pkgrel = 2
+ pkgver = 3.9.0a0.r105755.7e43373317
+ pkgrel = 1
url = https://www.python.org/
arch = x86_64
license = custom
@@ -28,9 +28,9 @@ pkgbase = python-git
optdepends = xz: for lzma
optdepends = tk: for tkinter
source = git+https://github.com/python/cpython#branch=master
- source = 0001-compileall-Fix-ddir-when-recursing.patch
+ source = python-git-issue38692.diff
sha512sums = SKIP
- sha512sums = ebd04c3b6d41321b1f0d439d356e0ce463760db55dc64109854c70d017cf56608aa19de9fc4a21bf840795ff202b4703444f9af8074b661780798c17e03089ff
+ sha512sums = 0755b1da26bec440409b6c3246b7fcaa5d252a9ce973062ad392ce3c1b4b2826a338b86991e01dd37456e0285387f05b121397489a944682d4f13aa82645b0dc
pkgname = python-git
diff --git a/0001-compileall-Fix-ddir-when-recursing.patch b/0001-compileall-Fix-ddir-when-recursing.patch
deleted file mode 100644
index 91ebc71f6a22..000000000000
--- a/0001-compileall-Fix-ddir-when-recursing.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 84fdbc156ed424d030686de350fbfc6c3593263f Mon Sep 17 00:00:00 2001
-Message-Id: <84fdbc156ed424d030686de350fbfc6c3593263f.1537028533.git.jan.steffens@gmail.com>
-From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
-Date: Sat, 15 Sep 2018 18:22:06 +0200
-Subject: [PATCH] compileall: Fix ddir when recursing
-
----
- Lib/compileall.py | 14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/Lib/compileall.py b/Lib/compileall.py
-index 72592126d7..70e246fd96 100644
---- a/Lib/compileall.py
-+++ b/Lib/compileall.py
-@@ -45,12 +45,16 @@ def _walk_dir(dir, ddir=None, maxlevels=10, quiet=0):
- else:
- dfile = None
- if not os.path.isdir(fullname):
-- yield fullname
-+ yield fullname, ddir
- elif (maxlevels > 0 and name != os.curdir and name != os.pardir and
- os.path.isdir(fullname) and not os.path.islink(fullname)):
- yield from _walk_dir(fullname, ddir=dfile,
- maxlevels=maxlevels - 1, quiet=quiet)
-
-+def _compile_one(file_ddir, *args, **kwargs):
-+ file, ddir = file_ddir
-+ return compile_file(file, ddir, *args, **kwargs)
-+
- def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None,
- quiet=0, legacy=False, optimize=-1, workers=1,
- invalidation_mode=py_compile.PycInvalidationMode.TIMESTAMP):
-@@ -79,17 +83,17 @@ def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None,
- if workers is not None and workers != 1 and ProcessPoolExecutor is not None:
- workers = workers or None
- with ProcessPoolExecutor(max_workers=workers) as executor:
-- results = executor.map(partial(compile_file,
-- ddir=ddir, force=force,
-+ results = executor.map(partial(_compile_one,
-+ force=force,
- rx=rx, quiet=quiet,
- legacy=legacy,
- optimize=optimize,
- invalidation_mode=invalidation_mode),
- files)
- success = min(results, default=True)
- else:
-- for file in files:
-- if not compile_file(file, ddir, force, rx, quiet,
-+ for file_ddir in files:
-+ if not _compile_one(file_ddir, force, rx, quiet,
- legacy, optimize, invalidation_mode):
- success = False
- return success
---
-2.18.0
-
diff --git a/PKGBUILD b/PKGBUILD
index f50b394de8a8..ed3c3a90ebb5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,8 +8,8 @@
# Contributor: Jason Chu <jason@archlinux.org>
pkgname=python-git
-pkgver=3.9.0a0.r105547.3e04cd268e
-pkgrel=2
+pkgver=3.9.0a0.r105755.7e43373317
+pkgrel=1
_pybasever=3.9
pkgdesc="Next generation of the python high-level scripting language"
arch=('x86_64')
@@ -23,9 +23,9 @@ optdepends=('sqlite'
'xz: for lzma'
'tk: for tkinter')
source=("git+https://github.com/python/cpython#branch=master"
- 0001-compileall-Fix-ddir-when-recursing.patch)
+ $pkgname-issue38692.diff)
sha512sums=('SKIP'
- 'ebd04c3b6d41321b1f0d439d356e0ce463760db55dc64109854c70d017cf56608aa19de9fc4a21bf840795ff202b4703444f9af8074b661780798c17e03089ff')
+ '0755b1da26bec440409b6c3246b7fcaa5d252a9ce973062ad392ce3c1b4b2826a338b86991e01dd37456e0285387f05b121397489a944682d4f13aa82645b0dc')
pkgver() {
cd cpython
@@ -38,8 +38,8 @@ pkgver() {
prepare() {
cd cpython
- # FS#59997
- # patch -p1 -i ../0001-compileall-Fix-ddir-when-recursing.patch
+ # https://bugs.python.org/issue38692#msg356235
+ patch -Np1 -i ../$pkgname-issue38692.diff
# FS#23997
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
diff --git a/python-git-issue38692.diff b/python-git-issue38692.diff
new file mode 100644
index 000000000000..9def203aa80a
--- /dev/null
+++ b/python-git-issue38692.diff
@@ -0,0 +1,13 @@
+--- a/Lib/test/test_posix.py 2019-11-08 18:26:13.704894779 +0800
++++ b/Lib/test/test_posix.py 2019-11-08 18:26:34.575039504 +0800
+@@ -1474,8 +1474,8 @@
+ def test_pidfd_open(self):
+ with self.assertRaises(OSError) as cm:
+ os.pidfd_open(-1)
+- if cm.exception.errno == errno.ENOSYS:
+- self.skipTest("system does not support pidfd_open")
++ if cm.exception.errno in (errno.ENOSYS, errno.EPERM):
++ self.skipTest("system does not support or allow pidfd_open")
+ self.assertEqual(cm.exception.errno, errno.EINVAL)
+ os.close(os.pidfd_open(os.getpid(), 0))
+