diff --git a/pkgs/development/python-modules/pyexcel-ods/default.nix b/pkgs/development/python-modules/pyexcel-ods/default.nix index 6950a1502b83..e7683a259fd3 100644 --- a/pkgs/development/python-modules/pyexcel-ods/default.nix +++ b/pkgs/development/python-modules/pyexcel-ods/default.nix @@ -1,39 +1,54 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + fetchpatch2, pyexcel-io, odfpy, - nose, pyexcel, pyexcel-xls, psutil, + pytestCheckHook, + pytest-cov, + setuptools, }: buildPythonPackage rec { pname = "pyexcel-ods"; version = "0.6.0"; - format = "setuptools"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "f61b56515fd4ccd4687f0a112422f74ce8535247ad2da49db90038d7e3ed397c"; + src = fetchFromGitHub { + owner = "pyexcel"; + repo = "pyexcel-ods"; + rev = "v${version}"; + hash = "sha256-wptjCSi56hotmiIE0TrLY7jsCHKwDR+a7d89sAQWBHg="; }; - propagatedBuildInputs = [ + 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="; + }) + ]; + + build-system = [ setuptools ]; + + dependencies = [ 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/"; diff --git a/pkgs/development/python-modules/pyexcel-xls/default.nix b/pkgs/development/python-modules/pyexcel-xls/default.nix index 961f560a4034..c372ca08adf1 100644 --- a/pkgs/development/python-modules/pyexcel-xls/default.nix +++ b/pkgs/development/python-modules/pyexcel-xls/default.nix @@ -1,43 +1,57 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + fetchpatch2, pyexcel-io, xlrd, xlwt, - nose, pyexcel, - mock, + pytestCheckHook, + pytest-cov, + setuptools, }: buildPythonPackage rec { pname = "pyexcel-xls"; version = "0.7.0"; - format = "setuptools"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "5ec606ef8667aafbb0c3fbd8242a7c23bf175ee7c10b08f70799b84fb2db84cb"; + src = fetchFromGitHub { + owner = "pyexcel"; + repo = "pyexcel-xls"; + rev = "v${version}"; + hash = "sha256-wxsx/LfeBxi+NnHxfxk3svzsBcdwOiLQ1660eoHfmLg="; }; - propagatedBuildInputs = [ + 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/*" ]; + }) + ]; + + build-system = [ setuptools ]; + + dependencies = [ pyexcel-io xlrd xlwt ]; 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/";