Skip to content

Commit a8138e1

Browse files
authored
Update buildtools.py
1 parent c33adc3 commit a8138e1

File tree

1 file changed

+1
-55
lines changed

1 file changed

+1
-55
lines changed

buildscripts/buildtools.py

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -363,20 +363,9 @@ def create_local_batch_file(self, make_clean, cmd_line, log_file):
363363
if make_clean:
364364
file.write('nmake clean >> %LOG_NAME% 2>&1' + os.linesep)
365365
file.write('nmake >> %LOG_NAME% 2>&1' + os.linesep)
366-
file.write('type %LOG_NAME%')
367366
file.write('exit' + os.linesep)
368367
file.close()
369368

370-
cur_dir = os.getcwd();
371-
print("---")
372-
dir_list = os.listdir(cur_dir)
373-
print("Files and directories in cur_dir '", cur_dir, "' :")
374-
print(dir_list)
375-
print("---")
376-
print(filename)
377-
print("---")
378-
379-
380369
return filename
381370
except:
382371
print('Cannot create ', filename)
@@ -405,9 +394,6 @@ def build_drivers(self, make_clean = False, dest = None, log_file = None):
405394
log_file = self.get_logfile_name()
406395

407396
batch_file = self.create_local_batch_file(make_clean, cmd_line, log_file)
408-
409-
print("log_file = ", log_file)
410-
print("batch_file = ", batch_file)
411397

412398
# Reference: https://github.com/php/php-sdk-binary-tools
413399
# Clone the master branch of PHP sdk if the directory does not exist
@@ -427,21 +413,6 @@ def build_drivers(self, make_clean = False, dest = None, log_file = None):
427413
os.system('git pull ')
428414
print('Done cloning the latest php SDK...')
429415

430-
dir_list_0 = os.listdir(sdk_dir)
431-
print("Files and directories in sdk_dir '", sdk_dir, "' :")
432-
print(dir_list_0)
433-
print("---")
434-
435-
dir_list_1 = os.listdir(phpSDK)
436-
print("Files and directories in phpSDK '", phpSDK, "' :")
437-
print(dir_list_1)
438-
print("---")
439-
440-
phpdev_dir = os.path.join(phpSDK, 'phpdev')
441-
if os.path.exists(phpdev_dir):
442-
print("phpdev exists")
443-
else:
444-
print('.')
445416
# Move the generated batch file to phpSDK for the php starter script
446417
print('Moving the sdk bath file over...')
447418
sdk_batch_file = os.path.join(phpSDK, batch_file)
@@ -457,11 +428,6 @@ def build_drivers(self, make_clean = False, dest = None, log_file = None):
457428
os.chmod(sdk_source, stat.S_IWRITE)
458429
shutil.rmtree(sdk_source, ignore_errors=True)
459430
shutil.move(source_dir, phpSDK)
460-
461-
if os.path.exists(phpdev_dir):
462-
print("phpdev exists")
463-
else:
464-
print('.')
465431

466432
# Invoke phpsdk-<vc>-<arch>.bat
467433
vc = self.compiler_version(sdk_dir)
@@ -470,22 +436,7 @@ def build_drivers(self, make_clean = False, dest = None, log_file = None):
470436
os.system(starter_script + ' -t ' + batch_file)
471437
print('Starter script complete')
472438

473-
if os.path.exists(phpdev_dir):
474-
print("phpdev exists")
475-
476-
dir_list = os.listdir(sdk_dir)
477-
print("Files and directories in sdk_dir '", sdk_dir, "' :")
478-
print(dir_list)
479-
print("---")
480-
481-
build_dir = self.build_abs_path(sdk_dir)
482-
dir_list = os.listdir(build_dir)
483-
print("Files and directories in build_dir '", build_dir, "' :")
484-
print(dir_list)
485-
print("---")
486-
else:
487-
print('.')
488-
439+
489440
# Now we can safely remove the Source folder, because its contents have
490441
# already been modified prior to building the extensions
491442
shutil.rmtree(os.path.join(phpSDK, 'Source'), ignore_errors=True)
@@ -496,11 +447,6 @@ def build_drivers(self, make_clean = False, dest = None, log_file = None):
496447
self.rename_binaries(sdk_dir)
497448
print('rename_binaries complete')
498449

499-
if os.path.exists(phpdev_dir):
500-
print("phpdev exists")
501-
else:
502-
print('.')
503-
504450
# Final step, copy the binaries to the right place
505451
ext_dir = self.copy_binaries(sdk_dir, copy_to_ext)
506452
print('copy_binaries complete')

0 commit comments

Comments
 (0)