debian-pyphen/debian/patches/0001-Use-system-hyphen-dict...

38 lines
1.2 KiB
Diff

From: Scott Kitterman <scott@kitterman.com>
Date: Fri, 4 Jan 2019 14:59:07 -0500
Subject: Use system hyphen dictionaries
---
pyphen/__init__.py | 3 +--
setup.py | 3 ---
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/pyphen/__init__.py b/pyphen/__init__.py
index 6bf92e4..857f94a 100755
--- a/pyphen/__init__.py
+++ b/pyphen/__init__.py
@@ -42,8 +42,7 @@ parse_hex = re.compile(r'\^{2}([0-9a-f]{2})').sub
parse = re.compile(r'(\d?)(\D?)').findall
try:
- from pkg_resources import resource_filename
- dictionaries_root = resource_filename('pyphen', 'dictionaries')
+ dictionaries_root = '/usr/share/hyphen'
except ImportError:
dictionaries_root = os.path.join(os.path.dirname(__file__), 'dictionaries')
diff --git a/setup.py b/setup.py
index 329ebcf..719c205 100755
--- a/setup.py
+++ b/setup.py
@@ -28,9 +28,6 @@ setup(
version='0.9.5',
provides=['pyphen'],
packages=['pyphen'],
- package_data={'pyphen': [os.path.join(
- os.path.dirname(__file__), 'dictionaries', '*.dic')]},
- include_package_data=True,
author='Guillaume Ayoub',
author_email='guillaume.ayoub@kozea.fr',
url='https://github.com/Kozea/Pyphen',