3k avatar 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"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.