mirror of
https://github.com/niess/python-appimage.git
synced 2026-03-14 04:10:15 +01:00
Clean the package layout
This commit is contained in:
@@ -4,7 +4,7 @@ import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
from .deps import fetch_all
|
||||
from .utils.deps import fetch_all
|
||||
|
||||
|
||||
__all__ = ['main']
|
||||
@@ -50,7 +50,7 @@ def main():
|
||||
sys.exit(0)
|
||||
|
||||
# Call the AppImage builder
|
||||
builder = import_module('.' + args.builder, package=__package__)
|
||||
builder = import_module('.builders.' + args.builder, package=__package__)
|
||||
builder.build(*builder._unpack_args(args))
|
||||
|
||||
|
||||
|
||||
5
python_appimage/actions/__init__.py
Normal file
5
python_appimage/actions/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from .build import build_appimage
|
||||
from .relocate import patch_binary, relocate_python
|
||||
|
||||
|
||||
__all__ = ['build_appimage', 'patch_binary', 'relocate_python']
|
||||
@@ -2,11 +2,11 @@ import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from .deps import APPIMAGETOOL, ensure_appimagetool
|
||||
from .docker import docker_run
|
||||
from .fs import copy_tree
|
||||
from .log import debug, log
|
||||
from .tmp import TemporaryDirectory
|
||||
from ..utils.deps import APPIMAGETOOL, ensure_appimagetool
|
||||
from ..utils.docker import docker_run
|
||||
from ..utils.fs import copy_tree
|
||||
from ..utils.log import debug, log
|
||||
from ..utils.tmp import TemporaryDirectory
|
||||
|
||||
|
||||
__all__ = ['build_appimage']
|
||||
@@ -4,11 +4,11 @@ import re
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from .deps import EXCLUDELIST, PATCHELF, PREFIX, ensure_excludelist, \
|
||||
ensure_patchelf
|
||||
from .fs import make_tree, copy_file, copy_tree, remove_file, remove_tree
|
||||
from .log import debug, log
|
||||
from .system import ldd, system
|
||||
from ..utils.deps import EXCLUDELIST, PATCHELF, PREFIX, ensure_excludelist, \
|
||||
ensure_patchelf
|
||||
from ..utils.fs import make_tree, copy_file, copy_tree, remove_file, remove_tree
|
||||
from ..utils.log import debug, log
|
||||
from ..utils.system import ldd, system
|
||||
|
||||
|
||||
__all__ = ["patch_binary", "relocate_python"]
|
||||
0
python_appimage/builders/__init__.py
Normal file
0
python_appimage/builders/__init__.py
Normal file
@@ -2,9 +2,8 @@ import glob
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from .build import build_appimage
|
||||
from .relocate import relocate_python
|
||||
from .tmp import TemporaryDirectory
|
||||
from ..actions import build_appimage, relocate_python
|
||||
from ..utils.tmp import TemporaryDirectory
|
||||
|
||||
|
||||
__all__ = ['build']
|
||||
@@ -4,11 +4,10 @@ import platform
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from .build import build_appimage
|
||||
from .docker import docker_run
|
||||
from .fs import copy_tree
|
||||
from .relocate import relocate_python
|
||||
from .tmp import TemporaryDirectory
|
||||
from ..actions import build_appimage, relocate_python
|
||||
from ..utils.docker import docker_run
|
||||
from ..utils.fs import copy_tree
|
||||
from ..utils.tmp import TemporaryDirectory
|
||||
|
||||
|
||||
__all__ = ['build']
|
||||
@@ -42,7 +41,7 @@ def build(tag, abi, contained=False):
|
||||
python = '/opt/python/' + abi + '/bin/python'
|
||||
|
||||
pwd = os.getcwd()
|
||||
dirname = os.path.abspath(os.path.dirname(__file__))
|
||||
dirname = os.path.abspath(os.path.dirname(__file__) + '/..')
|
||||
with TemporaryDirectory() as tmpdir:
|
||||
copy_tree(dirname, 'python_appimage')
|
||||
|
||||
0
python_appimage/utils/__init__.py
Normal file
0
python_appimage/utils/__init__.py
Normal file
@@ -17,7 +17,7 @@ __all__ = ['APPIMAGETOOL', 'EXCLUDELIST', 'PATCHELF', 'PREFIX',
|
||||
_ARCH = platform.machine()
|
||||
|
||||
|
||||
PREFIX = os.path.abspath(os.path.dirname(__file__))
|
||||
PREFIX = os.path.abspath(os.path.dirname(__file__) + '/..')
|
||||
'''Package installation prefix'''
|
||||
|
||||
APPIMAGETOOL = PREFIX + '/bin/appimagetool.' + _ARCH
|
||||
Reference in New Issue
Block a user