From 9b36743f0029d5086a2b8bc0d9bf089e363e21b2 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 28 Jul 2024 22:00:57 -0400 Subject: [PATCH 1/4] python312Packages.pyexcel-ods: remove nose dependency --- .../python-modules/pyexcel-ods/default.nix | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pyexcel-ods/default.nix b/pkgs/development/python-modules/pyexcel-ods/default.nix index 646bd2e8adc7..0dcb5e87e96f 100644 --- a/pkgs/development/python-modules/pyexcel-ods/default.nix +++ b/pkgs/development/python-modules/pyexcel-ods/default.nix @@ -1,13 +1,15 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + fetchpatch2, pyexcel-io, odfpy, - nose, pyexcel, pyexcel-xls, psutil, + pytestCheckHook, + pytest-cov, }: buildPythonPackage rec { @@ -15,25 +17,35 @@ buildPythonPackage rec { version = "0.6.0"; format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "f61b56515fd4ccd4687f0a112422f74ce8535247ad2da49db90038d7e3ed397c"; + src = fetchFromGitHub { + owner = "pyexcel"; + repo = "pyexcel-ods"; + rev = "v${version}"; + hash = "sha256-wptjCSi56hotmiIE0TrLY7jsCHKwDR+a7d89sAQWBHg="; }; + patches = [ + # https://github.com/pyexcel/pyexcel-ods/pull/45 + (fetchpatch2 { + name = "nose-to-pytest.patch"; + url = "https://github.com/pyexcel/pyexcel-ods/compare/661d4f0b484ed281128c72e1a2701e2d33fc1879...838b410e800a86c147644568aaa8b2c005d13491.patch"; + hash = "sha256-1a52VM8yGDEjSFXTq3Di74xwv10d/QskpctOnz9zW1w="; + }) + ]; + propagatedBuildInputs = [ pyexcel-io odfpy ]; nativeCheckInputs = [ - nose + pytestCheckHook + pytest-cov pyexcel pyexcel-xls psutil ]; - checkPhase = "nosetests"; - meta = { description = "Plug-in to pyexcel providing the capbility to read, manipulate and write data in ods formats using odfpy"; homepage = "http://docs.pyexcel.org/"; From 792b0849b7a83e732cdc566f830e6c6ee1e33a68 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 28 Jul 2024 22:01:09 -0400 Subject: [PATCH 2/4] python312Packages.pyexcel-xls: remove nose dependency --- .../python-modules/pyexcel-xls/default.nix | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pyexcel-xls/default.nix b/pkgs/development/python-modules/pyexcel-xls/default.nix index 5ff87b2390eb..2da479c3d0b4 100644 --- a/pkgs/development/python-modules/pyexcel-xls/default.nix +++ b/pkgs/development/python-modules/pyexcel-xls/default.nix @@ -1,13 +1,14 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + fetchpatch2, pyexcel-io, xlrd, xlwt, - nose, pyexcel, - mock, + pytestCheckHook, + pytest-cov, }: buildPythonPackage rec { @@ -15,11 +16,23 @@ buildPythonPackage rec { version = "0.7.0"; format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "5ec606ef8667aafbb0c3fbd8242a7c23bf175ee7c10b08f70799b84fb2db84cb"; + src = fetchFromGitHub { + owner = "pyexcel"; + repo = "pyexcel-xls"; + rev = "v${version}"; + hash = "sha256-wxsx/LfeBxi+NnHxfxk3svzsBcdwOiLQ1660eoHfmLg="; }; + patches = [ + # https://github.com/pyexcel/pyexcel-xls/pull/54 + (fetchpatch2 { + name = "nose-to-pytest.patch"; + url = "https://github.com/pyexcel/pyexcel-xls/compare/d8953c8ff7dc9a4a3465f2cfc182acafa49f6ea2...9f0d48035114f73077dd0f109395af32b4d9d48b.patch"; + hash = "sha256-2kVdN+kEYaJjXGzv9eudfKjRweMG0grTd5wnZXIDzUU="; + excludes = [ ".github/*" ]; + }) + ]; + propagatedBuildInputs = [ pyexcel-io xlrd @@ -27,17 +40,15 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - nose + pytestCheckHook pyexcel - mock + pytest-cov ]; postPatch = '' substituteInPlace setup.py --replace "xlrd<2" "xlrd<3" ''; - checkPhase = "nosetests --exclude test_issue_151"; - meta = { description = "Wrapper library to read, manipulate and write data in xls using xlrd and xlwt"; homepage = "http://docs.pyexcel.org/"; From 3d205a7ce90e0dd88909f0901739ee630e279db9 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 28 Jul 2024 22:02:41 -0400 Subject: [PATCH 3/4] python312Packages.pyexcel-ods: modernize --- pkgs/development/python-modules/pyexcel-ods/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyexcel-ods/default.nix b/pkgs/development/python-modules/pyexcel-ods/default.nix index 0dcb5e87e96f..e7683a259fd3 100644 --- a/pkgs/development/python-modules/pyexcel-ods/default.nix +++ b/pkgs/development/python-modules/pyexcel-ods/default.nix @@ -10,12 +10,13 @@ psutil, pytestCheckHook, pytest-cov, + setuptools, }: buildPythonPackage rec { pname = "pyexcel-ods"; version = "0.6.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "pyexcel"; @@ -33,7 +34,9 @@ buildPythonPackage rec { }) ]; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ pyexcel-io odfpy ]; @@ -50,6 +53,6 @@ buildPythonPackage rec { description = "Plug-in to pyexcel providing the capbility to read, manipulate and write data in ods formats using odfpy"; homepage = "http://docs.pyexcel.org/"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ ]; + maintainers = [ ]; }; } From 32d6a3c359b0a0fa9077ad45c3245b312736cc05 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 28 Jul 2024 22:02:53 -0400 Subject: [PATCH 4/4] python312Packages.pyexcel-xls: modernize --- pkgs/development/python-modules/pyexcel-xls/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyexcel-xls/default.nix b/pkgs/development/python-modules/pyexcel-xls/default.nix index 2da479c3d0b4..c372ca08adf1 100644 --- a/pkgs/development/python-modules/pyexcel-xls/default.nix +++ b/pkgs/development/python-modules/pyexcel-xls/default.nix @@ -9,12 +9,13 @@ pyexcel, pytestCheckHook, pytest-cov, + setuptools, }: buildPythonPackage rec { pname = "pyexcel-xls"; version = "0.7.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "pyexcel"; @@ -33,7 +34,9 @@ buildPythonPackage rec { }) ]; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ pyexcel-io xlrd xlwt @@ -53,6 +56,6 @@ buildPythonPackage rec { description = "Wrapper library to read, manipulate and write data in xls using xlrd and xlwt"; homepage = "http://docs.pyexcel.org/"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ ]; + maintainers = [ ]; }; }