diff options
author | Baruch Sterin <baruchs@gmail.com> | 2014-06-09 19:00:33 -0700 |
---|---|---|
committer | Baruch Sterin <baruchs@gmail.com> | 2014-06-09 19:00:33 -0700 |
commit | e58713a6a1834b8293405636abbb869a5daa5d4d (patch) | |
tree | 0aabc60287206b342d4a3aaebffaaa92a7f552f1 | |
parent | 6ce9ac9bbdd4247f3fdb8ca4ade2f9b8a983f216 (diff) | |
download | abc-e58713a6a1834b8293405636abbb869a5daa5d4d.tar.gz abc-e58713a6a1834b8293405636abbb869a5daa5d4d.tar.bz2 abc-e58713a6a1834b8293405636abbb869a5daa5d4d.zip |
minor changes to pyabc install script
-rw-r--r-- | src/python/package.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/python/package.py b/src/python/package.py index ab464e0a..4fecce98 100644 --- a/src/python/package.py +++ b/src/python/package.py @@ -25,10 +25,20 @@ def zip_library(f, extra_files = []): zf.close() def add_python_lib(tf, lib_dir, lib, mtime): + + _, prefix = os.path.split(lib) for root, _, files in os.walk(lib): - - arcroot = os.path.join( lib_dir, os.path.relpath(root, lib) ) + + relpath = os.path.relpath(root, lib) + + if relpath=='.': + arcroot = lib_dir + else: + arcroot = os.path.join( lib_dir, os.path.relpath(root, lib) ) + + arcroot = os.path.join(arcroot, prefix) + add_dir(tf, arcroot, mtime) for f in files: @@ -76,6 +86,8 @@ def package(pyabc_dir, extra_bin, extra_lib, abc_exe, abc_sh, pyabc, ofname, scr if scripts_dir: for fn in os.listdir(scripts_dir): + if fn.startswith('.'): + continue fullname = os.path.join(scripts_dir, fn) if os.path.isfile(fullname): fnroot, fnext = os.path.splitext(fn) |