summaryrefslogtreecommitdiff
path: root/textproc/py-pyphen/patches/patch-setup.py
blob: 930fa411bd5f1357cf4d8ece4c906146d8202565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$NetBSD: patch-setup.py,v 1.1 2015/07/13 16:13:55 kleink Exp $

Adjust dictionaries path to allow multiple Python version installs.

--- setup.py.orig	2013-12-27 17:53:41.000000000 +0100
+++ setup.py	2015-07-13 17:48:37.000000000 +0200
@@ -1,4 +1,5 @@
 import os.path
+import sys
 from setuptools import setup
 
 classifiers = [
@@ -28,7 +29,7 @@
     py_modules=['pyphen'],
     provides=['pyphen'],
     data_files=[(
-        os.path.join('share', 'pyphen', 'dictionaries'), (
+        os.path.join('share', 'pyphen%s' % sys.version[0:3], 'dictionaries'), (
             os.path.join(_dict_folder, filename)
             for filename in os.listdir(_dict_folder)
             if filename.endswith('.dic')))],