python3Packages.wordfreq: fix build
- update source - use poetry-core as build-system
This commit is contained in:
parent
8c8b03ba9e
commit
8f5833f367
|
@ -1,5 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, poetry-core
|
||||||
, regex
|
, regex
|
||||||
, langcodes
|
, langcodes
|
||||||
, ftfy
|
, ftfy
|
||||||
|
@ -7,21 +8,27 @@
|
||||||
, mecab-python3
|
, mecab-python3
|
||||||
, jieba
|
, jieba
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, isPy27
|
, pythonOlder
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "wordfreq";
|
pname = "wordfreq";
|
||||||
version = "3.0.2";
|
version = "3.0.2";
|
||||||
disabled = isPy27;
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
disabled = pythonOlder "3.7";
|
||||||
owner = "LuminosoInsight";
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "rspeer";
|
||||||
repo = "wordfreq";
|
repo = "wordfreq";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-ANOBbQWLB35Vz6oil6QZDpsNpKHeKUJnDKA5Q9JRVdE=";
|
hash = "sha256-ANOBbQWLB35Vz6oil6QZDpsNpKHeKUJnDKA5Q9JRVdE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
poetry-core
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
regex
|
regex
|
||||||
|
@ -32,10 +39,6 @@ buildPythonPackage rec {
|
||||||
jieba
|
jieba
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace setup.py --replace "regex ==" "regex >="
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeCheckInputs = [ pytestCheckHook ];
|
nativeCheckInputs = [ pytestCheckHook ];
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
# These languages require additional dictionaries that aren't packaged
|
# These languages require additional dictionaries that aren't packaged
|
||||||
|
@ -46,7 +49,7 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A library for looking up the frequencies of words in many languages, based on many sources of data";
|
description = "A library for looking up the frequencies of words in many languages, based on many sources of data";
|
||||||
homepage = "https://github.com/LuminosoInsight/wordfreq/";
|
homepage = "https://github.com/rspeer/wordfreq/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ ixxie ];
|
maintainers = with maintainers; [ ixxie ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue