Commits

3k committed e97141f

fixed issue with setup and finding files after install

Comments (0)

Files changed (4)

 .settings
 MANIFEST
 dist
+build
 *.pyc
 *.png
 *.jpg
     print("pilpal {0}".format(pp.__version__))
 
 try:
+    here = os.getcwd()
+    sys.path.append(here)
+    image_file = os.path.join(here, image_file)
     if not os.path.exists(input_file):
         if not args.force_create:
             s = raw_input("Do you want to create '{0}'? [y/n]: ".format(input_file))
         self.old_label_img = None
         self.running = False
         self.delay = 0.1
-        self.font_book = ImageFont.truetype(Theme.FONT_BOOK, Theme.FONT_SIZE)
-        self.font_bold = ImageFont.truetype(Theme.FONT_BOLD, Theme.FONT_SIZE)
+        self.font_book = ImageFont.truetype(os.path.join(os.path.dirname(__file__), Theme.FONT_BOOK), Theme.FONT_SIZE)
+        self.font_bold = ImageFont.truetype(os.path.join(os.path.dirname(__file__), Theme.FONT_BOLD), Theme.FONT_SIZE)
 
     def log(self, s, deco=None):
         if self.silent:
     download_url="https://bitbucket.org/3k/pilpal/",
     scripts=["bin/pilpal"],
     packages=["pilpal"],
-    data_files=[
-        ("", ["README", "CHANGES", "COPYING"]),
-        ("fonts", [Theme.FONT_BOOK, Theme.FONT_BOLD, "fonts/NOTICE"])],
+    package_data={
+        "pilpal": [Theme.FONT_BOOK, Theme.FONT_BOLD, "fonts/NOTICE"]},
     requires=["PIL"],
     classifiers=[
         "Topic :: Multimedia :: Graphics"