python3Packages.marisa-trie: fetch from GitHub

This commit is contained in:
Robert Schütz 2025-05-26 20:15:14 -07:00
parent 31b5e60529
commit da41306556

View File

@ -1,15 +1,13 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
replaceVars,
marisa-cpp,
cython,
setuptools,
pytestCheckHook,
hypothesis,
readme-renderer,
pythonOlder,
}:
buildPythonPackage rec {
@ -17,12 +15,11 @@ buildPythonPackage rec {
version = "1.2.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "marisa_trie";
inherit version;
hash = "sha256-OifECOKu/APg8dJbL/KvuFqsNWj2+iripTtXouh84p0=";
src = fetchFromGitHub {
owner = "pytries";
repo = "marisa-trie";
tag = version;
hash = "sha256-aWfm13nrASAaD+bcMpv85emXnCFyVtZTdhl79yJuOss=";
};
patches = [
@ -42,7 +39,6 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytestCheckHook
readme-renderer
hypothesis
];
@ -55,15 +51,6 @@ buildPythonPackage rec {
"tests/test_packaging.py"
];
disabledTests = [
# Pins hypothesis==2.0.0 from 2016/01 which complains about
# hypothesis.errors.FailedHealthCheck: tests/test_trie.py::[...] uses
# the 'tmpdir' fixture, which is reset between function calls but not
# between test cases generated by `@given(...)`.
"test_saveload"
"test_mmap"
];
pythonImportsCheck = [ "marisa_trie" ];
meta = with lib; {
@ -73,7 +60,7 @@ buildPythonPackage rec {
This package provides alternative Cython-based pip-installable Python bindings.
'';
homepage = "https://github.com/kmike/marisa-trie";
changelog = "https://github.com/pytries/marisa-trie/blob/${version}/CHANGES.rst";
changelog = "https://github.com/pytries/marisa-trie/blob/${src.tag}/CHANGES.rst";
license = licenses.mit;
};
}