mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
Merge pull request #330758 from pyrox0/denose/pyexcel
python312Packages.pyexcel-{ods,xls}: remove nose dependency; modernize
This commit is contained in:
commit
784aecf346
|
@ -1,39 +1,54 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchPypi,
|
fetchFromGitHub,
|
||||||
|
fetchpatch2,
|
||||||
pyexcel-io,
|
pyexcel-io,
|
||||||
odfpy,
|
odfpy,
|
||||||
nose,
|
|
||||||
pyexcel,
|
pyexcel,
|
||||||
pyexcel-xls,
|
pyexcel-xls,
|
||||||
psutil,
|
psutil,
|
||||||
|
pytestCheckHook,
|
||||||
|
pytest-cov,
|
||||||
|
setuptools,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pyexcel-ods";
|
pname = "pyexcel-ods";
|
||||||
version = "0.6.0";
|
version = "0.6.0";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "pyexcel";
|
||||||
sha256 = "f61b56515fd4ccd4687f0a112422f74ce8535247ad2da49db90038d7e3ed397c";
|
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
|
pyexcel-io
|
||||||
odfpy
|
odfpy
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
nose
|
pytestCheckHook
|
||||||
|
pytest-cov
|
||||||
pyexcel
|
pyexcel
|
||||||
pyexcel-xls
|
pyexcel-xls
|
||||||
psutil
|
psutil
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = "nosetests";
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Plug-in to pyexcel providing the capbility to read, manipulate and write data in ods formats using odfpy";
|
description = "Plug-in to pyexcel providing the capbility to read, manipulate and write data in ods formats using odfpy";
|
||||||
homepage = "http://docs.pyexcel.org/";
|
homepage = "http://docs.pyexcel.org/";
|
||||||
|
|
|
@ -1,43 +1,57 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchPypi,
|
fetchFromGitHub,
|
||||||
|
fetchpatch2,
|
||||||
pyexcel-io,
|
pyexcel-io,
|
||||||
xlrd,
|
xlrd,
|
||||||
xlwt,
|
xlwt,
|
||||||
nose,
|
|
||||||
pyexcel,
|
pyexcel,
|
||||||
mock,
|
pytestCheckHook,
|
||||||
|
pytest-cov,
|
||||||
|
setuptools,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pyexcel-xls";
|
pname = "pyexcel-xls";
|
||||||
version = "0.7.0";
|
version = "0.7.0";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "pyexcel";
|
||||||
sha256 = "5ec606ef8667aafbb0c3fbd8242a7c23bf175ee7c10b08f70799b84fb2db84cb";
|
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
|
pyexcel-io
|
||||||
xlrd
|
xlrd
|
||||||
xlwt
|
xlwt
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
nose
|
pytestCheckHook
|
||||||
pyexcel
|
pyexcel
|
||||||
mock
|
pytest-cov
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace setup.py --replace "xlrd<2" "xlrd<3"
|
substituteInPlace setup.py --replace "xlrd<2" "xlrd<3"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = "nosetests --exclude test_issue_151";
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Wrapper library to read, manipulate and write data in xls using xlrd and xlwt";
|
description = "Wrapper library to read, manipulate and write data in xls using xlrd and xlwt";
|
||||||
homepage = "http://docs.pyexcel.org/";
|
homepage = "http://docs.pyexcel.org/";
|
||||||
|
|
Loading…
Reference in a new issue