Merge pull request #318498 from fabaff/xlwt-refactor

python312Packages.xlwt: refactor, python312Packages.canmatrix: refactor
This commit is contained in:
Fabian Affolter
2024-06-09 16:30:32 +02:00
committed by GitHub
3 changed files with 34 additions and 12 deletions
@@ -12,7 +12,9 @@
pytestCheckHook,
pythonOlder,
pyyaml,
setuptools,
six,
versioneer,
xlrd,
xlwt,
}:
@@ -20,7 +22,7 @@
buildPythonPackage rec {
pname = "canmatrix";
version = "1.0";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -32,11 +34,15 @@ buildPythonPackage rec {
};
postPatch = ''
substituteInPlace setup.py \
--replace "version = versioneer.get_version()" 'version = "${version}"'
# Remove vendorized versioneer.py
rm versioneer.py
'';
propagatedBuildInputs = [
build-system = [ setuptools ];
nativeBuildInputs = [ versioneer ];
dependencies = [
attrs
click
future
@@ -46,6 +46,8 @@ buildPythonPackage rec {
"test_migrations_plugin"
"func_noerror_model_unicode_lambda"
"test_linter_should_be_pickleable_with_pylint_django_plugin_installed"
"func_noerror_model_fields"
"func_noerror_form_fields"
];
pythonImportsCheck = [ "pylint_django" ];
@@ -1,32 +1,46 @@
{
lib,
buildPythonPackage,
fetchPypi,
nose,
lib,
pynose,
setuptools,
pythonOlder,
}:
buildPythonPackage rec {
pname = "xlwt";
version = "1.3.0";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "c59912717a9b28f1a3c2a98fd60741014b06b043936dcecbc113eaaada156c88";
hash = "sha256-xZkScXqbKPGjwqmP1gdBAUsGsEOTbc7LwRPqqtoVbIg=";
};
nativeCheckInputs = [ nose ];
build-system = [ setuptools ];
nativeCheckInputs = [ pynose ];
checkPhase = ''
runHook preCheck
nosetests -v
runHook postCheck
'';
meta = {
pythonImportsCheck = [ "xlwt" ];
meta = with lib; {
description = "Library to create spreadsheet files compatible with MS";
homepage = "https://github.com/python-excel/xlwt";
license = with lib.licenses; [
license = with licenses; [
bsdOriginal
bsd3
lgpl21
lgpl21Plus
];
maintainers = with maintainers; [ ];
};
}