diff --git a/pkgs/build-support/build-setupcfg/default.nix b/pkgs/build-support/build-setupcfg/default.nix deleted file mode 100644 index 5737989249af..000000000000 --- a/pkgs/build-support/build-setupcfg/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -# Build a python package from info made available by setupcfg2nix. -# -# * src: The source of the package. -# * info: The package information generated by setupcfg2nix. -# * meta: Standard nixpkgs metadata. -# * application: Whether this package is a python library or an -# application which happens to be written in python. -# * doCheck: Whether to run the test suites. -lib: pythonPackages: -{ src, info, meta ? {}, application ? false, doCheck ? true}: let - build = if application - then pythonPackages.buildPythonApplication - else pythonPackages.buildPythonPackage; -in build { - inherit (info) pname version; - - inherit src meta doCheck; - - nativeBuildInputs = map (p: pythonPackages.${p}) ( - (info.setup_requires or []) ++ - (lib.optionals doCheck (info.tests_require or [])) - ); - - propagatedBuildInputs = map (p: pythonPackages.${p}) - (info.install_requires or []); -} diff --git a/pkgs/development/interpreters/python/python-packages-base.nix b/pkgs/development/interpreters/python/python-packages-base.nix index b5afaf34ce61..2126b796ca9d 100644 --- a/pkgs/development/interpreters/python/python-packages-base.nix +++ b/pkgs/development/interpreters/python/python-packages-base.nix @@ -47,9 +47,6 @@ let toPythonModule = x: x; # Application does not provide modules. })); - # See build-setupcfg/default.nix for documentation. - buildSetupcfg = import ../../../build-support/build-setupcfg lib self; - # Check whether a derivation provides a Python module. hasPythonModule = drv: drv?pythonModule && drv.pythonModule == python; @@ -92,13 +89,11 @@ let disabledIf = x: drv: if x then disabled drv else drv; in { - inherit lib pkgs stdenv; inherit (python.passthru) isPy27 isPy37 isPy38 isPy39 isPy310 isPy311 isPy3k isPyPy pythonAtLeast pythonOlder; inherit buildPythonPackage buildPythonApplication; inherit hasPythonModule requiredPythonModules makePythonPath disabled disabledIf; inherit toPythonModule toPythonApplication; - inherit buildSetupcfg; python = toPythonModule python; # Dont take pythonPackages from "global" pkgs scope to avoid mixing python versions diff --git a/pkgs/development/tools/setupcfg2nix/default.nix b/pkgs/development/tools/setupcfg2nix/default.nix index 4cc1ec320ccd..f57e83db5551 100644 --- a/pkgs/development/tools/setupcfg2nix/default.nix +++ b/pkgs/development/tools/setupcfg2nix/default.nix @@ -1,14 +1,17 @@ -{ buildSetupcfg, fetchFromGitHub, lib }: +{ buildPythonApplication, fetchFromGitHub, lib, setuptools }: + +buildPythonApplication rec { + pname = "setupcfg2nix"; + version = "2.0.1"; + format = "setuptools"; -buildSetupcfg rec { - info = import ./info.nix; src = fetchFromGitHub { owner = "target"; repo = "setupcfg2nix"; - rev = info.version; + rev = version; sha256 = "1rj227vxybwp9acwnpwg9np964b1qcw2av3qmx00isnrw5vcps8m"; }; - application = true; + meta = { description = "Generate nix expressions from setup.cfg for a python package"; homepage = "https://github.com/target/setupcfg2nix"; diff --git a/pkgs/development/tools/setupcfg2nix/info.nix b/pkgs/development/tools/setupcfg2nix/info.nix deleted file mode 100644 index 17e888fee416..000000000000 --- a/pkgs/development/tools/setupcfg2nix/info.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - pname = "setupcfg2nix"; - version = "2.0.1"; - install_requires = [ - "setuptools" - ]; -}