mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: Add python-3.8.
* gnu/packages/python.scm (python-3.8): New public variable. [source]: Add patches to skip four tests. * gnu/packages/patches/python-3.8-search-paths.patch: New file. * gnu/packages/patches/python-3.8-fix-tests.patch: New file. Signed-off-by: Marius Bakke <mbakke@fastmail.com>
This commit is contained in:
parent
3b7828cc7f
commit
af6a9fc276
3 changed files with 85 additions and 0 deletions
42
gnu/packages/patches/python-3.8-fix-tests.patch
Normal file
42
gnu/packages/patches/python-3.8-fix-tests.patch
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
|
||||||
|
index 1474624..887f8ee 100644
|
||||||
|
--- a/Lib/test/_test_multiprocessing.py
|
||||||
|
+++ b/Lib/test/_test_multiprocessing.py
|
||||||
|
@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase):
|
||||||
|
sms.close()
|
||||||
|
|
||||||
|
@unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms")
|
||||||
|
+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
|
||||||
|
def test_shared_memory_SharedMemoryServer_ignores_sigint(self):
|
||||||
|
# bpo-36368: protect SharedMemoryManager server process from
|
||||||
|
# KeyboardInterrupt signals.
|
||||||
|
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
|
||||||
|
index d41e94b..a1c15e7 100644
|
||||||
|
--- a/Lib/test/test_signal.py
|
||||||
|
+++ b/Lib/test/test_signal.py
|
||||||
|
@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase):
|
||||||
|
self.assertLess(len(s), signal.NSIG)
|
||||||
|
|
||||||
|
@unittest.skipUnless(sys.executable, "sys.executable required.")
|
||||||
|
+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
|
||||||
|
def test_keyboard_interrupt_exit_code(self):
|
||||||
|
"""KeyboardInterrupt triggers exit via SIGINT."""
|
||||||
|
process = subprocess.run(
|
||||||
|
@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase):
|
||||||
|
signal.signal(7, handler)
|
||||||
|
|
||||||
|
@unittest.skipUnless(sys.executable, "sys.executable required.")
|
||||||
|
+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
|
||||||
|
def test_keyboard_interrupt_exit_code(self):
|
||||||
|
"""KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT."""
|
||||||
|
# We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here
|
||||||
|
@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase):
|
||||||
|
|
||||||
|
class RaiseSignalTest(unittest.TestCase):
|
||||||
|
|
||||||
|
+ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device")
|
||||||
|
def test_sigint(self):
|
||||||
|
with self.assertRaises(KeyboardInterrupt):
|
||||||
|
signal.raise_signal(signal.SIGINT)
|
||||||
|
--
|
||||||
|
2.23.0
|
17
gnu/packages/patches/python-3.8-search-paths.patch
Normal file
17
gnu/packages/patches/python-3.8-search-paths.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 20d7f35..5751083 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -676,8 +676,8 @@ class PyBuildExt(build_ext):
|
||||||
|
# if a file is found in one of those directories, it can
|
||||||
|
# be assumed that no additional -I,-L directives are needed.
|
||||||
|
if not CROSS_COMPILING:
|
||||||
|
- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs
|
||||||
|
- self.inc_dirs = self.compiler.include_dirs + system_include_dirs
|
||||||
|
+ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep)
|
||||||
|
+ self.inc_dirs = os.getenv('CPATH', '').split(os.pathsep)
|
||||||
|
else:
|
||||||
|
# Add the sysroot paths. 'sysroot' is a compiler option used to
|
||||||
|
# set the logical path of the standard system headers and
|
||||||
|
--
|
||||||
|
2.23.0
|
|
@ -57,6 +57,7 @@
|
||||||
;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
|
;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
|
||||||
;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
|
;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
|
||||||
|
;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -408,6 +409,31 @@ (define-public python-3.7
|
||||||
(version-major+minor version)
|
(version-major+minor version)
|
||||||
"/site-packages"))))))))
|
"/site-packages"))))))))
|
||||||
|
|
||||||
|
(define-public python-3.8
|
||||||
|
(package
|
||||||
|
(inherit python-3.7)
|
||||||
|
(name "python-next")
|
||||||
|
(version "3.8.0")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(inherit (package-source python-3.7))
|
||||||
|
(uri (string-append "https://www.python.org/ftp/python/"
|
||||||
|
version "/Python-" version ".tar.xz"))
|
||||||
|
(sha256 (base32 "110d0did9rxn7rg85kf2fwli5hqq44xv2d8bi7d92m7v2d728mmk"))
|
||||||
|
(patches (search-patches
|
||||||
|
"python-3.8-search-paths.patch"
|
||||||
|
"python-3-fix-tests.patch"
|
||||||
|
"python-3.8-fix-tests.patch"
|
||||||
|
"python-3-deterministic-build-info.patch"))
|
||||||
|
(snippet
|
||||||
|
'(begin
|
||||||
|
;; Delete the bundled copy of libexpat.
|
||||||
|
(delete-file-recursively "Modules/expat")
|
||||||
|
(substitute* "Modules/Setup"
|
||||||
|
;; Link Expat instead of embedding the bundled one.
|
||||||
|
(("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
|
||||||
|
#t))))))
|
||||||
|
|
||||||
;; Current 3.x version.
|
;; Current 3.x version.
|
||||||
(define-public python-3 python-3.7)
|
(define-public python-3 python-3.7)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue