Merge pull request #205329 from dotlambda/python2Packages-remove
This commit is contained in:
commit
151aba4b26
23 changed files with 6 additions and 748 deletions
|
@ -7,7 +7,6 @@
|
|||
, glib
|
||||
, gtk3
|
||||
, libnotify
|
||||
, scandir ? null
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
|
@ -37,7 +36,6 @@ python3Packages.buildPythonApplication rec {
|
|||
chardet
|
||||
pygobject3
|
||||
requests
|
||||
scandir
|
||||
];
|
||||
|
||||
# Patch the many hardcoded uses of /usr/share/ and /usr/bin
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
, lib
|
||||
, fetchPypi
|
||||
, buildPythonPackage
|
||||
, isPy3k
|
||||
, python
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "docutils";
|
||||
version = "0.19";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
|
@ -18,7 +21,7 @@ buildPythonPackage rec {
|
|||
|
||||
# Only Darwin needs LANG, but we could set it in general.
|
||||
# It's done here conditionally to prevent mass-rebuilds.
|
||||
checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin) ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + ''
|
||||
checkPhase = lib.optionalString stdenv.isDarwin ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + ''
|
||||
${python.interpreter} test/alltests.py
|
||||
'';
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
, setuptools
|
||||
, six
|
||||
, appdirs
|
||||
, scandir ? null
|
||||
, backports_os ? null
|
||||
, typing ? null
|
||||
, pytz
|
||||
|
@ -36,7 +35,6 @@ buildPythonPackage rec {
|
|||
propagatedBuildInputs = [ six appdirs pytz setuptools ]
|
||||
++ lib.optionals (!isPy3k) [ backports_os ]
|
||||
++ lib.optionals (!pythonAtLeast "3.6") [ typing ]
|
||||
++ lib.optionals (!pythonAtLeast "3.5") [ scandir ]
|
||||
++ lib.optionals (!pythonAtLeast "3.5") [ enum34 ];
|
||||
|
||||
LC_ALL="en_US.utf-8";
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
, fetchPypi
|
||||
, six
|
||||
, pythonOlder
|
||||
, scandir ? null
|
||||
, glibcLocales
|
||||
, mock
|
||||
, typing
|
||||
|
@ -19,7 +18,7 @@ buildPythonPackage rec {
|
|||
};
|
||||
|
||||
propagatedBuildInputs = [ six ]
|
||||
++ lib.optionals (pythonOlder "3.5") [ scandir typing ];
|
||||
++ lib.optionals (pythonOlder "3.5") [ typing ];
|
||||
checkInputs = [ glibcLocales ]
|
||||
++ lib.optional (pythonOlder "3.3") mock;
|
||||
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchpatch
|
||||
, docutils
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Pygments";
|
||||
version = "2.5.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "CVE-2021-27291.patch";
|
||||
url = "https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14.patch";
|
||||
sha256 = "0ap7jgkmvkkzijabsgnfrwl376cjsxa4jmzvqysrkwpjq3q4rxpa";
|
||||
excludes = ["CHANGES"];
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ docutils ];
|
||||
|
||||
# Circular dependency with sphinx
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
homepage = "https://pygments.org/";
|
||||
description = "A generic syntax highlighter";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
};
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, botocore
|
||||
, jmespath
|
||||
, s3transfer
|
||||
, futures ? null
|
||||
, docutils
|
||||
, nose
|
||||
, mock
|
||||
, isPy3k
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "boto3";
|
||||
version = "1.17.97"; # N.B: if you change this, change botocore and awscli to a matching version
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0ab5afc51461c30f27aebef944211d16f47697b98ff8d2e2f6e49e59584853bb";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ];
|
||||
checkInputs = [ docutils nose mock ];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
# This method is not in mock. It might have appeared in some versions.
|
||||
sed -i 's/action.assert_called_once()/self.assertEqual(action.call_count, 1)/' \
|
||||
tests/unit/resources/test_factory.py
|
||||
nosetests -d tests/unit --verbose
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
# Network access
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "boto3" ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/boto/boto3";
|
||||
license = lib.licenses.asl20;
|
||||
description = "AWS SDK for Python";
|
||||
longDescription = ''
|
||||
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for
|
||||
Python, which allows Python developers to write software that makes use of
|
||||
services like Amazon S3 and Amazon EC2.
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, python-dateutil
|
||||
, jmespath
|
||||
, docutils
|
||||
, simplejson
|
||||
, mock
|
||||
, nose
|
||||
, urllib3
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "botocore";
|
||||
version = "1.20.97"; # N.B: if you change this, change boto3 and awscli to a matching version
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "f7e119cf3e0f4a36100f0e983583afa91a84fb27c479a1716820aee4f2e190ab";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python-dateutil
|
||||
jmespath
|
||||
docutils
|
||||
simplejson
|
||||
urllib3
|
||||
];
|
||||
|
||||
checkInputs = [ mock nose ];
|
||||
|
||||
checkPhase = ''
|
||||
nosetests -v
|
||||
'';
|
||||
|
||||
# Network access
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "botocore" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/boto/botocore";
|
||||
license = licenses.asl20;
|
||||
description = "A low-level interface to a growing number of Amazon Web Services";
|
||||
};
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
{ lib
|
||||
, fetchPypi
|
||||
, buildPythonPackage
|
||||
, python3
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (python3.pkgs) certifi;
|
||||
|
||||
in buildPythonPackage rec {
|
||||
pname = "certifi";
|
||||
version = "2019.11.28";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
cp ${certifi.src}/certifi/cacert.pem certifi/cacert.pem
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "certifi" ];
|
||||
|
||||
# no tests implemented
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/certifi/python-certifi";
|
||||
description = "Python package for providing Mozilla's CA Bundle";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ ]; # NixOps team
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, fetchpatch
|
||||
, pytest, pytest-runner, hypothesis }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "chardet";
|
||||
version = "3.0.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Add pytest 4 support. See: https://github.com/chardet/chardet/pull/174
|
||||
(fetchpatch {
|
||||
url = "https://github.com/chardet/chardet/commit/0561ddcedcd12ea1f98b7ddedb93686ed8a5ffa4.patch";
|
||||
sha256 = "1y1xhjf32rdhq9sfz58pghwv794f3w2f2qcn8p6hp4pc8jsdrn2q";
|
||||
})
|
||||
];
|
||||
|
||||
checkInputs = [ pytest pytest-runner hypothesis ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/chardet/chardet";
|
||||
description = "Universal encoding detector";
|
||||
license = licenses.lgpl2;
|
||||
maintainers = with maintainers; [ domenkozar ];
|
||||
};
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, pytz
|
||||
, gflags
|
||||
, python-dateutil
|
||||
, mox
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-apputils";
|
||||
version = "0.4.2";
|
||||
disabled = isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0afw0gxmh0yw5g7xsmw49gs8bbp0zyhbh6fr1b0h48f3a439v5a7";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
sed -i '/ez_setup/d' setup.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ pytz gflags python-dateutil mox ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.executable} setup.py google_test
|
||||
'';
|
||||
|
||||
# ERROR:root:Trying to access flag test_tmpdir before flags were parsed.
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Google Application Utilities for Python";
|
||||
homepage = "https://github.com/google/google-apputils";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ SuperSandro2000 ];
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, marisa, swig
|
||||
, isPy3k
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "marisa";
|
||||
version = "1.3.40";
|
||||
|
||||
disabled = isPy3k;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "s-yata";
|
||||
repo = "marisa-trie";
|
||||
rev = "8dba9850b89d7828ebf33b8ab84df2b54d31260b";
|
||||
sha256 = "0pkp9fggk53lxlicfwrskgx33qplc4v6njbavlnz4x4z63zd4933";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ swig marisa ];
|
||||
buildInputs = [ marisa ];
|
||||
|
||||
sourceRoot = "${src.name}/bindings/python";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python binding for marisa package (do not confuse with marisa-trie python bindings)";
|
||||
homepage = "https://github.com/s-yata/marisa-trie";
|
||||
license = with licenses; [ bsd2 lgpl2 ];
|
||||
maintainers = with maintainers; [ vanzef ];
|
||||
};
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
{ buildPackages
|
||||
, lib
|
||||
, fetchpatch
|
||||
, python
|
||||
, buildPythonPackage
|
||||
, isPy37
|
||||
, protobuf
|
||||
, google-apputils ? null
|
||||
, six
|
||||
, pyext
|
||||
, isPy27
|
||||
, disabled
|
||||
, doCheck ? true
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
inherit (protobuf) pname src version;
|
||||
inherit disabled;
|
||||
doCheck = doCheck && !isPy27; # setuptools>=41.4 no longer collects correctly on python2
|
||||
|
||||
propagatedBuildInputs = [ six ] ++ lib.optionals isPy27 [ google-apputils ];
|
||||
propagatedNativeBuildInputs = [ buildPackages.protobuf ]; # For protoc.
|
||||
nativeBuildInputs = [ pyext ] ++ lib.optionals isPy27 [ google-apputils ];
|
||||
buildInputs = [ protobuf ];
|
||||
|
||||
patches = lib.optional (isPy37 && (lib.versionOlder protobuf.version "3.6.1.2"))
|
||||
# Python 3.7 compatibility (not needed for protobuf >= 3.6.1.2)
|
||||
(fetchpatch {
|
||||
url = "https://github.com/protocolbuffers/protobuf/commit/0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7.patch";
|
||||
sha256 = "09hw22y3423v8bbmc9xm07znwdxfbya6rp78d4zqw6fisdvjkqf1";
|
||||
stripLen = 1;
|
||||
})
|
||||
;
|
||||
|
||||
prePatch = ''
|
||||
while [ ! -d python ]; do
|
||||
cd *
|
||||
done
|
||||
cd python
|
||||
'';
|
||||
|
||||
setupPyGlobalFlags = lib.optional (lib.versionAtLeast protobuf.version "2.6.0")
|
||||
"--cpp_implementation";
|
||||
|
||||
pythonImportsCheck = [
|
||||
"google.protobuf"
|
||||
] ++ lib.optionals (lib.versionAtLeast protobuf.version "2.6.0") [
|
||||
"google.protobuf.internal._api_implementation" # Verify that --cpp_implementation worked
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Protocol Buffers are Google's data interchange format";
|
||||
homepage = "https://developers.google.com/protocol-buffers/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ knedlsepp ];
|
||||
};
|
||||
|
||||
passthru.protobuf = protobuf;
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{ lib, buildPythonPackage, fetchPypi
|
||||
, docutils, pygments, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyroma";
|
||||
version = "2.6.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "2527423e3a24ccd56951f3ce1b0ebbcc4fa0518c82fca882e696c78726ab9c2f";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "pygments < 2.6" "pygments"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ docutils pygments setuptools ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Test your project's packaging friendliness";
|
||||
homepage = "https://github.com/regebro/pyroma";
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
{ lib, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, pkgs
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pysqlite";
|
||||
version = "2.8.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "17d3335863e8cf8392eea71add33dab3f96d060666fe68ab7382469d307f4490";
|
||||
};
|
||||
|
||||
# Need to use the builtin sqlite3 on Python 3
|
||||
disabled = isPy3k;
|
||||
|
||||
# Since the `.egg' file is zipped, the `NEEDED' of the `.so' files
|
||||
# it contains is not taken into account. Thus, we must explicitly make
|
||||
# it a propagated input.
|
||||
propagatedBuildInputs = [ pkgs.sqlite ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace "setup.cfg" \
|
||||
--replace "/usr/local/include" "${pkgs.sqlite.dev}/include" \
|
||||
--replace "/usr/local/lib" "${pkgs.sqlite.out}/lib"
|
||||
${lib.optionalString (!stdenv.isDarwin) ''export LDSHARED="$CC -pthread -shared"''}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pysqlite.org/";
|
||||
description = "Python bindings for the SQLite embedded relational database engine";
|
||||
longDescription = ''
|
||||
pysqlite is a DB-API 2.0-compliant database interface for SQLite.
|
||||
|
||||
SQLite is a relational database management system contained in
|
||||
a relatively small C library. It is a public domain project
|
||||
created by D. Richard Hipp. Unlike the usual client-server
|
||||
paradigm, the SQLite engine is not a standalone process with
|
||||
which the program communicates, but is linked in and thus
|
||||
becomes an integral part of the program. The library
|
||||
implements most of SQL-92 standard, including transactions,
|
||||
triggers and most of complex queries.
|
||||
|
||||
pysqlite makes this powerful embedded SQL engine available to
|
||||
Python programmers. It stays compatible with the Python
|
||||
database API specification 2.0 as much as possible, but also
|
||||
exposes most of SQLite's native API, so that it is for example
|
||||
possible to create user-defined SQL functions and aggregates
|
||||
in Python.
|
||||
'';
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, setuptools-scm, pytest }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytest-runner";
|
||||
version = "5.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "96c7e73ead7b93e388c5d614770d2bae6526efd997757d3543fe17b557a0942b";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm pytest ];
|
||||
|
||||
postPatch = ''
|
||||
rm pytest.ini
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
py.test tests
|
||||
'';
|
||||
|
||||
# Fixture not found
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Invoke py.test as distutils command with dependency resolution";
|
||||
homepage = "https://github.com/pytest-dev/pytest-runner";
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
{ lib
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, buildPythonPackage
|
||||
, docutils
|
||||
, mock
|
||||
, nose
|
||||
, coverage
|
||||
, wheel
|
||||
, unittest2
|
||||
, botocore
|
||||
, futures ? null
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "s3transfer";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-ywIvSxZVHt67sxo3fT8JYA262nNj2MXbeXbn9Hcy4bI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs =
|
||||
[
|
||||
botocore
|
||||
] ++ lib.optional (pythonOlder "3") futures;
|
||||
|
||||
buildInputs = [
|
||||
docutils
|
||||
mock
|
||||
nose
|
||||
coverage
|
||||
wheel
|
||||
unittest2
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
pushd s3transfer/tests
|
||||
nosetests -v unit/ functional/
|
||||
popd
|
||||
'';
|
||||
|
||||
# version on pypi has no tests/ dir
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/boto/s3transfer";
|
||||
license = licenses.asl20;
|
||||
description = "A library for managing Amazon S3 transfers";
|
||||
};
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
diff --git a/scandir.py b/scandir.py
|
||||
index 3f602fb..40af3e5 100644
|
||||
--- a/scandir.py
|
||||
+++ b/scandir.py
|
||||
@@ -23,6 +23,7 @@ from os import listdir, lstat, stat, strerror
|
||||
from os.path import join, islink
|
||||
from stat import S_IFDIR, S_IFLNK, S_IFREG
|
||||
import collections
|
||||
+import platform
|
||||
import sys
|
||||
|
||||
try:
|
||||
@@ -432,6 +433,15 @@ elif sys.platform.startswith(('linux', 'darwin', 'sunos5')) or 'bsd' in sys.plat
|
||||
('__d_padding', ctypes.c_uint8 * 4),
|
||||
('d_name', ctypes.c_char * 256),
|
||||
)
|
||||
+ elif 'darwin' in sys.platform and 'arm64' in platform.machine():
|
||||
+ _fields_ = (
|
||||
+ ('d_ino', ctypes.c_uint64),
|
||||
+ ('d_off', ctypes.c_uint64),
|
||||
+ ('d_reclen', ctypes.c_uint16),
|
||||
+ ('d_namlen', ctypes.c_uint16),
|
||||
+ ('d_type', ctypes.c_uint8),
|
||||
+ ('d_name', ctypes.c_char * 1024),
|
||||
+ )
|
||||
else:
|
||||
_fields_ = (
|
||||
('d_ino', ctypes.c_uint32), # must be uint32, not ulong
|
|
@ -1,24 +0,0 @@
|
|||
{ lib, python, buildPythonPackage, fetchPypi }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "scandir";
|
||||
version = "1.10.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./add-aarch64-darwin-dirent.patch
|
||||
];
|
||||
|
||||
checkPhase = "${python.interpreter} test/run_tests.py";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A better directory iterator and faster os.walk()";
|
||||
homepage = "https://github.com/benhoyt/scandir";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytest
|
||||
, simplejson
|
||||
, mock
|
||||
, glibcLocales
|
||||
, html5lib
|
||||
, pythonOlder
|
||||
, enum34
|
||||
, python
|
||||
, docutils
|
||||
, jinja2
|
||||
, pygments
|
||||
, alabaster
|
||||
, babel
|
||||
, snowballstemmer
|
||||
, six
|
||||
, sqlalchemy
|
||||
, whoosh
|
||||
, imagesize
|
||||
, requests
|
||||
, typing
|
||||
, sphinxcontrib-websupport
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sphinx";
|
||||
version = "1.8.5";
|
||||
src = fetchPypi {
|
||||
pname = "Sphinx";
|
||||
inherit version;
|
||||
sha256 = "c7658aab75c920288a8cf6f09f244c6cfdae30d82d803ac1634d9f223a80ca08";
|
||||
};
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
buildInputs = [ simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34;
|
||||
# Disable two tests that require network access.
|
||||
checkPhase = ''
|
||||
cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored'
|
||||
'';
|
||||
propagatedBuildInputs = [
|
||||
docutils
|
||||
jinja2
|
||||
pygments
|
||||
alabaster
|
||||
babel
|
||||
setuptools
|
||||
snowballstemmer
|
||||
six
|
||||
sphinxcontrib-websupport
|
||||
sqlalchemy
|
||||
whoosh
|
||||
imagesize
|
||||
requests
|
||||
] ++ lib.optional (pythonOlder "3.5") typing;
|
||||
|
||||
# Lots of tests. Needs network as well at some point.
|
||||
doCheck = false;
|
||||
|
||||
patches = [
|
||||
# Since pygments 2.5, PythonLexer refers to python3. If we want to use
|
||||
# python2, we need to explicitly specify Python2Lexer.
|
||||
# Not upstreamed since there doesn't seem to be any upstream maintenance
|
||||
# branch for 1.8 (and this patch doesn't make any sense for 2.x).
|
||||
./python2-lexer.patch
|
||||
];
|
||||
# https://github.com/NixOS/nixpkgs/issues/22501
|
||||
# Do not run `python sphinx-build arguments` but `sphinx-build arguments`.
|
||||
postPatch = ''
|
||||
substituteInPlace sphinx/make_mode.py --replace "sys.executable, " ""
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects";
|
||||
homepage = "http://sphinx.pocoo.org/";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
|
||||
index ac2bd1b06..63ca52de2 100644
|
||||
--- a/sphinx/highlighting.py
|
||||
+++ b/sphinx/highlighting.py
|
||||
@@ -16,7 +16,7 @@ from pygments.filters import ErrorToken
|
||||
from pygments.formatters import HtmlFormatter, LatexFormatter
|
||||
from pygments.lexer import Lexer # NOQA
|
||||
from pygments.lexers import get_lexer_by_name, guess_lexer
|
||||
-from pygments.lexers import PythonLexer, Python3Lexer, PythonConsoleLexer, \
|
||||
+from pygments.lexers import Python2Lexer, Python3Lexer, PythonConsoleLexer, \
|
||||
CLexer, TextLexer, RstLexer
|
||||
from pygments.styles import get_style_by_name
|
||||
from pygments.util import ClassNotFound
|
||||
@@ -40,7 +40,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
lexers = dict(
|
||||
none = TextLexer(stripnl=False),
|
||||
- python = PythonLexer(stripnl=False),
|
||||
+ python = Python2Lexer(stripnl=False),
|
||||
python3 = Python3Lexer(stripnl=False),
|
||||
pycon = PythonConsoleLexer(stripnl=False),
|
||||
pycon3 = PythonConsoleLexer(python3=True, stripnl=False),
|
|
@ -1,25 +0,0 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, six
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sphinxcontrib-websupport";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1501befb0fdf1d1c29a800fdbf4ef5dc5369377300ddbdd16d2cd40e54c6eefc";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ six ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Sphinx API for Web Apps";
|
||||
homepage = "http://sphinx-doc.org/";
|
||||
license = lib.licenses.bsd2;
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, isPyPy, unittestCheckHook
|
||||
, pythonAtLeast }:
|
||||
|
||||
let
|
||||
testDir = if isPy3k then "src" else "python2";
|
||||
|
||||
in buildPythonPackage rec {
|
||||
pname = "typing";
|
||||
version = "3.10.0.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "13b4ad211f54ddbf93e5901a9967b1e07720c1d1b78d596ac6a439641aa1b130";
|
||||
};
|
||||
|
||||
disabled = pythonAtLeast "3.5";
|
||||
|
||||
# Error for Python3.6: ImportError: cannot import name 'ann_module'
|
||||
# See https://github.com/python/typing/pull/280
|
||||
# Also, don't bother on PyPy: AssertionError: TypeError not raised
|
||||
doCheck = pythonOlder "3.6" && !isPyPy;
|
||||
|
||||
checkInputs = [ unittestCheckHook ];
|
||||
|
||||
unittestFlagsArray = [ "-s" testDir ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Backport of typing module to Python versions older than 3.5";
|
||||
homepage = "https://docs.python.org/3/library/typing.html";
|
||||
license = licenses.psfl;
|
||||
};
|
||||
}
|
|
@ -9,14 +9,6 @@ with self; with super; {
|
|||
|
||||
bootstrapped-pip = toPythonModule (callPackage ../development/python2-modules/bootstrapped-pip { });
|
||||
|
||||
boto3 = callPackage ../development/python2-modules/boto3 {};
|
||||
|
||||
botocore = callPackage ../development/python2-modules/botocore {};
|
||||
|
||||
certifi = callPackage ../development/python2-modules/certifi { };
|
||||
|
||||
chardet = callPackage ../development/python2-modules/chardet { };
|
||||
|
||||
configparser = callPackage ../development/python2-modules/configparser { };
|
||||
|
||||
contextlib2 = callPackage ../development/python2-modules/contextlib2 { };
|
||||
|
@ -29,8 +21,6 @@ with self; with super; {
|
|||
|
||||
futures = callPackage ../development/python2-modules/futures { };
|
||||
|
||||
google-apputils = callPackage ../development/python2-modules/google-apputils { };
|
||||
|
||||
gtkme = callPackage ../development/python2-modules/gtkme { };
|
||||
|
||||
hypothesis = callPackage ../development/python2-modules/hypothesis { };
|
||||
|
@ -41,10 +31,6 @@ with self; with super; {
|
|||
|
||||
jinja2 = callPackage ../development/python2-modules/jinja2 { };
|
||||
|
||||
marisa = callPackage ../development/python2-modules/marisa {
|
||||
inherit (pkgs) marisa;
|
||||
};
|
||||
|
||||
markupsafe = callPackage ../development/python2-modules/markupsafe { };
|
||||
|
||||
mock = callPackage ../development/python2-modules/mock { };
|
||||
|
@ -57,17 +43,10 @@ with self; with super; {
|
|||
|
||||
pluggy = callPackage ../development/python2-modules/pluggy { };
|
||||
|
||||
protobuf = callPackage ../development/python2-modules/protobuf {
|
||||
disabled = isPyPy;
|
||||
protobuf = pkgs.protobuf3_17; # last version compatible with Python 2
|
||||
};
|
||||
|
||||
pycairo = callPackage ../development/python2-modules/pycairo {
|
||||
inherit (pkgs.buildPackages) meson;
|
||||
};
|
||||
|
||||
pygments = callPackage ../development/python2-modules/Pygments { };
|
||||
|
||||
pygobject3 = callPackage ../development/python2-modules/pygobject {
|
||||
inherit (pkgs) meson;
|
||||
};
|
||||
|
@ -76,10 +55,6 @@ with self; with super; {
|
|||
|
||||
pyparsing = callPackage ../development/python2-modules/pyparsing { };
|
||||
|
||||
pyroma = callPackage ../development/python2-modules/pyroma { };
|
||||
|
||||
pysqlite = callPackage ../development/python2-modules/pysqlite { };
|
||||
|
||||
pytest = pytest_4;
|
||||
|
||||
pytest_4 = callPackage
|
||||
|
@ -90,8 +65,6 @@ with self; with super; {
|
|||
};
|
||||
};
|
||||
|
||||
pytest-runner = callPackage ../development/python2-modules/pytest-runner { };
|
||||
|
||||
pytest-xdist = callPackage ../development/python2-modules/pytest-xdist { };
|
||||
|
||||
recoll = disabled super.recoll;
|
||||
|
@ -100,22 +73,12 @@ with self; with super; {
|
|||
|
||||
rpm = disabled super.rpm;
|
||||
|
||||
s3transfer = callPackage ../development/python2-modules/s3transfer { };
|
||||
|
||||
scandir = callPackage ../development/python2-modules/scandir { };
|
||||
|
||||
sequoia = disabled super.sequoia;
|
||||
|
||||
setuptools = callPackage ../development/python2-modules/setuptools { };
|
||||
|
||||
setuptools-scm = callPackage ../development/python2-modules/setuptools-scm { };
|
||||
|
||||
sphinxcontrib-websupport = callPackage ../development/python2-modules/sphinxcontrib-websupport { };
|
||||
|
||||
sphinx = callPackage ../development/python2-modules/sphinx { };
|
||||
|
||||
typing = callPackage ../development/python2-modules/typing { };
|
||||
|
||||
zeek = disabled super.zeek;
|
||||
|
||||
zipp = callPackage ../development/python2-modules/zipp { };
|
||||
|
|
Loading…
Reference in a new issue