summaryrefslogtreecommitdiff
path: root/textproc/py-pyphen
diff options
context:
space:
mode:
authorkleink <kleink@pkgsrc.org>2015-07-13 16:13:55 +0000
committerkleink <kleink@pkgsrc.org>2015-07-13 16:13:55 +0000
commit31a8ba479c42dd826cd604308e72b6b8e87a4224 (patch)
tree5c42224129101264ff1c93f671d261d39e86289b /textproc/py-pyphen
parent3cb898009a9d40521ac0045e8a644d9e65dfdf3f (diff)
downloadpkgsrc-31a8ba479c42dd826cd604308e72b6b8e87a4224.tar.gz
Import Pyphen-0.9.1 as textproc/py-pyphen.
Pyphen is a pure Python module to hyphenate text using existing Hunspell hyphenation dictionaries.
Diffstat (limited to 'textproc/py-pyphen')
-rw-r--r--textproc/py-pyphen/DESCR2
-rw-r--r--textproc/py-pyphen/Makefile18
-rw-r--r--textproc/py-pyphen/PLIST74
-rw-r--r--textproc/py-pyphen/distinfo7
-rw-r--r--textproc/py-pyphen/patches/patch-pyphen.py19
-rw-r--r--textproc/py-pyphen/patches/patch-setup.py21
6 files changed, 141 insertions, 0 deletions
diff --git a/textproc/py-pyphen/DESCR b/textproc/py-pyphen/DESCR
new file mode 100644
index 00000000000..348a0822f91
--- /dev/null
+++ b/textproc/py-pyphen/DESCR
@@ -0,0 +1,2 @@
+Pyphen is a pure Python module to hyphenate text using existing
+Hunspell hyphenation dictionaries.
diff --git a/textproc/py-pyphen/Makefile b/textproc/py-pyphen/Makefile
new file mode 100644
index 00000000000..9ba8663e446
--- /dev/null
+++ b/textproc/py-pyphen/Makefile
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2015/07/13 16:13:55 kleink Exp $
+
+DISTNAME= Pyphen-0.9.1
+PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl}
+CATEGORIES= textproc python
+MASTER_SITES= ${MASTER_SITE_PYPI:=P/Pyphen/}
+
+MAINTAINER= kleink@NetBSD.org
+HOMEPAGE= http://pyphen.org/
+COMMENT= Pure Python module to hyphenate text
+LICENSE= gnu-gpl-v2 OR gnu-lgpl-v2.1 OR mpl-1.1
+
+USE_LANGUAGES= # empty
+
+PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX:Q}
+
+.include "../../lang/python/egg.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/py-pyphen/PLIST b/textproc/py-pyphen/PLIST
new file mode 100644
index 00000000000..bc1f542c354
--- /dev/null
+++ b/textproc/py-pyphen/PLIST
@@ -0,0 +1,74 @@
+@comment $NetBSD: PLIST,v 1.1 2015/07/13 16:13:55 kleink Exp $
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/not-zip-safe
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/pyphen.py
+${PYSITELIB}/pyphen.pyc
+${PYSITELIB}/pyphen.pyo
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_af.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_af_ZA.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_bg.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_bg_BG.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_ca.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_cs.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_cs_CZ.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_da.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_da_DK.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_de.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_de_AT.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_de_CH.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_de_DE.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_el.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_el_GR.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_en.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_en_GB.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_en_Latn_GB.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_en_Latn_US.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_en_US.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_es.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_et.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_et_EE.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_fr.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_gl.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_hr.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_hr_HR.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_hu.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_hu_HU.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_it.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_it_IT.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_lt.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_lt_LT.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_lv.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_lv_LV.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_nb.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_nb_NO.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_nl.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_nl_NL.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_nn.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_nn_NO.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_pl.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_pl_PL.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_pt.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_pt_BR.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_pt_Latn_BR.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_pt_Latn_PT.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_pt_PT.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_ro.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_ro_RO.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_ru.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_ru_RU.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_sk.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_sk_SK.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_sl.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_sl_SI.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_sr.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_sr_Latn.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_sv.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_te.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_te_IN.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_uk.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_uk_UA.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_zu.dic
+share/pyphen${PYVERSSUFFIX}/dictionaries/hyph_zu_ZA.dic
diff --git a/textproc/py-pyphen/distinfo b/textproc/py-pyphen/distinfo
new file mode 100644
index 00000000000..f34f8a54893
--- /dev/null
+++ b/textproc/py-pyphen/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2015/07/13 16:13:55 kleink Exp $
+
+SHA1 (Pyphen-0.9.1.tar.gz) = 95cb2eb255b5cdbcf65b8fcbd8bfe2ff780b8b4e
+RMD160 (Pyphen-0.9.1.tar.gz) = 9a149c49098313448e7ac90832aab26e0fe7c634
+Size (Pyphen-0.9.1.tar.gz) = 1020062 bytes
+SHA1 (patch-pyphen.py) = 8d4df310338181d380cf13307c0eccc86b24ff74
+SHA1 (patch-setup.py) = 7834ffe12a25c91bd31a4a3fd15ea2051b8434cb
diff --git a/textproc/py-pyphen/patches/patch-pyphen.py b/textproc/py-pyphen/patches/patch-pyphen.py
new file mode 100644
index 00000000000..915f56534b5
--- /dev/null
+++ b/textproc/py-pyphen/patches/patch-pyphen.py
@@ -0,0 +1,19 @@
+$NetBSD: patch-pyphen.py,v 1.1 2015/07/13 16:13:55 kleink Exp $
+
+Adjust dictionaries path to allow multiple Python version installs.
+
+--- pyphen.py.orig 2013-12-27 17:53:36.000000000 +0100
++++ pyphen.py 2015-07-13 17:48:37.000000000 +0200
+@@ -53,10 +53,10 @@
+ else:
+ dictionaries_roots = (os.path.join(
+ pkg_resources.resource_filename('pyphen', ''),
+- 'share', 'pyphen', 'dictionaries'),)
++ 'share', 'pyphen%s' % sys.version[0:3], 'dictionaries'),)
+ finally:
+ dictionaries_roots += (
+- os.path.join(sys.prefix, 'share', 'pyphen', 'dictionaries'),
++ os.path.join(sys.prefix, 'share', 'pyphen%s' % sys.version[0:3], 'dictionaries'),
+ os.path.join(os.path.dirname(__file__), 'dictionaries'))
+
+
diff --git a/textproc/py-pyphen/patches/patch-setup.py b/textproc/py-pyphen/patches/patch-setup.py
new file mode 100644
index 00000000000..930fa411bd5
--- /dev/null
+++ b/textproc/py-pyphen/patches/patch-setup.py
@@ -0,0 +1,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')))],