Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bbb59d0

Browse files
committed
Merge pull request #297 from stonebig/master
more pre-defined Build directories
2 parents 18c0365 + e2d300e commit bbb59d0

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

make.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def __init__(self, build_number, release_level, target, wheeldir,
121121
self.distribution = None
122122
self.installed_packages = []
123123
self.simulation = simulation
124-
self.rootdir = rootdir # addded to build from winpython
124+
self.rootdir = rootdir # added to build from winpython
125125
self.install_options = install_options
126126
self.flavor = flavor
127127

@@ -899,7 +899,7 @@ def _run_complement_batch_scripts(self, this_batch="run_complement.bat"):
899899

900900
self._print_done()
901901

902-
def make(self, remove_existing=True, requirements=None): #, find_links=None):
902+
def make(self, remove_existing=True, requirements=None, my_winpydir=None): #, find_links=None):
903903
"""Make WinPython distribution in target directory from the installers
904904
located in wheeldir
905905
@@ -921,7 +921,10 @@ def make(self, remove_existing=True, requirements=None): #, find_links=None):
921921
# Create the WinPython base directory
922922
self._print("Creating WinPython %s base directory"
923923
% self.python_version)
924-
self.winpydir = osp.join(self.target, distname)
924+
if my_winpydir is None:
925+
self.winpydir = osp.join(self.target, distname)
926+
else:
927+
self.winpydir = osp.join(self.target, my_winpydir)
925928
if osp.isdir(self.winpydir) and remove_existing \
926929
and not self.simulation:
927930
shutil.rmtree(self.winpydir, onerror=utils.onerror)
@@ -1114,7 +1117,12 @@ def make_all(build_number, release_level, pyver, architecture,
11141117
rootdir=rootdir,
11151118
install_options=install_options + find_list,
11161119
flavor=flavor, docsdirs=docsdirs)
1117-
dist.make(remove_existing=remove_existing, requirements=requirements)
1120+
# define a pre-defined winpydir, instead of having to guess
1121+
my_winpydir = ('winpython-' + ('%s' % architecture) +'bit-' + pyver +
1122+
'.x.' + ('%s' %build_number) ) # + flavor + release_level)
1123+
1124+
dist.make(remove_existing=remove_existing, requirements=requirements,
1125+
my_winpydir=my_winpydir)
11181126
# ,find_links=osp.join(basedir, 'packages.srcreq'))
11191127
if create_installer and not simulation:
11201128
dist.create_installer()

0 commit comments

Comments
 (0)