diff --git a/.pypkg b/.pypkg new file mode 100644 index 0000000..9678575 --- /dev/null +++ b/.pypkg @@ -0,0 +1,12 @@ + +{ + "output": "./lib-{target}.egg", + "targets": { + "2-6": "py -2.6", + "2-7": "py -2.7" + }, + "include": [ + "lib/c4d_xpat", + "lib/py-nr.c4d/nr" + ] +} diff --git a/bootstrapper.pyp b/bootstrapper.pyp index e3545fb..b5275ea 100644 --- a/bootstrapper.pyp +++ b/bootstrapper.pyp @@ -36,16 +36,19 @@ fQ60Krofvon9LAfvuo901Gq6npmsOjZBR8kHrQa0fH4+QDOcd/pj7CNO47g+HR8+WrlZ/AaI7XVw=' exec(z.decompress(b.b64decode(blob)), vars(m)); _localimport=m;localimport=getattr(m,"localimport") del blob, b, t, z, m; -path = ['.'] +import os +import sys -import os, sys +path = [] project_dir = os.path.dirname(__file__) -lib_archive = os.path.join(project_dir, 'lib-' + sys.version[:3].replace('.', '-') + '.egg') -lib_dir = os.path.join(project_dir, 'lib') -if os.path.join(lib_dir): # During development - path.append(lib_dir) -else: # Release - path.append(lib_archive) + +def get_libpath(): + libdir = os.path.join(project_dir, 'lib') + if os.path.isdir(libdir): + return libdir + return libdir + '-' + sys.version[:3].replace('.', '-') + '.egg' + +path.append(get_libpath()) with localimport(path, do_eggs=False) as importer: import c4d_xpat.res diff --git a/c4d_xpat/__init__.py b/lib/c4d_xpat/__init__.py similarity index 100% rename from c4d_xpat/__init__.py rename to lib/c4d_xpat/__init__.py diff --git a/c4d_xpat/main.py b/lib/c4d_xpat/main.py similarity index 100% rename from c4d_xpat/main.py rename to lib/c4d_xpat/main.py diff --git a/c4d_xpat/res.py b/lib/c4d_xpat/res.py similarity index 100% rename from c4d_xpat/res.py rename to lib/c4d_xpat/res.py