From 519b75aef23d24cb7ea16bae3fed829d9a48be72 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Wed, 22 Apr 2020 10:25:03 +0200 Subject: [PATCH] appveyor: use pre-installed strawberry perl on vs2019 image --- appveyor-test.py | 2 +- appveyor/do.py | 20 +++----------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/appveyor-test.py b/appveyor-test.py index 8d3001d..2e4b4a4 100644 --- a/appveyor-test.py +++ b/appveyor-test.py @@ -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') diff --git a/appveyor/do.py b/appveyor/do.py index d4d4e35..040caca 100644 --- a/appveyor/do.py +++ b/appveyor/do.py @@ -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))