Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyp: 1.1.0 -> 1.2.0 #292693

Merged
merged 4 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 52 additions & 43 deletions pkgs/by-name/py/pyp/package.nix
Original file line number Diff line number Diff line change
@@ -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";

src = fetchFromGitHub {
owner = "hauntsaninja";
repo = "pyp";
rev = "v${version}";
hash = "sha256-A1Ip41kxH17BakHEWEuymfa24eBEl5FIHAWL+iZFM4I=";
};
pythonPackages = python3.pkgs;
finalAttrs = {
pname = "pyp";
version = "1.2.0";

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_
'';

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 ];
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 ];
};
};
}
in
pythonPackages.buildPythonPackage finalAttrs
56 changes: 0 additions & 56 deletions pkgs/development/python-modules/pyp/default.nix

This file was deleted.

4 changes: 0 additions & 4 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11159,10 +11159,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 { };
Expand Down
Loading