Commits

Anonymous committed 6d58291

Improvements in create-package and fixed install-posix

  • Participants
  • Parent commits 50d082d

Comments (0)

Files changed (2)

scripts/create-package

     subprocess.call([os.path.join(dir, 'scripts', script)] + list(args or ()))
 
 
+def delete_pycs(folder):
+    for dirname, folders, files in os.walk(folder):
+        for filename in files:
+            if filename.endswith('.pyc'):
+                filename = os.path.join(folder, dirname, filename)
+                os.remove(filename)
+
+
 def build(dst_dir, build_dir, formats):
     zine_version = get_zine_version()
     release_name = 'Zine-%s' % '-'.join(zine_version.split())
     finally:
         os.chdir(old_dir)
 
+    # delete .pyc files the documentation builder might have created
+    delete_pycs(release_dir)
+
     # now create the archives
     messages = []
     old_dir = os.getcwd()

scripts/install-posix

 
 # copy the server files and adjust the ZINE_LIB path
 cp -R $SRC/../servers $PREFIX/share/zine
-sed -i '' -E -e "s|^ZINE_LIB =.*$|ZINE_LIB = '$PREFIX/lib/zine'|g" \
+sed -i '' -e "s|^ZINE_LIB =.*$|ZINE_LIB = '$PREFIX/lib/zine'|g" \
     -e "s|^#!/usr/bin/python|#!$PYTHON|g" $PREFIX/share/zine/servers/*
 
 # copy some of the scripts
   chmod +x $PREFIX/share/zine/scripts
 done
 cp $SRC/../scripts/_init_zine.py $PREFIX/share/zine/scripts
-sed -i '' -E -e "s|^ZINE_LIB = None$|ZINE_LIB = '$PREFIX/lib/zine'|g" \
+sed -i '' -e "s|^ZINE_LIB = None$|ZINE_LIB = '$PREFIX/lib/zine'|g" \
    $PREFIX/share/zine/scripts/_init_zine.py
-sed -i '' -E -e "s|^#!/usr/bin/(env )?python|#!$PYTHON|g" \
+sed -i '' -e "s|^#!/usr/bin/(env )?python|#!$PYTHON|g" \
    $PREFIX/share/zine/scripts/*
 
 echo "All done."