Merge pull request #273666 from adisbladis/setupcfg2nix-removal

python3.pkgs.buildsetupcfg: Remove
This commit is contained in:
Frederik Rietdijk 2023-12-12 08:04:52 +01:00 committed by GitHub
commit 2feabab3d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1 additions and 59 deletions

View file

@ -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 []);
}

View file

@ -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

View file

@ -1,19 +0,0 @@
{ buildSetupcfg, fetchFromGitHub, lib }:
buildSetupcfg rec {
info = import ./info.nix;
src = fetchFromGitHub {
owner = "target";
repo = "setupcfg2nix";
rev = info.version;
sha256 = "1rj227vxybwp9acwnpwg9np964b1qcw2av3qmx00isnrw5vcps8m";
};
application = true;
meta = {
description = "Generate nix expressions from setup.cfg for a python package";
homepage = "https://github.com/target/setupcfg2nix";
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.shlevy ];
};
}

View file

@ -1,7 +0,0 @@
{
pname = "setupcfg2nix";
version = "2.0.1";
install_requires = [
"setuptools"
];
}

View file

@ -859,6 +859,7 @@ mapAliases ({
sdlmame = throw "'sdlmame' has been renamed to/replaced by 'mame'"; # Converted to throw 2023-09-10
searx = throw "'searx' has been removed as it is unmaintained. Please switch to searxng"; # Added 2023-10-03
session-desktop-appimage = session-desktop;
setupcfg2nix = throw "'setupcfg2nix' has been removed. Please switch to buildPythonPackage"; # Added 2023-12-12
sequoia = sequoia-sq; # Added 2023-06-26
sexp = sexpp; # Added 2023-07-03
sget = throw "sget has been removed from nixpkgs, as it is not supported upstream anymore see https://github.com/sigstore/sget/issues/145"; # Added 2023-05-26

View file

@ -17934,8 +17934,6 @@ with pkgs;
pypi-mirror = callPackage ../development/tools/pypi-mirror { };
setupcfg2nix = python3Packages.callPackage ../development/tools/setupcfg2nix { };
svg2tikz = with python3.pkgs; toPythonApplication svg2tikz;
svg2pdf = callPackage ../tools/graphics/svg2pdf { };