Python3.8 on centos dance

This commit is contained in:
jpic 2020-02-16 15:15:54 +01:00
parent e20946a0f6
commit 440761fea2
2 changed files with 19 additions and 16 deletions

View File

@ -10,6 +10,8 @@ class Pip(Action):
super().__init__(*pip_packages, pip=pip, requirements=requirements) super().__init__(*pip_packages, pip=pip, requirements=requirements)
async def call(self, *args, **kwargs): async def call(self, *args, **kwargs):
pip = self.kwargs.get('pip', None)
if not pip:
pip = await self.which('pip3', 'pip', 'pip2') pip = await self.which('pip3', 'pip', 'pip2')
if pip: if pip:
pip = pip[0] pip = pip[0]
@ -38,6 +40,7 @@ class Pip(Action):
await self.exec(f'{pip} install --upgrade pip') await self.exec(f'{pip} install --upgrade pip')
# https://github.com/pypa/pip/issues/5599 # https://github.com/pypa/pip/issues/5599
if 'pip' not in self.kwargs:
pip = 'python3 -m pip' pip = 'python3 -m pip'
source = [p for p in self.args if p.startswith('/') or p.startswith('.')] source = [p for p in self.args if p.startswith('/') or p.startswith('.')]

View File

@ -17,7 +17,7 @@ build = Buildah(
'''), '''),
Copy('shlax/', 'setup.py', '/app'), Copy('shlax/', 'setup.py', '/app'),
), ),
Pip('/app'), Pip('/app', pip='python3.8 -m pip'),
commit='yourlabs/shlax', commit='yourlabs/shlax',
workdir='/app', workdir='/app',
) )