Skip to content

Commit

Permalink
python3.pkgs.buildsetupcfg: Remove function from python-packages-base…
Browse files Browse the repository at this point in the history
….nix

This function is not, and never have been, used anywhere inside nixpkgs, outside of bootstrapping setupcfg2nix itself.
It was added in NixOS#38778 by @shlevy.

It has no out-of-tree users on Github either. External breakage is not expected.
  • Loading branch information
adisbladis authored and dansbandit committed Dec 27, 2023
1 parent 3398ad5 commit 2ab4ca7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 43 deletions.
26 changes: 0 additions & 26 deletions pkgs/build-support/build-setupcfg/default.nix

This file was deleted.

5 changes: 0 additions & 5 deletions pkgs/development/interpreters/python/python-packages-base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
13 changes: 8 additions & 5 deletions pkgs/development/tools/setupcfg2nix/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
7 changes: 0 additions & 7 deletions pkgs/development/tools/setupcfg2nix/info.nix

This file was deleted.

0 comments on commit 2ab4ca7

Please sign in to comment.