git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #27753 from FRidh/python33eol

python33: end-of-life

commit468fdddde61aa5b1d0324b1cd794c29df6a0b64f authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateTue 8 Aug 2017, 09:11 (9 years ago) parent0734fb2d387cac
8 files changed+2−254
doc/languages-frameworks/python.md+2−3 pkgs/development/interpreters/python/cpython/3.3/default.nix−160 pkgs/development/interpreters/python/cpython/docs/3.3-html.nix−18 pkgs/development/interpreters/python/cpython/docs/3.3-pdf-a4.nix−18 pkgs/development/interpreters/python/cpython/docs/3.3-pdf-letter.nix−18 pkgs/development/interpreters/python/cpython/docs/3.3-text.nix−18 pkgs/development/interpreters/python/cpython/docs/default.nix−12 pkgs/top-level/all-packages.nix−7
doc/languages-frameworks/python.md+2−3
@@ -423,7 +423,7 @@ and in this case the `python35` interpreter is automatically used.
423423### Interpreters
424424
425425Versions 2.7, 3.3, 3.4, 3.5 and 3.6 of the CPython interpreter are available as
426−respectively `python27`, `python33`, `python34`, `python35` and `python36`. The PyPy interpreter
426+respectively `python27`, `python34`, `python35` and `python36`. The PyPy interpreter
427427is available as `pypy`. The aliases `python2` and `python3` correspond to respectively `python27` and
428428`python35`. The default interpreter, `python`, maps to `python2`.
429429The Nix expressions for the interpreters can be found in
@@ -469,7 +469,6 @@ sets are
469469
470470* `pkgs.python26Packages`
471471* `pkgs.python27Packages`
472−* `pkgs.python33Packages`
473472* `pkgs.python34Packages`
474473* `pkgs.python35Packages`
475474* `pkgs.python36Packages`
@@ -622,7 +621,7 @@ attribute. The `shell.nix` file from the previous section can thus be also writt
622621```nix
623622with import <nixpkgs> {};
624623
625−(python33.withPackages (ps: [ps.numpy ps.requests])).env
624+(python36.withPackages (ps: [ps.numpy ps.requests])).env
626625```
627626
628627In contrast to `python.buildEnv`, `python.withPackages` does not support the more advanced options
pkgs/development/interpreters/python/cpython/3.3/default.nixdeleted−160
@@ -1,160 +0,0 @@
1−{ stdenv, fetchurl
2−, bzip2
3−, gdbm
4−, lzma
5−, ncurses
6−, openssl
7−, readline
8−, sqlite
9−, tcl ? null, tk ? null, tix ? null, libX11 ? null, xproto ? null, x11Support ? false
10−, zlib
11−, callPackage
12−, self
13−, CF, configd
14−, python-setup-hook
15−# For the Python package set
16−, pkgs, packageOverrides ? (self: super: {})
17−}:
18−
19−assert x11Support -> tcl != null
20− && tk != null
21− && xproto != null
22− && libX11 != null;
23−
24−with stdenv.lib;
25−
26−let
27− majorVersion = "3.3";
28− minorVersion = "6";
29− minorVersionSuffix = "";
30− pythonVersion = majorVersion;
31− version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
32− libPrefix = "python${majorVersion}";
33− sitePackages = "lib/${libPrefix}/site-packages";
34−
35− buildInputs = filter (p: p != null) [
36− zlib bzip2 lzma gdbm sqlite readline ncurses openssl ]
37− ++ optionals x11Support [ tcl tk libX11 xproto ]
38− ++ optionals stdenv.isDarwin [ CF configd ];
39−
40−in stdenv.mkDerivation {
41− name = "python3-${version}";
42− pythonVersion = majorVersion;
43− inherit majorVersion version;
44−
45− inherit buildInputs;
46−
47− src = fetchurl {
48− url = "https://www.python.org/ftp/python/${majorVersion}.${minorVersion}/Python-${version}.tar.xz";
49− sha256 = "0gsxpgd5p4mwd01gw501vsyahncyw3h9836ypkr3y32kgazy89jj";
50− };
51−
52− NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
53−
54− # Determinism: The interpreter is patched to write null timestamps when compiling python files.
55− # This way python doesn't try to update them when we freeze timestamps in nix store.
56− DETERMINISTIC_BUILD=1;
57− # Determinism: We fix the hashes of str, bytes and datetime objects.
58− PYTHONHASHSEED=0;
59−
60− postPatch = ''
61− # Determinism
62− substituteInPlace "Lib/py_compile.py" --replace "source_stats['mtime']" "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"
63−# # We do not patch `Lib/importlib/_bootstrap_external.py` because it does not exist.
64− '' + optionalString (x11Support && (tix != null)) ''
65− substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
66− '';
67−
68− preConfigure = ''
69− for i in /usr /sw /opt /pkg; do # improve purity
70− substituteInPlace ./setup.py --replace $i /no-such-path
71− done
72− ${optionalString stdenv.isDarwin ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''}
73−
74− configureFlagsArray=( --enable-shared --with-threads
75− CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}"
76− LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}"
77− LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
78− )
79− '';
80−
81− setupHook = python-setup-hook sitePackages;
82−
83− postInstall = ''
84− # needed for some packages, especially packages that backport functionality
85− # to 2.x from 3.x
86− for item in $out/lib/python${majorVersion}/test/*; do
87− if [[ "$item" != */test_support.py* ]]; then
88− rm -rf "$item"
89− else
90− echo $item
91− fi
92− done
93− touch $out/lib/python${majorVersion}/test/__init__.py
94−
95− ln -s "$out/include/python${majorVersion}m" "$out/include/python${majorVersion}"
96− paxmark E $out/bin/python${majorVersion}
97−
98− # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484
99− echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
100−
101− # Determinism: Windows installers were not deterministic.
102− # We're also not interested in building Windows installers.
103− find "$out" -name 'wininst*.exe' | xargs -r rm -f
104−
105− # Use Python3 as default python
106− ln -s "$out/bin/idle3" "$out/bin/idle"
107− ln -s "$out/bin/pip3" "$out/bin/pip"
108− ln -s "$out/bin/pydoc3" "$out/bin/pydoc"
109− ln -s "$out/bin/python3" "$out/bin/python"
110− ln -s "$out/bin/python3-config" "$out/bin/python-config"
111− ln -s "$out/lib/pkgconfig/python3.pc" "$out/lib/pkgconfig/python.pc"
112−
113− # Get rid of retained dependencies on -dev packages, and remove
114− # some $TMPDIR references to improve binary reproducibility.
115− # Note that the .pyc file of _sysconfigdata.py should be regenerated!
116− for i in $out/lib/python${majorVersion}/_sysconfigdata.py $out/lib/python${majorVersion}/config-${majorVersion}m/Makefile; do
117− sed -i $i -e "s|-I/nix/store/[^ ']*||g" -e "s|-L/nix/store/[^ ']*||g" -e "s|$TMPDIR|/no-such-path|g"
118− done
119−
120− # Determinism: rebuild all bytecode
121− # We exclude lib2to3 because that's Python 2 code which fails
122− # We rebuild three times, once for each optimization level
123− find $out -name "*.py" | $out/bin/python -m compileall -q -f -x "lib2to3" -i -
124− find $out -name "*.py" | $out/bin/python -O -m compileall -q -f -x "lib2to3" -i -
125− find $out -name "*.py" | $out/bin/python -OO -m compileall -q -f -x "lib2to3" -i -
126− '';
127−
128− passthru = let
129− pythonPackages = callPackage ../../../../../top-level/python-packages.nix {python=self; overrides=packageOverrides;};
130− in rec {
131− inherit libPrefix sitePackages x11Support;
132− executable = "${libPrefix}m";
133− buildEnv = callPackage ../../wrapper.nix { python = self; };
134− withPackages = import ../../with-packages.nix { inherit buildEnv pythonPackages;};
135− pkgs = pythonPackages;
136− isPy3 = true;
137− isPy33 = true;
138− is_py3k = true; # deprecated
139− interpreter = "${self}/bin/${executable}";
140− };
141−
142− enableParallelBuilding = true;
143−
144− meta = {
145− homepage = http://python.org;
146− description = "A high-level dynamically-typed programming language";
147− longDescription = ''
148− Python is a remarkably powerful dynamic programming language that
149− is used in a wide variety of application domains. Some of its key
150− distinguishing features include: clear, readable syntax; strong
151− introspection capabilities; intuitive object orientation; natural
152− expression of procedural code; full modularity, supporting
153− hierarchical packages; exception-based error handling; and very
154− high level dynamic data types.
155− '';
156− license = stdenv.lib.licenses.psfl;
157− platforms = with stdenv.lib.platforms; linux ++ darwin;
158− maintainers = with stdenv.lib.maintainers; [ chaoflow cstrahan ];
159− };
160−}
pkgs/development/interpreters/python/cpython/docs/3.3-html.nixdeleted−18
@@ -1,18 +0,0 @@
1−# This file was generated and will be overwritten by ./generate.sh
2−
3−{ stdenv, fetchurl, lib }:
4−
5−stdenv.mkDerivation rec {
6− name = "python33-docs-html-3.3.0";
7− src = fetchurl {
8− url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-html.tar.bz2;
9− sha256 = "0vv24b9qi7gznv687ik0pa2w1rq9grqivy44znvj2ysjfg7mc2c1";
10− };
11− installPhase = ''
12− mkdir -p $out/share/doc/python33
13− cp -R ./ $out/share/doc/python33/html
14− '';
15− meta = {
16− maintainers = [ lib.maintainers.chaoflow ];
17− };
18−}
pkgs/development/interpreters/python/cpython/docs/3.3-pdf-a4.nixdeleted−18
@@ -1,18 +0,0 @@
1−# This file was generated and will be overwritten by ./generate.sh
2−
3−{ stdenv, fetchurl, lib }:
4−
5−stdenv.mkDerivation rec {
6− name = "python33-docs-pdf-a4-3.3.0";
7− src = fetchurl {
8− url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-a4.tar.bz2;
9− sha256 = "1y6n13bxlw8a11khy3ynfbz8z0kpf2lvh32dvy8scyw3hrk6wdxp";
10− };
11− installPhase = ''
12− mkdir -p $out/share/doc/python33
13− cp -R ./ $out/share/doc/python33/pdf-a4
14− '';
15− meta = {
16− maintainers = [ lib.maintainers.chaoflow ];
17− };
18−}
pkgs/development/interpreters/python/cpython/docs/3.3-pdf-letter.nixdeleted−18
@@ -1,18 +0,0 @@
1−# This file was generated and will be overwritten by ./generate.sh
2−
3−{ stdenv, fetchurl, lib }:
4−
5−stdenv.mkDerivation rec {
6− name = "python33-docs-pdf-letter-3.3.0";
7− src = fetchurl {
8− url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-letter.tar.bz2;
9− sha256 = "0mcj1i47nx81fc9zk1cic4c4p139qjcqlzf4hnnkzvb3jcgy5z6k";
10− };
11− installPhase = ''
12− mkdir -p $out/share/doc/python33
13− cp -R ./ $out/share/doc/python33/pdf-letter
14− '';
15− meta = {
16− maintainers = [ lib.maintainers.chaoflow ];
17− };
18−}
pkgs/development/interpreters/python/cpython/docs/3.3-text.nixdeleted−18
@@ -1,18 +0,0 @@
1−# This file was generated and will be overwritten by ./generate.sh
2−
3−{ stdenv, fetchurl, lib }:
4−
5−stdenv.mkDerivation rec {
6− name = "python33-docs-text-3.3.0";
7− src = fetchurl {
8− url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-text.tar.bz2;
9− sha256 = "10vk2fixg1aglqmsf89kn98rlirrbhnrk1285vzfbynf2iavxw0n";
10− };
11− installPhase = ''
12− mkdir -p $out/share/doc/python33
13− cp -R ./ $out/share/doc/python33/text
14− '';
15− meta = {
16− maintainers = [ lib.maintainers.chaoflow ];
17− };
18−}
pkgs/development/interpreters/python/cpython/docs/default.nix−12
@@ -4,36 +4,24 @@ let
44pythonDocs = {
55 html = {
66 recurseForDerivations = true;
7− python33 = import ./3.3-html.nix {
8− inherit stdenv fetchurl lib;
9− };
107 python27 = import ./2.7-html.nix {
118 inherit stdenv fetchurl lib;
129 };
1310 };
1411 pdf_a4 = {
1512 recurseForDerivations = true;
16− python33 = import ./3.3-pdf-a4.nix {
17− inherit stdenv fetchurl lib;
18− };
1913 python27 = import ./2.7-pdf-a4.nix {
2014 inherit stdenv fetchurl lib;
2115 };
2216 };
2317 pdf_letter = {
2418 recurseForDerivations = true;
25− python33 = import ./3.3-pdf-letter.nix {
26− inherit stdenv fetchurl lib;
27− };
2819 python27 = import ./2.7-pdf-letter.nix {
2920 inherit stdenv fetchurl lib;
3021 };
3122 };
3223 text = {
3324 recurseForDerivations = true;
34− python33 = import ./3.3-text.nix {
35− inherit stdenv fetchurl lib;
36− };
3725 python27 = import ./2.7-text.nix {
3826 inherit stdenv fetchurl lib;
3927 };
pkgs/top-level/all-packages.nix−7
@@ -6331,7 +6331,6 @@ with pkgs;
63316331 python2Full = python2.override{x11Support=true;};
63326332 python27Full = python27.override{x11Support=true;};
63336333 python3Full = python3.override{x11Support=true;};
6334− python33Full = python33.override{x11Support=true;};
63356334 python34Full = python34.override{x11Support=true;};
63366335 python35Full = python35.override{x11Support=true;};
63376336 python36Full = python36.override{x11Support=true;};
@@ -6345,10 +6344,6 @@ with pkgs;
63456344 self = python27;
63466345 inherit (darwin) CF configd;
63476346 };
6348− python33 = callPackage ../development/interpreters/python/cpython/3.3 {
6349− self = python33;
6350− inherit (darwin) CF configd;
6351− };
63526347 python34 = callPackage ../development/interpreters/python/cpython/3.4 {
63536348 inherit (darwin) CF configd;
63546349 self = python34;
@@ -10914,8 +10909,6 @@ with pkgs;
1091410909
1091510910 python27Packages = lib.hiPrioSet (recurseIntoAttrs python27.pkgs);
1091610911
10917− python33Packages = python33.pkgs;
10918−
1091910912 python34Packages = python34.pkgs;
1092010913
1092110914 python35Packages = python35.pkgs;