mirror of
https://github.com/niess/python-appimage.git
synced 2026-03-14 04:10:15 +01:00
Build specific image tags
This commit is contained in:
@@ -12,14 +12,22 @@ __all__ = ['Arch', 'Downloader', 'ensure_image', 'ImageExtractor', 'LinuxTag',
|
||||
def ensure_image(tag):
|
||||
'''Extract a manylinux image to the cache'''
|
||||
|
||||
try:
|
||||
tag, image_tag = tag.rsplit(':', 1)
|
||||
except ValueError:
|
||||
image_tag = 'latest'
|
||||
|
||||
tag, arch = tag.split('_', 1)
|
||||
tag = LinuxTag.from_brief(tag)
|
||||
arch = Arch.from_str(arch)
|
||||
|
||||
downloader = Downloader(tag=tag, arch=arch)
|
||||
downloader.download()
|
||||
downloader.download(tag=image_tag)
|
||||
|
||||
image_extractor = ImageExtractor(downloader.default_destination())
|
||||
image_extractor = ImageExtractor(
|
||||
prefix = downloader.default_destination(),
|
||||
tag = image_tag
|
||||
)
|
||||
image_extractor.extract()
|
||||
|
||||
return SimpleNamespace(
|
||||
|
||||
@@ -56,6 +56,7 @@ class Downloader:
|
||||
def download(
|
||||
self,
|
||||
destination: Optional[Path]=None,
|
||||
*,
|
||||
tag: Optional[str] = 'latest'
|
||||
):
|
||||
'''Download Manylinux image'''
|
||||
|
||||
Reference in New Issue
Block a user