Coding style.
This commit is contained in:
parent
0e68dd2e43
commit
f583b66437
3 changed files with 20 additions and 16 deletions
|
|
@ -38,7 +38,7 @@ def make_sub_container(src_root, dest_root, paths):
|
|||
|
||||
|
||||
def filter_paths(paths, excluded):
|
||||
return [path for path in paths if not excluded in path]
|
||||
return [path for path in paths if excluded not in path]
|
||||
|
||||
|
||||
def make_ubuntu_base():
|
||||
|
|
@ -54,6 +54,17 @@ def make_ubuntu_base():
|
|||
return base_paths
|
||||
|
||||
|
||||
def install_vigil():
|
||||
run_in_container = test_distributions.run_in_container
|
||||
run_in_container("ubuntu", "./install-dependencies")
|
||||
# libunionpreload doesn't trick shebangs?
|
||||
run_in_container("ubuntu", "sed -i -e "
|
||||
"'s/\/usr\/bin\/python/\/usr\/bin\/env python/g' "
|
||||
"/usr/bin/pdf2txt")
|
||||
run_in_container("ubuntu", "apt-get install --yes python3-pip")
|
||||
run_in_container("ubuntu", "pip3 install -I .")
|
||||
|
||||
|
||||
# FIX: This isn`t making the correct libunionpreload.
|
||||
# def make_libunionpreload():
|
||||
# #See https://github.com/AppImage/AppImages/blob/master/recipes/meta/Recipe
|
||||
|
|
@ -90,12 +101,7 @@ def main(work_path):
|
|||
assert os.getuid() == 0 and os.getgid() == 0, "Need to be root."
|
||||
os.chdir(work_path)
|
||||
base_paths = make_ubuntu_base()
|
||||
test_distributions.run_in_container("ubuntu", "./install-dependencies")
|
||||
test_distributions.run_in_container(
|
||||
"ubuntu", "sed -i -e 's/\/usr\/bin\/python/\/usr\/bin\/env python/g' "
|
||||
"/usr/bin/pdf2txt") # libunionpreload doesn't trick shebangs?
|
||||
test_distributions.run_in_container("ubuntu", "apt-get install --yes python3-pip")
|
||||
test_distributions.run_in_container("ubuntu", "pip3 install -I .")
|
||||
install_vigil()
|
||||
post_install_paths = relative_paths("ubuntu", all_paths("ubuntu"))
|
||||
new_paths = set(post_install_paths) - set(base_paths)
|
||||
new_paths = filter_paths(new_paths, "/var/cache/apt/archives")
|
||||
|
|
@ -107,6 +113,6 @@ def main(work_path):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
work_path = (tempfile.mkdtemp(prefix="make-appimage2-")
|
||||
work_path = (tempfile.mkdtemp(prefix="make-appimage-")
|
||||
if len(sys.argv) == 1 else sys.argv[1])
|
||||
main(work_path)
|
||||
|
|
|
|||
|
|
@ -6,12 +6,10 @@
|
|||
import ast
|
||||
import asyncio
|
||||
import contextlib
|
||||
import dis
|
||||
import enum
|
||||
import functools
|
||||
import gzip
|
||||
import hashlib
|
||||
import io
|
||||
import math
|
||||
import os
|
||||
import os.path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue