python3Packages.marisa-trie: unvendor marisa
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
replaceVars,
|
||||
marisa-cpp,
|
||||
cython,
|
||||
setuptools,
|
||||
pytestCheckHook,
|
||||
@@ -23,22 +25,27 @@ buildPythonPackage rec {
|
||||
hash = "sha256-OifECOKu/APg8dJbL/KvuFqsNWj2+iripTtXouh84p0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(replaceVars ./unvendor-marisa.patch {
|
||||
marisa = lib.getDev marisa-cpp;
|
||||
})
|
||||
];
|
||||
|
||||
build-system = [
|
||||
cython
|
||||
setuptools
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
marisa-cpp
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
readme-renderer
|
||||
hypothesis
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "hypothesis==" "hypothesis>="
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
./update_cpp.sh
|
||||
'';
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c0c5c03..6373a2a 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -71,15 +71,6 @@ setup(
|
||||
license=LICENSE,
|
||||
url="https://github.com/pytries/marisa-trie",
|
||||
classifiers=CLASSIFIERS,
|
||||
- libraries=[
|
||||
- (
|
||||
- "libmarisa-trie",
|
||||
- {
|
||||
- "sources": MARISA_FILES,
|
||||
- "include_dirs": [MARISA_SOURCE_DIR, MARISA_INCLUDE_DIR],
|
||||
- },
|
||||
- )
|
||||
- ],
|
||||
ext_modules=[
|
||||
Extension(
|
||||
"marisa_trie",
|
||||
@@ -94,7 +85,8 @@ setup(
|
||||
"src/std_iostream.cpp",
|
||||
"src/trie.cpp",
|
||||
],
|
||||
- include_dirs=[MARISA_INCLUDE_DIR],
|
||||
+ include_dirs=["@marisa@/include"],
|
||||
+ libraries=["marisa"],
|
||||
)
|
||||
],
|
||||
python_requires=">=3.8",
|
||||
@@ -8539,7 +8539,9 @@ self: super: with self; {
|
||||
|
||||
marisa = callPackage ../development/python-modules/marisa { inherit (pkgs) marisa; };
|
||||
|
||||
marisa-trie = callPackage ../development/python-modules/marisa-trie { };
|
||||
marisa-trie = callPackage ../development/python-modules/marisa-trie {
|
||||
marisa-cpp = pkgs.marisa;
|
||||
};
|
||||
|
||||
markdown = callPackage ../development/python-modules/markdown { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user