Merge pull request #155030 from fabaff/fix-papis

python310Packages.bibtexparser: 1.1.0 -> 1.2.0
This commit is contained in:
Fabian Affolter 2022-01-15 09:16:14 +01:00 committed by GitHub
commit bb93817ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 100 additions and 56 deletions

View File

@ -1,12 +1,12 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, isPy27 , pythonOlder
, fetchFromGitHub , fetchFromGitHub
, pytestCheckHook , pytestCheckHook
, unittest2
, future , future
, numpy , numpy
, pillow , pillow
, fetchpatch
, scipy , scipy
, scikit-learn , scikit-learn
, scikitimage , scikitimage
@ -16,27 +16,53 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "batchgenerators"; pname = "batchgenerators";
version = "0.21"; version = "0.21";
format = "setuptools";
disabled = isPy27; disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "MIC-DKFZ"; owner = "MIC-DKFZ";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "16bk4r0q3m2c9fawpmj4l7kz0x3fyv1spb92grf44gmyricq3jdb"; hash = "sha256-q8mBWcy+PkJcfiKtq8P2bnTw56FE1suVS0zUgUEmc5k=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
future numpy pillow scipy scikit-learn scikitimage threadpoolctl future
numpy
pillow
scipy
scikit-learn
scikitimage
threadpoolctl
]; ];
checkInputs = [ pytestCheckHook unittest2 ]; checkInputs = [
pytestCheckHook
];
meta = { patches = [
# Remove deprecated unittest2, https://github.com/MIC-DKFZ/batchgenerators/pull/78
(fetchpatch {
name = "remove-unittest2.patch";
url = "https://github.com/MIC-DKFZ/batchgenerators/commit/87a9437057df8a7550aa3b3eaf840871cc0d5cef.patch";
sha256 = "sha256-vozBK7g2dLxx9din/R2vU28Mm+LoGAO/BmQlt/ShmEo=";
})
];
postPatch = ''
substituteInPlace setup.py \
--replace '"unittest2",' ""
'';
pythonImportsCheck = [
"batchgenerators"
];
meta = with lib; {
description = "2D and 3D image data augmentation for deep learning"; description = "2D and 3D image data augmentation for deep learning";
homepage = "https://github.com/MIC-DKFZ/batchgenerators"; homepage = "https://github.com/MIC-DKFZ/batchgenerators";
license = lib.licenses.asl20; license = licenses.asl20;
maintainers = with lib.maintainers; [ bcdarwin ]; maintainers = with maintainers; [ bcdarwin ];
}; };
} }

View File

@ -1,33 +1,49 @@
{ lib { lib
, buildPythonPackage, fetchFromGitHub , buildPythonPackage
, future, pyparsing , fetchFromGitHub
, glibcLocales, nose, unittest2 , future
, pyparsing
, pytestCheckHook
, pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "bibtexparser"; pname = "bibtexparser";
version = "1.1.0"; version = "1.2.0";
format = "setuptools";
disabled = pythonOlder "3.7";
# PyPI tarball does not ship tests
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sciunto-org"; owner = "sciunto-org";
repo = "python-${pname}"; repo = "python-${pname}";
rev = "v${version}"; rev = "v${version}";
sha256 = "1yj3hqnmkjh0sjjhmlm4097mmz98kna8rn0dd9g8zaw9g1a35h8c"; hash = "sha256-M9fDI28Yq0uUHPx51wiuRPmRTLkjVqj7ixapbSftnJc=";
}; };
propagatedBuildInputs = [ future pyparsing ]; propagatedBuildInputs = [
future
pyparsing
];
checkInputs = [ nose unittest2 glibcLocales ]; checkInputs = [
pytestCheckHook
];
checkPhase = '' postPatch = ''
LC_ALL="en_US.UTF-8" nosetests # https://github.com/sciunto-org/python-bibtexparser/pull/259
substituteInPlace bibtexparser/tests/test_crossref_resolving.py \
--replace "import unittest2 as unittest" "import unittest"
''; '';
meta = { pythonImportsCheck = [
description = "Bibtex parser for python 2.7 and 3.3 and newer"; "bibtexparser"
];
meta = with lib; {
description = "Bibtex parser for Python";
homepage = "https://github.com/sciunto-org/python-bibtexparser"; homepage = "https://github.com/sciunto-org/python-bibtexparser";
license = with lib.licenses; [ gpl3 bsd3 ]; license = with licenses; [ lgpl3Only /* or */ bsd3 ];
maintainers = with lib.maintainers; [ fridh ]; maintainers = with maintainers; [ fridh ];
}; };
} }

View File

@ -1,53 +1,55 @@
{ lib { lib
, fetchPypi
, buildPythonPackage , buildPythonPackage
, isPy27 , dask
, isPy3k , fetchPypi
, fsspec
, lxml
, numpy , numpy
, imagecodecs-lite , pytestCheckHook
, enum34 ? null , pythonOlder
, futures ? null , zarr
, pathlib ? null
, pytest
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "tifffile"; pname = "tifffile";
version = "2021.11.2"; version = "2021.11.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "153e31fa1d892f482fabb2ae9f2561fa429ee42d01a6f67e58cee13637d9285b"; hash = "sha256-FT4x+h2JL0gvq7KunyVh+kKe5C0BpvZ+WM7hNjfZKFs=";
}; };
patches = lib.optional isPy27 ./python2-regex-compat.patch;
# Missing dependencies: imagecodecs, czifile, cmapfile, oiffile, lfdfiles
# and test data missing from PyPI tarball
doCheck = false;
checkInputs = [
pytest
];
checkPhase = ''
pytest
'';
propagatedBuildInputs = [ propagatedBuildInputs = [
numpy numpy
] ++ lib.optionals isPy3k [ ];
imagecodecs-lite
] ++ lib.optionals isPy27 [ checkInputs = [
futures dask
enum34 fsspec
pathlib lxml
pytestCheckHook
zarr
];
disabledTests = [
# Test require network access
"test_class_omexml"
"test_write_ome"
# Test file is missing
"test_write_predictor"
];
pythonImportsCheck = [
"tifffile"
]; ];
meta = with lib; { meta = with lib; {
description = "Read and write image data from and to TIFF files."; description = "Read and write image data from and to TIFF files";
homepage = "https://www.lfd.uci.edu/~gohlke/"; homepage = "https://github.com/cgohlke/tifffile/";
maintainers = [ maintainers.lebastr ];
license = licenses.bsd3; license = licenses.bsd3;
maintainers = with maintainers; [ lebastr ];
}; };
} }