10000 create an initial batch entry point · winpython/winpython@9449f37 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9449f37

Browse files
author
stonebig
committed
create an initial batch entry point
1 parent ac69ada commit 9449f37

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

make.py

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,35 @@ def _create_launchers(self):
610610

611611
self._print_done()
612612

613+
def _create_batch_scripts_initial(self):
614+
"""Create batch scripts"""
615+
self._print("Creating batch scripts initial")
616+
conv = lambda path: ";".join(['%WINPYDIR%\\'+pth for pth in path])
617+
path = conv(self.prepath) + ";%PATH%;" + conv(self.postpath)
618+
self.create_batch_script('env.bat', """@echo off
619+
set WINPYDIR=%~dp0..\\""" + self.python_name + r"""
620+
set WINPYVER=""" + self.winpyver + r"""
621+
set HOME=%WINPYDIR%\..\settings
622+
set WINPYARCH="WIN32"
623+
if "%WINPYDIR:~-5%"=="amd64" set WINPYARCH="WIN-AMD64"
624+
625+
rem handle R if included
626+
if not exist "%WINPYDIR%\..\tools\R\bin" goto r_bad
627+
set R_HOME=%WINPYDIR%\..\tools\R
628+
if %WINPYARCH%=="WIN32" set R_HOMEbin=%R_HOME%\bin\i386
629+
if not %WINPYARCH%=="WIN32" set R_HOMEbin=%R_HOME%\bin\x64
630+
:r_bad
631+
632+
rem handle Julia if included
633+
if not exist "%WINPYDIR%\..\tools\Julia\bin" goto julia_bad
634+
set JULIA_HOME=%WINPYDIR%\..\tools\Julia\bin\
635+
set JULIA_EXE=julia.exe
636+
set JULIA=%JULIA_HOME%%JULIA_EXE%
637+
set JULIA_PKGDIR=%WINPYDIR%\..\settings\.julia
638+
:julia_bad
639+
640+
set PATH=""" + path)
641+
613642
def _create_batch_scripts(self):
614643
"""Create batch scripts"""
615644
self._print("Creating batch scripts")
@@ -935,12 +964,12 @@ def _create_batch_scripts(self):
935964

936965
self._print_done()
937966

938-
def _run_complement_batch_scripts(self):
967+
def _run_complement_batch_scripts(self, this_batch="run_complement.bat"):
939968
""" tools\..\run_complement.bat for final complements"""
940-
print('now run_complement.bat in tooldirs\..')
969+
print('now %s in tooldirs\..' % this_batch)
941970
for post_complement in list(set([osp.dirname(s)
942971
for s in self._toolsdirs])):
943-
filepath = osp.join(post_complement, "run_complement.bat")
972+
filepath = osp.join(post_complement, this_batch)
944973
if osp.isfile(filepath):
945974
print('launch "%s" for "%s"' % (filepath, self.winpydir))
946975
try:
@@ -999,6 +1028,9 @@ def make(self, remove_existing=True):
9991028
if remove_existing:
10001029
if not self.simulation:
10011030
self._add_msvc_files()
1031+
if not self.simulation:
1032+
self._create_batch_scripts_initial()
1033+
self._run_complement_batch_scripts("run_required_first.bat")
10021034
self._install_required_packages()
10031035
self._install_all_other_packages()
10041036
if not self.simulation:
@@ -1164,6 +1196,8 @@ def make_all(build_number, release_level, pyver,
11641196
# verbose=False, archis=(32, ))
11651197
make_all(3, '', pyver='3.4', rootdir=r'D:\Winpython',
11661198
verbose=False, archis=(64, ), flavor='')
1199+
#make_all(3, '', pyver='3.4', rootdir=r'D:\Winpython\basedirQt5',
1200+
# verbose=False, archis=(64, ))
11671201
#make_all(8, '', pyver='3.3', rootdir=r'D:\Winpython',
11681202
# verbose=False, archis=(32, ))
11691203
#make_all(8, '', pyver='3.3', rootdir=r'D:\Winpython',

0 commit comments

Comments
 (0)
0