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):
|
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():
|
def make_ubuntu_base():
|
||||||
|
|
@ -54,6 +54,17 @@ def make_ubuntu_base():
|
||||||
return base_paths
|
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.
|
# FIX: This isn`t making the correct libunionpreload.
|
||||||
# def make_libunionpreload():
|
# def make_libunionpreload():
|
||||||
# #See https://github.com/AppImage/AppImages/blob/master/recipes/meta/Recipe
|
# #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."
|
assert os.getuid() == 0 and os.getgid() == 0, "Need to be root."
|
||||||
os.chdir(work_path)
|
os.chdir(work_path)
|
||||||
base_paths = make_ubuntu_base()
|
base_paths = make_ubuntu_base()
|
||||||
test_distributions.run_in_container("ubuntu", "./install-dependencies")
|
install_vigil()
|
||||||
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 .")
|
|
||||||
post_install_paths = relative_paths("ubuntu", all_paths("ubuntu"))
|
post_install_paths = relative_paths("ubuntu", all_paths("ubuntu"))
|
||||||
new_paths = set(post_install_paths) - set(base_paths)
|
new_paths = set(post_install_paths) - set(base_paths)
|
||||||
new_paths = filter_paths(new_paths, "/var/cache/apt/archives")
|
new_paths = filter_paths(new_paths, "/var/cache/apt/archives")
|
||||||
|
|
@ -107,6 +113,6 @@ def main(work_path):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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])
|
if len(sys.argv) == 1 else sys.argv[1])
|
||||||
main(work_path)
|
main(work_path)
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,10 @@
|
||||||
import ast
|
import ast
|
||||||
import asyncio
|
import asyncio
|
||||||
import contextlib
|
import contextlib
|
||||||
import dis
|
|
||||||
import enum
|
import enum
|
||||||
import functools
|
import functools
|
||||||
import gzip
|
import gzip
|
||||||
import hashlib
|
import hashlib
|
||||||
import io
|
|
||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue