Skip to content

Commit

Permalink
Merge pull request #318498 from fabaff/xlwt-refactor
Browse files Browse the repository at this point in the history
python312Packages.xlwt: refactor, python312Packages.canmatrix: refactor
  • Loading branch information
fabaff committed Jun 9, 2024
2 parents 917524d + bea1d0e commit 4b9c91a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
14 changes: 10 additions & 4 deletions pkgs/development/python-modules/canmatrix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
pytestCheckHook,
pythonOlder,
pyyaml,
setuptools,
six,
versioneer,
xlrd,
xlwt,
}:

buildPythonPackage rec {
pname = "canmatrix";
version = "1.0";
format = "setuptools";
pyproject = true;

disabled = pythonOlder "3.7";

Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/pylint-django/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" ];
Expand Down
30 changes: 22 additions & 8 deletions pkgs/development/python-modules/xlwt/default.nix
Original file line number Diff line number Diff line change
@@ -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; [ ];
};
}

0 comments on commit 4b9c91a

Please sign in to comment.