forked from NixOS/nixpkgs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#120276 from mweinelt/python/some-libs
- Loading branch information
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ lib | ||
, buildPythonPackage | ||
, fetchPypi | ||
, cython | ||
, matplotlib | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "pycocotools"; | ||
version = "2.0.2"; | ||
format = "setuptools"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "06hz0iz4kqxhqby4j7bah8l41kg68bb118jawp172i4vg497lw94"; | ||
}; | ||
|
||
propagatedBuildInputs = [ | ||
cython | ||
matplotlib | ||
]; | ||
|
||
pythonImportsCheck = [ | ||
"pycocotools.coco" | ||
"pycocotools.cocoeval" | ||
]; | ||
|
||
# has no tests | ||
doCheck = false; | ||
|
||
meta = with lib; { | ||
description = "Official APIs for the MS-COCO dataset"; | ||
homepage = "https://github.com/cocodataset/cocoapi/tree/master/PythonAPI"; | ||
license = licenses.bsd2; | ||
maintainers = with maintainers; [ hexa piegames ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ lib | ||
, buildPythonPackage | ||
, fetchFromGitHub | ||
, numpy | ||
, scikitlearn | ||
, perl | ||
, pytestCheckHook | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "seqeval"; | ||
version = "1.2.2"; | ||
format = "setuptools"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "chakki-works"; | ||
repo = "seqeval"; | ||
rev = "v${version}"; | ||
sha256 = "0qv05gn54kc4wpmwnflmfqw4gwwb8lxqhkiihl0pvl7s2i7qzx2j"; | ||
}; | ||
|
||
postPatch = '' | ||
substituteInPlace setup.py \ | ||
--replace "use_scm_version=True," "version='${version}'," \ | ||
--replace "setup_requires=['setuptools_scm']," "setup_requires=[]," | ||
''; | ||
|
||
propagatedBuildInputs = [ | ||
numpy | ||
scikitlearn | ||
]; | ||
|
||
checkInputs = [ | ||
pytestCheckHook | ||
]; | ||
|
||
disabledTests = [ | ||
# tests call perl script and get stuck in there | ||
"test_statistical_tests" | ||
"test_by_ground_truth" | ||
]; | ||
|
||
meta = with lib; { | ||
description = "A Python framework for sequence labeling evaluation"; | ||
homepage = "https://github.com/chakki-works/seqeval"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ hexa ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters