This adds a test to ensure no new uses of `buildPythonApplication` can be added to `python-packages.nix`. Python packages can be grouped into two groups: 1) applications and 2) packages providing importable modules. In `python-packages.nix` we only want to have 2). 1) should be in the top-level package set. To achieve this, all setup hooks need to be marked as being a setup hook. For the setup hooks in the Python packages set this is done by creating a new builder, `makePythonHook`. Because there were issues with splicing, the file importing all the hooks is converted to an extension. All non-packages were moved out of `python-packages.nix` into `python-packages-base.nix`. The `keep` argument to `makeScopeWithSplicing was cleaned up as well; there is no need to keep this one manually in sync reducing the risk of breaking cross-compilation.
149 lines
4.7 KiB
Nix
149 lines
4.7 KiB
Nix
# Extension with Python 2 packages that is overlayed on top
|
|
# of the Python 3 packages set. This way, Python 2+3 compatible
|
|
# packages can still be used.
|
|
|
|
self: super:
|
|
|
|
with self; with super; {
|
|
attrs = callPackage ../development/python2-modules/attrs { };
|
|
|
|
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 { };
|
|
|
|
cheetah = callPackage ../development/python2-modules/cheetah { };
|
|
|
|
configparser = callPackage ../development/python2-modules/configparser { };
|
|
|
|
construct = callPackage ../development/python2-modules/construct { };
|
|
|
|
contextlib2 = callPackage ../development/python2-modules/contextlib2 { };
|
|
|
|
coverage = callPackage ../development/python2-modules/coverage { };
|
|
|
|
enum = callPackage ../development/python2-modules/enum { };
|
|
|
|
filelock = callPackage ../development/python2-modules/filelock { };
|
|
|
|
futures = callPackage ../development/python2-modules/futures { };
|
|
|
|
google-apputils = callPackage ../development/python2-modules/google-apputils { };
|
|
|
|
gtkme = callPackage ../development/python2-modules/gtkme { };
|
|
|
|
httpretty = callPackage ../development/python2-modules/httpretty { };
|
|
|
|
hypothesis = callPackage ../development/python2-modules/hypothesis { };
|
|
|
|
idna = callPackage ../development/python2-modules/idna { };
|
|
|
|
importlib-metadata = callPackage ../development/python2-modules/importlib-metadata { };
|
|
|
|
jinja2 = callPackage ../development/python2-modules/jinja2 { };
|
|
|
|
marisa = callPackage ../development/python2-modules/marisa {
|
|
inherit (pkgs) marisa;
|
|
};
|
|
|
|
markdown = callPackage ../development/python2-modules/markdown { };
|
|
|
|
markupsafe = callPackage ../development/python2-modules/markupsafe { };
|
|
|
|
mock = callPackage ../development/python2-modules/mock { };
|
|
|
|
more-itertools = callPackage ../development/python2-modules/more-itertools { };
|
|
|
|
mutagen = callPackage ../development/python2-modules/mutagen { };
|
|
|
|
numpy = callPackage ../development/python2-modules/numpy { };
|
|
|
|
packaging = callPackage ../development/python2-modules/packaging { };
|
|
|
|
pillow = callPackage ../development/python2-modules/pillow {
|
|
inherit (pkgs) freetype libjpeg zlib libtiff libwebp tcl lcms2 tk;
|
|
inherit (pkgs.xorg) libX11;
|
|
};
|
|
|
|
pip = callPackage ../development/python2-modules/pip { };
|
|
|
|
pluggy = callPackage ../development/python2-modules/pluggy { };
|
|
|
|
prettytable = callPackage ../development/python2-modules/prettytable { };
|
|
|
|
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;
|
|
};
|
|
|
|
pygtk = callPackage ../development/python2-modules/pygtk { };
|
|
|
|
pyparsing = callPackage ../development/python2-modules/pyparsing { };
|
|
|
|
pyroma = callPackage ../development/python2-modules/pyroma { };
|
|
|
|
pysqlite = callPackage ../development/python2-modules/pysqlite { };
|
|
|
|
pytest = pytest_4;
|
|
|
|
pytest_4 = callPackage
|
|
../development/python2-modules/pytest {
|
|
# hypothesis tests require pytest that causes dependency cycle
|
|
hypothesis = self.hypothesis.override {
|
|
doCheck = false;
|
|
};
|
|
};
|
|
|
|
pytest-runner = callPackage ../development/python2-modules/pytest-runner { };
|
|
|
|
pytest-xdist = callPackage ../development/python2-modules/pytest-xdist { };
|
|
|
|
pyyaml = callPackage ../development/python2-modules/pyyaml { };
|
|
|
|
qpid-python = callPackage ../development/python2-modules/qpid-python { };
|
|
|
|
recoll = disabled super.recoll;
|
|
|
|
rivet = disabled super.rivet;
|
|
|
|
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 { };
|
|
|
|
TurboCheetah = callPackage ../development/python2-modules/TurboCheetah { };
|
|
|
|
typing = callPackage ../development/python2-modules/typing { };
|
|
|
|
zeek = disabled super.zeek;
|
|
|
|
zipp = callPackage ../development/python2-modules/zipp { };
|
|
|
|
}
|