git.iko.soy/typeable/nixpkgs
on master help sign in
python38: init at 3.8.0b2
commit421a87d94c9aa1cb3318c8fb530ed5efa8b5a27c authorFrederik Rietdijk <fridh@fridh.nl> dateTue 9 Jul 2019, 15:19 (7 years ago) parent08a76cf
4 files changed+117−2
pkgs/development/interpreters/python/cpython/3.8/no-ldconfig.patch+100 pkgs/development/interpreters/python/default.nix+13 pkgs/top-level/all-packages.nix+3−1 pkgs/top-level/python-packages.nix+1−1
pkgs/development/interpreters/python/cpython/3.8/no-ldconfig.patchnew file+100
@@ -0,0 +1,100 @@
1+From 597e73f2a4b2f0b508127931b36d5540d6941823 Mon Sep 17 00:00:00 2001
2+From: Frederik Rietdijk <fridh@fridh.nl>
3+Date: Mon, 28 Aug 2017 09:24:06 +0200
4+Subject: [PATCH] Don't use ldconfig
5+
6+---
7+ Lib/ctypes/util.py | 70 ++----------------------------------------------------
8+ 1 file changed, 2 insertions(+), 68 deletions(-)
9+
10+diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
11+index 5e8b31a854..7b45ce6c15 100644
12+--- a/Lib/ctypes/util.py
13++++ b/Lib/ctypes/util.py
14+@@ -94,46 +94,7 @@ elif os.name == "posix":
15+ import re, tempfile
16+
17+ def _findLib_gcc(name):
18+- # Run GCC's linker with the -t (aka --trace) option and examine the
19+- # library name it prints out. The GCC command will fail because we
20+- # haven't supplied a proper program with main(), but that does not
21+- # matter.
22+- expr = os.fsencode(r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name))
23+-
24+- c_compiler = shutil.which('gcc')
25+- if not c_compiler:
26+- c_compiler = shutil.which('cc')
27+- if not c_compiler:
28+- # No C compiler available, give up
29+- return None
30+-
31+- temp = tempfile.NamedTemporaryFile()
32+- try:
33+- args = [c_compiler, '-Wl,-t', '-o', temp.name, '-l' + name]
34+-
35+- env = dict(os.environ)
36+- env['LC_ALL'] = 'C'
37+- env['LANG'] = 'C'
38+- try:
39+- proc = subprocess.Popen(args,
40+- stdout=subprocess.PIPE,
41+- stderr=subprocess.STDOUT,
42+- env=env)
43+- except OSError: # E.g. bad executable
44+- return None
45+- with proc:
46+- trace = proc.stdout.read()
47+- finally:
48+- try:
49+- temp.close()
50+- except FileNotFoundError:
51+- # Raised if the file was already removed, which is the normal
52+- # behaviour of GCC if linking fails
53+- pass
54+- res = re.search(expr, trace)
55+- if not res:
56+- return None
57+- return os.fsdecode(res.group(0))
58++ return None
59+
60+
61+ if sys.platform == "sunos5":
62+@@ -255,34 +216,7 @@ elif os.name == "posix":
63+ else:
64+
65+ def _findSoname_ldconfig(name):
66+- import struct
67+- if struct.calcsize('l') == 4:
68+- machine = os.uname().machine + '-32'
69+- else:
70+- machine = os.uname().machine + '-64'
71+- mach_map = {
72+- 'x86_64-64': 'libc6,x86-64',
73+- 'ppc64-64': 'libc6,64bit',
74+- 'sparc64-64': 'libc6,64bit',
75+- 's390x-64': 'libc6,64bit',
76+- 'ia64-64': 'libc6,IA-64',
77+- }
78+- abi_type = mach_map.get(machine, 'libc6')
79+-
80+- # XXX assuming GLIBC's ldconfig (with option -p)
81+- regex = r'\s+(lib%s\.[^\s]+)\s+\(%s'
82+- regex = os.fsencode(regex % (re.escape(name), abi_type))
83+- try:
84+- with subprocess.Popen(['/sbin/ldconfig', '-p'],
85+- stdin=subprocess.DEVNULL,
86+- stderr=subprocess.DEVNULL,
87+- stdout=subprocess.PIPE,
88+- env={'LC_ALL': 'C', 'LANG': 'C'}) as p:
89+- res = re.search(regex, p.stdout.read())
90+- if res:
91+- return os.fsdecode(res.group(1))
92+- except OSError:
93+- pass
94++ return None
95+
96+ def _findLib_ld(name):
97+ # See issue #9998 for why this is needed
98+--
99+2.15.0
100+
pkgs/development/interpreters/python/default.nix+13
@@ -98,6 +98,19 @@ in {
9898 inherit passthruFun;
9999 };
100100
101+ python38 = callPackage ./cpython {
102+ self = python38;
103+ sourceVersion = {
104+ major = "3";
105+ minor = "8";
106+ patch = "0";
107+ suffix = "b2";
108+ };
109+ sha256 = "1rh9dz5vmc56y45d6j2wfjw4m7x25i6v8vyld4mrqh06s2gn1hbl";
110+ inherit (darwin) CF configd;
111+ inherit passthruFun;
112+ };
113+
101114 pypy27 = callPackage ./pypy {
102115 self = pypy27;
103116 sourceVersion = {
pkgs/top-level/all-packages.nix+3−1
@@ -8537,6 +8537,7 @@ in
85378537 python35Full = python35.override{x11Support=true;};
85388538 python36Full = python36.override{x11Support=true;};
85398539 python37Full = python37.override{x11Support=true;};
8540+ python38Full = python38.override{x11Support=true;};
85408541
85418542 # pythonPackages further below, but assigned here because they need to be in sync
85428543 pythonPackages = python.pkgs;
@@ -8544,13 +8545,14 @@ in
85448545 python3Packages = python3.pkgs;
85458546
85468547 pythonInterpreters = callPackage ./../development/interpreters/python {};
8547− inherit (pythonInterpreters) python27 python35 python36 python37 pypy27 pypy35;
8548+ inherit (pythonInterpreters) python27 python35 python36 python37 python38 pypy27 pypy35;
85488549
85498550 # Python package sets.
85508551 python27Packages = lib.hiPrioSet (recurseIntoAttrs python27.pkgs);
85518552 python35Packages = python35.pkgs;
85528553 python36Packages = python36.pkgs;
85538554 python37Packages = recurseIntoAttrs python37.pkgs;
8555+ python38Packages = python38.pkgs;
85548556 pypyPackages = pypy.pkgs;
85558557 pypy2Packages = pypy2.pkgs;
85568558 pypy27Packages = pypy27.pkgs;
pkgs/top-level/python-packages.nix+1−1
@@ -18,7 +18,7 @@ let
1818 packages = ( self:
1919
2020let
21− inherit (python.passthru) isPy27 isPy33 isPy34 isPy35 isPy36 isPy37 isPy3k isPyPy pythonAtLeast pythonOlder;
21+ inherit (python.passthru) isPy27 isPy33 isPy34 isPy35 isPy36 isPy37 isPy38 isPy3k isPyPy pythonAtLeast pythonOlder;
2222
2323 callPackage = pkgs.newScope self;
2424