Merge pull request #207188 from jpetrucciani/add_emborg

python3Packages.emborg: init at 1.34
This commit is contained in:
Fabian Affolter 2022-12-29 21:26:58 +01:00 committed by GitHub
commit ab370cd70a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 368 additions and 0 deletions

View File

@ -0,0 +1,78 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pytestCheckHook
, pythonOlder
, borgbackup
, appdirs
, arrow
, docopt
, inform
, nestedtext
, parametrize-from-file
, quantiphy
, requests
, shlib
, voluptuous
}:
buildPythonPackage rec {
pname = "emborg";
version = "1.34";
format = "flit";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "KenKundert";
repo = "emborg";
rev = "v${version}";
hash = "sha256-bnlELPZzTU9KyVsz5Q0aW9xWvVrgwpowQrjkQvX844g=";
};
propagatedBuildInputs = [
appdirs
arrow
docopt
inform
quantiphy
requests
];
checkInputs = [
nestedtext
parametrize-from-file
pytestCheckHook
shlib
voluptuous
borgbackup
];
# this disables testing fuse mounts
MISSING_DEPENDENCIES = "fuse";
postPatch = ''
patchShebangs .
'';
# this patch fixes a whitespace issue in the message that a test is expecting, https://github.com/KenKundert/emborg/pull/67
patches = [
(fetchpatch {
url = "https://github.com/KenKundert/emborg/commit/afac6d1ddcecdb4bddbec87b6c8eed4cfbf4ebf9.diff";
sha256 = "3xg2z03FLKH4ckmiBZqE1FDjpgjgdO8OZL1ewrJlQ4o=";
})
];
pythonImportsCheck = [
"emborg"
];
meta = with lib; {
description = "Interactive command line interface to Borg Backup";
homepage = "https://github.com/KenKundert/emborg";
changelog = "https://github.com/KenKundert/emborg/releases/tag/v${version}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jpetrucciani ];
};
}

View File

@ -0,0 +1,55 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, coveralls
, numpy
, contextlib2
, decopatch
, more-itertools
, nestedtext
, pyyaml
, tidyexc
, toml
}:
buildPythonPackage rec {
pname = "parametrize-from-file";
version = "0.17.0";
src = fetchPypi {
inherit version;
pname = "parametrize_from_file";
sha256 = "1c91j869n2vplvhawxc1sv8km8l53bhlxhhms43fyjsqvy351v5j";
};
format = "flit";
pythonImportsCheck = [ "parametrize_from_file" ];
# patch out coveralls since it doesn't provide us value
preBuild = ''
sed -i '/coveralls/d' ./pyproject.toml
'';
checkInputs = [
numpy
pytestCheckHook
];
propagatedBuildInputs = [
contextlib2
decopatch
more-itertools
nestedtext
pyyaml
tidyexc
toml
];
meta = with lib; {
description = "Read unit test parameters from config files";
homepage = "https://github.com/kalekundert/parametrize_from_file";
changelog = "https://github.com/kalekundert/parametrize_from_file/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}

View File

@ -0,0 +1,48 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, inform
, pythonOlder
, sly
}:
buildPythonPackage rec {
pname = "quantiphy-eval";
version = "0.5";
format = "flit";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "KenKundert";
repo = "quantiphy_eval";
rev = "v${version}";
hash = "sha256-7VHcuINhe17lRNkHUnZkVOEtD6mVWk5gu0NbrLZwprg=";
};
propagatedBuildInputs = [
inform
sly
];
# this has a circular dependency on quantiphy
preBuild = ''
sed -i '/quantiphy>/d' ./pyproject.toml
'';
# tests require quantiphy import
doCheck = false;
# Also affected by the circular dependency on quantiphy
# pythonImportsCheck = [
# "quantiphy_eval"
# ];
meta = with lib; {
description = "QuantiPhy support for evals in-line";
homepage = "https://github.com/KenKundert/quantiphy_eval/";
changelog = "https://github.com/KenKundert/quantiphy_eval/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}

View File

@ -0,0 +1,57 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, flitBuildHook
, pytestCheckHook
, pythonOlder
, inform
, parametrize-from-file
, setuptools
, voluptuous
, quantiphy-eval
, rkm-codes
}:
buildPythonPackage rec {
pname = "quantiphy";
version = "2.18";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "KenKundert";
repo = "quantiphy";
rev = "v${version}";
hash = "sha256-KXZQTal5EQDrMNV9QKeuLeYYDaMfAJlEDEagq2XG9/Q=";
};
nativeBuildInputs = [
flitBuildHook
];
propagatedBuildInputs = [
quantiphy-eval
rkm-codes
];
checkInputs = [
inform
parametrize-from-file
pytestCheckHook
setuptools
voluptuous
];
pythonImportsCheck = [
"quantiphy"
];
meta = with lib; {
description = "Module for physical quantities (numbers with units)";
homepage = "https://quantiphy.readthedocs.io";
changelog = "https://github.com/KenKundert/quantiphy/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}

View File

@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, flitBuildHook
, setuptools
}:
buildPythonPackage rec {
pname = "rkm-codes";
version = "0.5";
src = fetchFromGitHub {
owner = "KenKundert";
repo = "rkm_codes";
rev = "v${version}";
sha256 = "sha256-r4F72iHxH7BoPtgYm1RD6BeSZszKRrpeBQccmT4wzuw=";
};
format = "pyproject";
nativeBuildInputs = [
flitBuildHook
];
propagatedBuildInputs = [
setuptools
];
# this has a circular dependency on quantiphy
preBuild = ''
sed -i '/quantiphy/d' ./setup.py
sed -i '/pytest-runner/d' ./setup.py
'';
# this import check will fail as quantiphy is imported by this package
# pythonImportsCheck = [ "rkm_codes" ];
# tests require quantiphy import
doCheck = false;
meta = with lib; {
description = "QuantiPhy support for RKM codes";
homepage = "https://github.com/kenkundert/rkm_codes/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jpetrucciani ];
};
}

View File

@ -0,0 +1,39 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, braceexpand
, inform
}:
buildPythonPackage rec {
pname = "shlib";
version = "1.5";
src = fetchFromGitHub {
owner = "KenKundert";
repo = "shlib";
rev = "v${version}";
sha256 = "sha256-2fwRxa64QXKJuhYwt9Z4BxhTeq1iwbd/IznfxPUjeSM=";
};
pythonImportsCheck = [ "shlib" ];
postPatch = ''
patchShebangs .
'';
checkInputs = [
pytestCheckHook
];
propagatedBuildInputs = [
braceexpand
inform
];
meta = with lib; {
description = "shell library";
homepage = "https://github.com/KenKundert/shlib";
changelog = "https://github.com/KenKundert/shlib/releases/tag/v${version}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jpetrucciani ];
};
}

View File

@ -0,0 +1,30 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
}:
buildPythonPackage rec {
pname = "tidyexc";
version = "0.10.0";
format = "flit";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "1gl1jmihafawg7hvnn4xb20vd2x5qpvca0m1wr2gk0m2jj42yiq6";
};
pythonImportsCheck = [
"tidyexc"
];
meta = with lib; {
description = "Raise rich, helpful exceptions";
homepage = "https://github.com/kalekundert/tidyexc";
changelog = "https://github.com/kalekundert/tidyexc/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}

View File

@ -6843,6 +6843,8 @@ with pkgs;
embree = callPackage ../development/libraries/embree { };
embree2 = callPackage ../development/libraries/embree/2.x.nix { };
emborg = python3Packages.callPackage ../development/python-modules/emborg { };
emem = callPackage ../applications/misc/emem { };
empty = callPackage ../tools/misc/empty { };

View File

@ -2945,6 +2945,8 @@ self: super: with self; {
embrace = callPackage ../development/python-modules/embrace { };
emborg = callPackage ../development/python-modules/emborg { };
emcee = callPackage ../development/python-modules/emcee { };
emv = callPackage ../development/python-modules/emv { };
@ -6721,6 +6723,8 @@ self: super: with self; {
parameterized = callPackage ../development/python-modules/parameterized { };
parametrize-from-file = callPackage ../development/python-modules/parametrize-from-file { };
paramiko = callPackage ../development/python-modules/paramiko { };
paramz = callPackage ../development/python-modules/paramz { };
@ -9599,6 +9603,10 @@ self: super: with self; {
quantities = callPackage ../development/python-modules/quantities { };
quantiphy = callPackage ../development/python-modules/quantiphy { };
quantiphy-eval = callPackage ../development/python-modules/quantiphy-eval { };
quantum-gateway = callPackage ../development/python-modules/quantum-gateway { };
querystring_parser = callPackage ../development/python-modules/querystring-parser { };
@ -9873,6 +9881,8 @@ self: super: with self; {
rki-covid-parser = callPackage ../development/python-modules/rki-covid-parser { };
rkm-codes = callPackage ../development/python-modules/rkm-codes { };
rlax = callPackage ../development/python-modules/rlax { };
rl-coach = callPackage ../development/python-modules/rl-coach { };
@ -10278,6 +10288,8 @@ self: super: with self; {
sh = callPackage ../development/python-modules/sh { };
shlib = callPackage ../development/python-modules/shlib { };
shellescape = callPackage ../development/python-modules/shellescape { };
shellingham = callPackage ../development/python-modules/shellingham { };
@ -11197,6 +11209,8 @@ self: super: with self; {
py = python.override { x11Support=true; };
};
tidyexc = callPackage ../development/python-modules/tidyexc { };
tidylib = callPackage ../development/python-modules/pytidylib { };
tifffile = callPackage ../development/python-modules/tifffile { };