appveyor: use pre-installed strawberry perl on vs2019 image

This commit is contained in:
Ralph Lange
2020-04-22 10:25:03 +02:00
parent e8b01bf1a0
commit 519b75aef2
2 changed files with 4 additions and 18 deletions

View File

@@ -377,7 +377,7 @@ class TestSetupForBuild(unittest.TestCase):
def test_StrawberryInPath(self):
os.environ['CMP'] = 'vs2019'
do.setup_for_build(self.args)
self.assertTrue(re.search('strawberry', os.environ['PATH']),
self.assertTrue(re.search('strawberry', os.environ['PATH'], flags=re.IGNORECASE),
'Strawberry Perl location not in PATH for vs2019')

View File

@@ -355,9 +355,9 @@ def setup_for_build(args):
os.environ['EPICS_HOST_ARCH'] = 'windows-x64' + hostarchsuffix
if os.environ['CMP'] == 'vs2019':
# put our strawberry 'perl' in the PATH
os.environ['PATH'] = os.pathsep.join([os.path.join(toolsdir, 'strawberry', 'perl', 'site', 'bin'),
os.path.join(toolsdir, 'strawberry', 'perl', 'bin'),
# put strawberry perl in the PATH
os.environ['PATH'] = os.pathsep.join([os.path.join(r'C:\Strawberry\perl\site\bin'),
os.path.join(r'C:\Strawberry\perl\bin'),
os.environ['PATH']])
if os.environ['CMP'] == 'mingw':
if 'INCLUDE' not in os.environ:
@@ -468,20 +468,6 @@ def prepare(args):
sp.check_call([zip7, 'e', 'make-{0}.zip'.format(makever)], cwd=toolsdir)
os.remove(os.path.join(toolsdir, 'make-{0}.zip'.format(makever)))
perlver = '5.30.0.1'
if os.environ['CMP'] == 'vs2019':
if not os.path.isdir(os.path.join(toolsdir, 'strawberry')):
print('Installing Strawberry Perl {0}'.format(perlver))
sys.stdout.flush()
sp.check_call(['curl', '-fsS', '--retry', '3', '-o', 'perl-{0}.zip'.format(perlver),
'http://strawberryperl.com/download/{0}/strawberry-perl-{0}-64bit.zip'.format(perlver)],
cwd=toolsdir)
sp.check_call([zip7, 'x', 'perl-{0}.zip'.format(perlver), '-ostrawberry'], cwd=toolsdir)
os.remove(os.path.join(toolsdir, 'perl-{0}.zip'.format(perlver)))
with open(os.devnull, 'w') as devnull:
sp.check_call('relocation.pl.bat', shell=True, stdout=devnull,
cwd=os.path.join(toolsdir, 'strawberry'))
setup_for_build(args)
print('{0}EPICS_HOST_ARCH = {1}{2}'.format(ANSI_CYAN, os.environ['EPICS_HOST_ARCH'], ANSI_RESET))