summaryrefslogtreecommitdiffstats
path: root/debian/patches/0001-Use-system-hyphen-dictionaries.patch
blob: 152e2d85092562a70786a3151fdcd63217305e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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',