mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
python312Packages.rouge-score: modernize
This commit is contained in:
parent
052bab367d
commit
617806be15
@ -3,6 +3,7 @@
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
buildPythonPackage,
|
||||
setuptools,
|
||||
absl-py,
|
||||
nltk,
|
||||
numpy,
|
||||
@ -22,7 +23,7 @@ in
|
||||
buildPythonPackage rec {
|
||||
pname = "rouge-score";
|
||||
version = "0.1.2";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
@ -35,10 +36,14 @@ buildPythonPackage rec {
|
||||
# the tar file from pypi doesn't come with the test data
|
||||
postPatch = ''
|
||||
substituteInPlace rouge_score/test_util.py \
|
||||
--replace 'os.path.join(os.path.dirname(__file__), "testdata")' '"${testdata}/rouge/testdata/"'
|
||||
--replace-fail \
|
||||
'os.path.join(os.path.dirname(__file__), "testdata")' \
|
||||
'"${testdata}/rouge/testdata/"'
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
absl-py
|
||||
nltk
|
||||
numpy
|
||||
|
Loading…
Reference in New Issue
Block a user