|
|
@@ -7,6 +7,7 @@ import sys
|
|
|
from ...appimage import build_appimage, relocate_python
|
|
|
from ...utils.docker import docker_run
|
|
|
from ...utils.fs import copy_tree
|
|
|
+from ...utils.manylinux import format_appimage_name, format_tag
|
|
|
from ...utils.tmp import TemporaryDirectory
|
|
|
|
|
|
|
|
|
@@ -19,15 +20,6 @@ def _unpack_args(args):
|
|
|
return args.tag, args.abi, args.contained
|
|
|
|
|
|
|
|
|
-def _manylinux_tag(tag):
|
|
|
- '''Format Manylinux tag
|
|
|
- '''
|
|
|
- if tag.startswith('2_'):
|
|
|
- return 'manylinux_' + tag
|
|
|
- else:
|
|
|
- return 'manylinux' + tag
|
|
|
-
|
|
|
-
|
|
|
def _get_appimage_name(abi, tag):
|
|
|
'''Format the Python AppImage name using the ABI and OS tags
|
|
|
'''
|
|
|
@@ -36,8 +28,7 @@ def _get_appimage_name(abi, tag):
|
|
|
fullversion = desktop[13:-8]
|
|
|
|
|
|
# Finish building the AppImage on the host. See below.
|
|
|
- return 'python{:}-{:}-{:}.AppImage'.format(
|
|
|
- fullversion, abi, _manylinux_tag(tag))
|
|
|
+ return format_appimage_name(abi, fullversion, tag)
|
|
|
|
|
|
|
|
|
def execute(tag, abi, contained=False):
|
|
|
@@ -46,7 +37,7 @@ def execute(tag, abi, contained=False):
|
|
|
|
|
|
if not contained:
|
|
|
# Forward the build to a Docker image
|
|
|
- image = 'quay.io/pypa/' + _manylinux_tag(tag)
|
|
|
+ image = 'quay.io/pypa/' + format_tag(tag)
|
|
|
python = '/opt/python/' + abi + '/bin/python'
|
|
|
|
|
|
pwd = os.getcwd()
|
|
|
@@ -54,7 +45,11 @@ def execute(tag, abi, contained=False):
|
|
|
with TemporaryDirectory() as tmpdir:
|
|
|
copy_tree(dirname, 'python_appimage')
|
|
|
|
|
|
- argv = ' '.join(sys.argv[1:])
|
|
|
+ argv = sys.argv[1:]
|
|
|
+ if argv:
|
|
|
+ argv = ' '.join(argv)
|
|
|
+ else:
|
|
|
+ argv = 'build manylinux {:} {:}'.format(tag, abi)
|
|
|
if tag.startswith("1_"):
|
|
|
# On manylinux1 tk is not installed
|
|
|
script = [
|