Merge pull request #292693 from atorres1985-contrib/pyp
pyp: 1.1.0 -> 1.2.0
This commit is contained in:
commit
ea2e6ebab0
@ -1,51 +1,60 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, bc
|
||||
, fetchFromGitHub
|
||||
, jq
|
||||
, python3
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.1.0";
|
||||
in python3.pkgs.buildPythonApplication {
|
||||
pname = "pyp";
|
||||
inherit version;
|
||||
format = "pyproject";
|
||||
pythonPackages = python3.pkgs;
|
||||
finalAttrs = {
|
||||
pname = "pyp";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hauntsaninja";
|
||||
repo = "pyp";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-A1Ip41kxH17BakHEWEuymfa24eBEl5FIHAWL+iZFM4I=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hauntsaninja";
|
||||
repo = "pyp";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
hash = "sha256-hnEgqWOIVj2ugOhd2aS9IulfkVnrlkhwOtrgH4qQqO8=";
|
||||
};
|
||||
|
||||
pyproject = true;
|
||||
|
||||
build-system = with pythonPackages; [
|
||||
flit-core
|
||||
];
|
||||
|
||||
nativeCheckInputs = (with pythonPackages; [
|
||||
pytestCheckHook
|
||||
]) ++ [
|
||||
bc
|
||||
jq
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pyp"
|
||||
];
|
||||
|
||||
# without this, the tests fail because they are unable to find the pyp tool
|
||||
# itself...
|
||||
preCheck = ''
|
||||
_OLD_PATH_=$PATH
|
||||
PATH=$out/bin:$PATH
|
||||
'';
|
||||
|
||||
# And a cleanup!
|
||||
postCheck = ''
|
||||
PATH=$_OLD_PATH_
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/hauntsaninja/pyp";
|
||||
description = "Easily run Python at the shell";
|
||||
changelog = "https://github.com/hauntsaninja/pyp/blob/${finalAttrs.version}/CHANGELOG.md";
|
||||
license = with lib.licenses; [ mit ];
|
||||
mainProgram = "pyp";
|
||||
maintainers = with lib.maintainers; [ rmcgibbo AndersonTorres ];
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3.pkgs.flit-core
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
python3.pkgs.pytestCheckHook
|
||||
bc
|
||||
jq
|
||||
];
|
||||
|
||||
# without this, the tests fail because they are unable to find the pyp tool
|
||||
# itself...
|
||||
preCheck = ''
|
||||
_OLD_PATH_=$PATH
|
||||
PATH=$out/bin:$PATH
|
||||
'';
|
||||
|
||||
# And a cleanup
|
||||
postCheck = ''
|
||||
PATH=$_OLD_PATH_
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/hauntsaninja/pyp";
|
||||
description = "Easily run Python at the shell";
|
||||
changelog = "https://github.com/hauntsaninja/pyp/blob/${version}/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
};
|
||||
}
|
||||
in
|
||||
pythonPackages.buildPythonPackage finalAttrs
|
||||
|
@ -1,56 +0,0 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, coreutils
|
||||
, pythonOlder
|
||||
, astunparse
|
||||
, flit-core
|
||||
, jq
|
||||
, bc
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyp";
|
||||
version = "1.2.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hauntsaninja";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-hnEgqWOIVj2ugOhd2aS9IulfkVnrlkhwOtrgH4qQqO8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
flit-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
|
||||
astunparse
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export PATH=$out/bin:$PATH
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
coreutils
|
||||
jq
|
||||
bc
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pyp"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Easily run Python at the shell! Magical, but never mysterious";
|
||||
homepage = "https://github.com/hauntsaninja/pyp";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ rmcgibbo ];
|
||||
};
|
||||
}
|
@ -11173,10 +11173,6 @@ self: super: with self; {
|
||||
|
||||
pyomo = callPackage ../development/python-modules/pyomo { };
|
||||
|
||||
pyp = callPackage ../development/python-modules/pyp {
|
||||
inherit (pkgs) jq;
|
||||
};
|
||||
|
||||
pypng = callPackage ../development/python-modules/pypng { };
|
||||
|
||||
phonemizer = callPackage ../development/python-modules/phonemizer { };
|
||||
|
Loading…
Reference in New Issue
Block a user