Source

lukeplant_python / dist.py

Diff from to

File dist.py

 import shutil
 
 THISDIR = os.path.dirname(os.path.abspath(__file__))
-TOPDIR = os.path.realpath(os.path.dirname(THISDIR))
-SETUPDIR = os.path.realpath(os.path.join(THISDIR, 'setup'))
+TOPDIR = os.path.join(THISDIR, "lukeplant_me_uk")
+SETUPDIR = os.path.join(TOPDIR, 'setup')
 
 if len(sys.argv) == 1:
     print """Usage:
 else:
     d = os.path.join(SETUPDIR, sys.argv[1])
     if not os.path.isdir(d):
-        print "'%s' is not a directory in the setup folder."
+        print "'%s' is not a directory in the setup folder." % sys.argv[1]
         exit(1)
     
     manifest_exists = False
     for f in setup_files:
         fullpath = os.path.join(d, f)
         if os.path.isfile(fullpath):
-            topfile = os.path.join(TOPDIR, f)
+            topfile = os.path.join(THISDIR, f)
             if os.path.isfile(topfile):
                 os.unlink(topfile)
             shutil.copy(fullpath, topfile)
             if f == "MANIFEST.in":
               manifest_exists = True
 
-    os.chdir(TOPDIR)    
+    os.chdir(THISDIR)
     if manifest_exists:
         os.system('python setup.py sdist --force-manifest')
     else:
         
     # Cleanup
     for f in setup_files:
-        topfile = os.path.join(TOPDIR, f)
+        topfile = os.path.join(THISDIR, f)
         if os.path.isfile(topfile):
           os.unlink(topfile)
     if manifest_exists: