Skip to content

Commit

Permalink
move c4d_xpat to lib/ directory, add .pypkg and update bootstrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasRosenstein committed Feb 26, 2018
1 parent 5d5b24f commit 52f91c1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .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"
]
}
19 changes: 11 additions & 8 deletions bootstrapper.pyp
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 52f91c1

Please sign in to comment.