From a5d975648da42e79dc4da422939d0fc588b23765 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Aug 2021 11:10:05 +0200 Subject: [PATCH 1/3] python3Packages.dufte: 0.2.12 -> 0.2.27 --- .../python-modules/dufte/default.nix | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/dufte/default.nix b/pkgs/development/python-modules/dufte/default.nix index d1c9680cb7b9..b9a96cbc8298 100644 --- a/pkgs/development/python-modules/dufte/default.nix +++ b/pkgs/development/python-modules/dufte/default.nix @@ -1,23 +1,23 @@ { lib , buildPythonPackage -, fetchPypi -, isPy3k +, fetchFromGitHub , pythonOlder , importlib-metadata , matplotlib , numpy -, exdown , pytestCheckHook }: buildPythonPackage rec { pname = "dufte"; - version = "0.2.12"; - disabled = !isPy3k; + version = "0.2.27"; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "0ag1d7h1wijkc7v2vpgkbqjlnpiwd4nh8zhxiby0989bpmlp3jr3"; + src = fetchFromGitHub { + owner = "nschloe"; + repo = pname; + rev = version; + sha256 = "1i68h224hx9clxj3l0rd2yigsi6fqsr3x10vj5hf3j6s69iah7r3"; }; format = "pyproject"; @@ -28,13 +28,10 @@ buildPythonPackage rec { importlib-metadata ]; - preCheck = '' - export HOME=$TMPDIR - mkdir -p $HOME/.matplotlib - echo "backend: ps" > $HOME/.matplotlib/matplotlibrc - ''; + checkInputs = [ + pytestCheckHook + ]; - checkInputs = [ exdown pytestCheckHook ]; pythonImportsCheck = [ "dufte" ]; meta = with lib; { From 5b683507ec4be2d17540df047614b5fa692ee24e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Aug 2021 11:11:21 +0200 Subject: [PATCH 2/3] python3Packages.perfplot: 0.9.5 -> 0.9.6 --- .../python-modules/perfplot/default.nix | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/perfplot/default.nix b/pkgs/development/python-modules/perfplot/default.nix index 76f2f8d2931b..8e15cc0be8db 100644 --- a/pkgs/development/python-modules/perfplot/default.nix +++ b/pkgs/development/python-modules/perfplot/default.nix @@ -7,20 +7,20 @@ , pipdate , tqdm , rich -, pytest -, isPy27 +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "perfplot"; - version = "0.9.5"; - disabled = isPy27; + version = "0.9.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "nschloe"; - repo = "perfplot"; + repo = pname; rev = "v${version}"; - sha256 = "1nr31a7qvipqjycw2flkabnhnc4drbi1xpjm8yjxw2gjzznd1jg4"; + sha256 = "11f31d6xqxp04693symc2dl8890gjaycrb2a35y5xy023abwir5b"; }; format = "pyproject"; @@ -34,20 +34,15 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest + pytestCheckHook ]; - checkPhase = '' - export HOME=$TMPDIR - mkdir -p $HOME/.matplotlib - echo "backend: ps" > $HOME/.matplotlib/matplotlibrc - pytest test/perfplot_test.py - ''; + pythonImportsCheck = [ "perfplot" ]; meta = with lib; { description = "Performance plots for Python code snippets"; homepage = "https://github.com/nschloe/perfplot"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } From abdd33edea66b9668c3b2d941d3cda2f6cb40730 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 Aug 2021 11:48:12 +0200 Subject: [PATCH 3/3] python3Packages.pyfma: fix build --- .../python-modules/pyfma/default.nix | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pyfma/default.nix b/pkgs/development/python-modules/pyfma/default.nix index d53c62e2f3a9..e41d51c17719 100644 --- a/pkgs/development/python-modules/pyfma/default.nix +++ b/pkgs/development/python-modules/pyfma/default.nix @@ -1,31 +1,37 @@ { lib , buildPythonPackage -, isPy27 -, fetchPypi -, pybind11 -, exdown +, fetchFromGitHub +, importlib-metadata , numpy +, pybind11 , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "pyfma"; version = "0.1.4"; + disabled = pythonOlder "3.7"; - disabled = isPy27; - - src = fetchPypi { - inherit pname version; - sha256 = "5bc6bf57d960a5232b7a56bd38e9fe3dce0911016746029931044b66bdec46e9"; + src = fetchFromGitHub { + owner = "nschloe"; + repo = pname; + rev = "v${version}"; + sha256 = "1wkcl41j2d1yflc5dl30ys1yxx68w9zn3vj8brwkm1ar9jnfmg4h"; }; + format = "pyproject"; buildInputs = [ pybind11 ]; - checkInputs = [ - exdown + propagatedBuildInputs = [ numpy + ] ++ lib.optionals (pythonOlder "3.8") [ + importlib-metadata + ]; + + checkInputs = [ pytestCheckHook ]; @@ -35,6 +41,6 @@ buildPythonPackage rec { description = "Fused multiply-add for Python"; homepage = "https://github.com/nschloe/pyfma"; license = licenses.mit; - maintainers = [ maintainers.costrouc]; + maintainers = with maintainers; [ costrouc ]; }; }