New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pythonPackages.wordfreq and dependencies #37784
Conversation
@dotlambda - got time to review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply! I was on vacation.
disabled = pythonOlder "3.3"; | ||
|
||
meta = with lib; { | ||
description = "langcodes is a toolkit for working with and comparing the standardized codes for languages, such as ‘en’ for English, ‘es’ for Spanish, and ‘zh-Hant’ for Traditional Chinese."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "007dg4f5fby2yl7cc44x6xwvcrf2w2ifmn0rmk56ss33mhs8l6qy"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
pname = "mecab-python3"; | ||
version = "0.7"; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace
|
||
# patch to relax version requirements for regex | ||
# dependency to prevent break in upgrade | ||
patches = [ ./relax-regex-dep.patch ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer using substituteInPlace
in postPatch
. Something like
postPatch = ''
substituteInPlace setup.py \
--replace "regex ==" "regex >="
'';
@GrahamcOfBorg build python2.pkgs.wordfreq python3.pkgs.wordfreq python3.pkgs.langcodes python2.pkgs.mecab-python3 python3.pkgs.mecab-python3 python2.pkgs.marisa-trie python3.pkgs.marisa-trie |
Failure on aarch64-linux (full log) Attempted: python3.pkgs.wordfreq, python3.pkgs.langcodes, python2.pkgs.mecab-python3, python3.pkgs.mecab-python3, python2.pkgs.marisa-trie, python3.pkgs.marisa-trie The following builds were skipped because they don't evaluate on aarch64-linux: python2.pkgs.wordfreq Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: python3.pkgs.wordfreq, python3.pkgs.langcodes, python2.pkgs.mecab-python3, python3.pkgs.mecab-python3, python2.pkgs.marisa-trie, python3.pkgs.marisa-trie The following builds were skipped because they don't evaluate on x86_64-linux: python2.pkgs.wordfreq Partial log (click to expand)
|
}; | ||
|
||
meta = with lib; { | ||
description = "Static memory-efficient Trie-like structures for Python (2.x and 3.x) based on marisa-trie C++ library."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain the difference between this and pythonPackages.marisa
in longDescription
:
There are official SWIG-based Python bindings included in C++ library distribution; this package provides alternative Cython-based pip-installable Python bindings.
Please make sure every package has an appropriate |
@dotlambda I think I managed to address all your concerns but one: I tried to get wordfreq's tests going by switching to
The first hit on Google is all in Korean, which makes sense for a Korean dictionary package. I guess since I am not sure how to proceed at the moment, perhaps you have an idea? |
I updated all expressions so that the tests pass and so that all packages are tested. Please have a look. The Korean and Japanese dictionaries are indeed optional dependencies of wordfreq (cf. https://github.com/LuminosoInsight/wordfreq#additional-cjk-installation), so I disabled the respective tests. |
Awesome, so I guess we are done :) |
Initialized the python wordfreq module at 2.0, with dependencies.
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)