Merge pull request #260353 from natsukium/supervise-api

python311Packages.supervise-api: rename from supervise_api
This commit is contained in:
Fabian Affolter 2023-10-15 09:55:26 +02:00 committed by GitHub
commit 325960f83e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 56 deletions

View file

@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchPypi
, substituteAll
, supervise
, setuptools
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "supervise-api";
version = "0.6.0";
pyproject = true;
src = fetchPypi {
pname = "supervise_api";
inherit version;
hash = "sha256-EjD0IpSRDoNCG307CKlo0n1RCkpwnpZlB+1w212hud4=";
};
postPatch = ''
substituteInPlace supervise_api/supervise.py \
--replace 'which("supervise")' '"${supervise}/bin/supervise"'
'';
nativeBuildInputs = [
setuptools
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"supervise_api"
];
meta = {
description = "An API for running processes safely and securely";
homepage = "https://github.com/catern/supervise";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ catern ];
};
}

View file

@ -1,40 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, substituteAll
, supervise
, isPy3k
, whichcraft
, util-linux
}:
buildPythonPackage rec {
pname = "supervise_api";
version = "0.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "1230f42294910e83421b7d3b08a968d27d510a4a709e966507ed70db5da1b9de";
};
patches = [
(substituteAll {
src = ./supervise-path.patch;
inherit supervise;
})
];
# In the git repo, supervise_api lives inside a python subdir
patchFlags = [ "-p2" ];
propagatedBuildInputs = lib.optional (!isPy3k) whichcraft;
nativeCheckInputs = [ util-linux ];
meta = {
description = "An API for running processes safely and securely";
homepage = "https://github.com/catern/supervise";
license = lib.licenses.lgpl3;
maintainers = with lib.maintainers; [ catern ];
};
}

View file

@ -1,15 +0,0 @@
diff --git a/python/supervise_api/supervise.py b/python/supervise_api/supervise.py
index 497d3ea..be57e35 100644
--- a/python/supervise_api/supervise.py
+++ b/python/supervise_api/supervise.py
@@ -41,9 +41,7 @@ try:
except:
from whichcraft import which
-supervise_utility_location = which("supervise")
-if not supervise_utility_location:
- raise FileNotFoundError(errno.ENOENT, "Executable not found in PATH", "supervise")
+supervise_utility_location = '@supervise@/bin/supervise'
def ignore_sigchld():

View file

@ -383,6 +383,7 @@ mapAliases ({
SQLAlchemy-ImageAttach = throw "sqlalchemy-imageattach has been removed as it is incompatible with sqlalchemy 1.4 and unmaintained"; # added 2022-04-23
subdownloader = throw "subdownloader has been removed, because it depended on pyqt4"; # added 2022-06-09
suds-jurko = throw "suds-jurko has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2023-02-27
supervise_api = supervise-api; # added 2023-10-11
suseapi = throw "suseapi has been removed because it is no longer maintained"; # added 2023-02-27
tensorflow-bin_2 = tensorflow-bin; # added 2021-11-25
tensorflow-build_2 = tensorflow-build; # added 2021-11-25

View file

@ -13439,7 +13439,7 @@ self: super: with self; {
sunweg = callPackage ../development/python-modules/sunweg { };
supervise_api = callPackage ../development/python-modules/supervise_api { };
supervise-api = callPackage ../development/python-modules/supervise-api { };
supervisor = callPackage ../development/python-modules/supervisor { };