Merge pull request #2756 from theotherjimmy/export-bld-dir

exporters - Add .bld directories to exported project
pull/2822/head^2
Sam Grove 2016-09-27 21:52:57 -07:00 committed by GitHub
commit 816f028c5a
1 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,7 @@
""" The new way of doing exports """
import sys
from os.path import join, abspath, dirname, exists
from os.path import basename, relpath, normpath
from os.path import basename, relpath, normpath, splitext
from os import makedirs, walk
ROOT = abspath(join(dirname(__file__), ".."))
sys.path.insert(0, ROOT)
@ -125,6 +125,12 @@ def zip_export(file_name, prefix, resources, project_files, inc_repos):
source,
join(prefix, loc,
relpath(source, res.file_basepath[source])))
for source in res.lib_builds:
target_dir, _ = splitext(source)
dest = join(prefix, loc,
relpath(target_dir, res.file_basepath[source]),
".bld", "bldrc")
zip_file.write(source, dest)