1. Lars Yencken
  2. cjktools-data

Commits

Lars Yencken  committed 1a601c5

Fixes missing package flag so data is now included.

  • Participants
  • Parent commits f57c626
  • Branches default

Comments (0)

Files changed (2)

File data/__init__.py

View file
  • Ignore whitespace
 #
 
 import pkg_resources
+import codecs
+
+def open_file(filename):
+    return codecs.getreader('utf8')(
+            pkg_resources.resource_stream(__name__, filename)
+        )
+
+def read_file(filename):
+    return pkg_resources.resource_string(__name__, filename).decode('utf8')
 
 # vim: ts=4 sw=4 sts=4 et tw=78:

File setup.py

View file
  • Ignore whitespace
     setup_requires=['setuptools_hg'],
     package_dir={'cjktools_data': 'data'},
     packages=['cjktools_data'],
+    include_package_data=True,
 )
 
 # vim: ts=4 sw=4 sts=4 et tw=78: