python: remove isPy33, isPy34

This commit is contained in:
Pavol Rusnak 2020-05-04 20:32:01 +02:00 committed by Jon
parent 3dca1ffee8
commit 420124adf8
13 changed files with 18 additions and 31 deletions

View file

@ -23,8 +23,6 @@ with pkgs;
}; };
in rec { in rec {
isPy27 = pythonVersion == "2.7"; isPy27 = pythonVersion == "2.7";
isPy33 = pythonVersion == "3.3"; # TODO: remove
isPy34 = pythonVersion == "3.4"; # TODO: remove
isPy35 = pythonVersion == "3.5"; isPy35 = pythonVersion == "3.5";
isPy36 = pythonVersion == "3.6"; isPy36 = pythonVersion == "3.6";
isPy37 = pythonVersion == "3.7"; isPy37 = pythonVersion == "3.7";

View file

@ -1,5 +1,5 @@
{ lib, buildPythonPackage, fetchPypi { lib, buildPythonPackage, fetchPypi
, isPy27, isPy34 , isPy27
, pylev, pastel, typing, enum34 }: , pylev, pastel, typing, enum34 }:
buildPythonPackage rec { buildPythonPackage rec {
@ -13,8 +13,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
pylev pastel pylev pastel
] ++ lib.optional (isPy27 || isPy34) typing ] ++ lib.optionals isPy27 [ typing enum34 ];
++ lib.optional isPy27 enum34;
# The Pypi tarball doesn't include tests, and the GitHub source isn't # The Pypi tarball doesn't include tests, and the GitHub source isn't
# buildable until we bootstrap poetry, see # buildable until we bootstrap poetry, see

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, isPy34, fetchPypi, linuxHeaders }: { lib, buildPythonPackage, fetchPypi, linuxHeaders }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "evdev"; pname = "evdev";
@ -17,8 +17,6 @@ buildPythonPackage rec {
doCheck = false; doCheck = false;
disabled = isPy34; # see http://bugs.python.org/issue21121
meta = with lib; { meta = with lib; {
description = "Provides bindings to the generic input event interface in Linux"; description = "Provides bindings to the generic input event interface in Linux";
homepage = "https://pythonhosted.org/evdev"; homepage = "https://pythonhosted.org/evdev";

View file

@ -7,7 +7,6 @@
, singledispatch , singledispatch
, futures , futures
, isPy27 , isPy27
, isPy33
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -23,8 +22,7 @@ buildPythonPackage rec {
buildInputs = [ pkgs.makeWrapper ]; buildInputs = [ pkgs.makeWrapper ];
propagatedBuildInputs = [ pkgs.rtmpdump pycrypto requests ] propagatedBuildInputs = [ pkgs.rtmpdump pycrypto requests ]
++ stdenv.lib.optionals isPy27 [ singledispatch futures ] ++ stdenv.lib.optionals isPy27 [ singledispatch futures ];
++ stdenv.lib.optionals isPy33 [ singledispatch ];
postInstall = '' postInstall = ''
wrapProgram $out/bin/livestreamer --prefix PATH : ${pkgs.rtmpdump}/bin wrapProgram $out/bin/livestreamer --prefix PATH : ${pkgs.rtmpdump}/bin

View file

@ -4,7 +4,6 @@
, python , python
, buildPythonPackage , buildPythonPackage
, isPy27 , isPy27
, isPy33
, isPy3k , isPy3k
, numpy , numpy
, llvmlite , llvmlite
@ -26,7 +25,8 @@ buildPythonPackage rec {
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
propagatedBuildInputs = [numpy llvmlite] ++ stdenv.lib.optional (!isPy3k) funcsigs ++ stdenv.lib.optional (isPy27 || isPy33) singledispatch; propagatedBuildInputs = [numpy llvmlite]
++ stdenv.lib.optionals isPy27 [ funcsigs singledispatch];
# Copy test script into $out and run the test suite. # Copy test script into $out and run the test suite.
checkPhase = '' checkPhase = ''

View file

@ -1,5 +1,6 @@
{ lib, buildPythonPackage, fetchPypi, callPackage { lib, buildPythonPackage, fetchPypi, callPackage
, isPy27, isPy34, pythonOlder , isPy27
, pythonOlder
, cleo , cleo
, requests , requests
, cachy , cachy
@ -66,8 +67,7 @@ in buildPythonPackage rec {
pexpect pexpect
keyring keyring
lockfile lockfile
] ++ lib.optionals (isPy27 || isPy34) [ typing pathlib2 glob2 ] ] ++ lib.optionals isPy27 [ typing pathlib2 glob2 virtualenv functools32 subprocess32 ]
++ lib.optionals isPy27 [ virtualenv functools32 subprocess32 ]
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
postInstall = '' postInstall = ''

View file

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, meson, ninja, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPy33, isPy3k }: { lib, fetchFromGitHub, meson, ninja, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPy3k }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pycairo"; pname = "pycairo";
@ -6,8 +6,6 @@ buildPythonPackage rec {
format = "other"; format = "other";
disabled = isPy33;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "pygobject"; owner = "pygobject";
repo = "pycairo"; repo = "pycairo";

View file

@ -1,6 +1,5 @@
{ stdenv { stdenv
, buildPythonPackage , buildPythonPackage
, isPy33
, fetchgit , fetchgit
, cython , cython
}: }:
@ -8,7 +7,6 @@
buildPythonPackage { buildPythonPackage {
pname = "rencode"; pname = "rencode";
version = "git20150810"; version = "git20150810";
disabled = isPy33;
src = fetchgit { src = fetchgit {
url = "https://github.com/aresch/rencode"; url = "https://github.com/aresch/rencode";

View file

@ -1,5 +1,5 @@
{ lib, buildPythonPackage, fetchPypi { lib, buildPythonPackage, fetchPypi
, isPy34, isPy35, isPy27 , isPy35, isPy27
, numpy, pytz, six, enum-compat, sentinel , numpy, pytz, six, enum-compat, sentinel
}: }:
@ -16,7 +16,7 @@ buildPythonPackage rec {
# This is the list of officially supported versions. Other versions may work # This is the list of officially supported versions. Other versions may work
# as well. # as well.
disabled = !(isPy35 || isPy34 || isPy27); disabled = !(isPy27 || isPy35);
# Test Phase is only supported in development sources. # Test Phase is only supported in development sources.
doCheck = false; doCheck = false;

View file

@ -4,7 +4,6 @@
, lib , lib
, python , python
, isPy27 , isPy27
, isPy33
, enum34 , enum34
, attrs , attrs
, pytz , pytz
@ -19,7 +18,7 @@ buildPythonPackage rec {
sha256 = "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"; sha256 = "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk";
}; };
propagatedBuildInputs = lib.optionals (isPy27 || isPy33) [ enum34 ]; propagatedBuildInputs = lib.optionals isPy27 [ enum34 ];
checkInputs = [ attrs pytz ]; checkInputs = [ attrs pytz ];
checkPhase = '' checkPhase = ''

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, isPy27, isPy34 { lib, buildPythonPackage, fetchPypi, isPy27
, enum34, functools32, typing , enum34, functools32, typing
}: }:
@ -13,7 +13,7 @@ buildPythonPackage rec {
propagatedBuildInputs = propagatedBuildInputs =
lib.optionals isPy27 [ enum34 functools32 ] lib.optionals isPy27 [ enum34 functools32 ]
++ lib.optional (isPy27 || isPy34) typing; ++ lib.optional isPy27 typing;
# The Pypi tarball doesn't include tests, and the GitHub source isn't # The Pypi tarball doesn't include tests, and the GitHub source isn't
# buildable until we bootstrap poetry, see # buildable until we bootstrap poetry, see

View file

@ -4,7 +4,6 @@
, python , python
, pytest , pytest
, numpy , numpy
, isPy33
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -28,7 +27,7 @@ buildPythonPackage rec {
# https://github.com/enthought/traits/issues/187 # https://github.com/enthought/traits/issues/187
# https://github.com/enthought/traits/pull/188 # https://github.com/enthought/traits/pull/188
# Furthermore, some tests fail due to being in a chroot # Furthermore, some tests fail due to being in a chroot
doCheck = isPy33; doCheck = false;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Explicitly typed attributes for Python"; description = "Explicitly typed attributes for Python";

View file

@ -18,7 +18,7 @@ let
packages = ( self: packages = ( self:
let let
inherit (python.passthru) isPy27 isPy33 isPy34 isPy35 isPy36 isPy37 isPy38 isPy39 isPy3k isPyPy pythonAtLeast pythonOlder; inherit (python.passthru) isPy27 isPy35 isPy36 isPy37 isPy38 isPy39 isPy3k isPyPy pythonAtLeast pythonOlder;
callPackage = pkgs.newScope self; callPackage = pkgs.newScope self;
@ -100,7 +100,7 @@ let
in { in {
inherit (python.passthru) isPy27 isPy33 isPy34 isPy35 isPy36 isPy37 isPy38 isPy39 isPy3k isPyPy pythonAtLeast pythonOlder; inherit (python.passthru) isPy27 isPy35 isPy36 isPy37 isPy38 isPy39 isPy3k isPyPy pythonAtLeast pythonOlder;
inherit python bootstrapped-pip buildPythonPackage buildPythonApplication; inherit python bootstrapped-pip buildPythonPackage buildPythonApplication;
inherit fetchPypi callPackage; inherit fetchPypi callPackage;
inherit hasPythonModule requiredPythonModules makePythonPath disabledIf; inherit hasPythonModule requiredPythonModules makePythonPath disabledIf;