-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmanifest.yml
97 lines (97 loc) · 3.07 KB
/
manifest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
app-id: {{ cookiecutter.bundle_identifier }}
default-branch: {{ cookiecutter.version }}
runtime: {{ cookiecutter.flatpak_runtime }}
runtime-version: '{{ cookiecutter.flatpak_runtime_version }}'
sdk: {{ cookiecutter.flatpak_sdk }}
command: {{ cookiecutter.app_name }}
cleanup:
- /include
- /share/man
finish-args:
{%- if cookiecutter.finish_args -%}
{%- for arg, enabled in cookiecutter.finish_args.items() -%}
{%- if enabled %}
- --{{ arg }}
{%- endif -%}
{%- endfor -%}
{%- endif %}
modules:
- name: cpython
buildsystem: simple
build-commands:
- mkdir -p /app/bin
- cp --archive support/python/bin/* /app/bin
- mkdir -p /app/include
- cp --archive support/python/include/* /app/include
- mkdir -p /app/lib
- cp --archive support/python/lib/* /app/lib
# Update installation prefix for pip package builds
- sed --follow-symlinks -i 's/prefix="\/install"/prefix="\/app"/g' /app/bin/python3-config
- sed --follow-symlinks -i 's/prefix=\/install/prefix=\/app/g' /app/lib/pkgconfig/python3.pc /app/lib/pkgconfig/python3-embed.pc
sources:
- type: dir
path: support/python
dest: support/python
cleanup:
- /bin/2to3*
- /bin/idle*
- /lib/python*/config-*
- name: bootstrap
no-autogen: true
sources:
- type: dir
path: src/bootstrap/
- name: resources
buildsystem: simple
build-commands:
- install -D {{ cookiecutter.bundle_identifier }}.desktop /app/share/applications/{{ cookiecutter.bundle_identifier }}.desktop
- cp --archive icons /app/share/icons
sources:
- type: file
path: {{ cookiecutter.bundle_identifier }}.desktop
- type: dir
path: icons/
dest: icons/
- name: upgrade_pip
buildsystem: simple
build-options:
build-args:
- --share=network # For downloaded requirements.
build-commands:
- /app/bin/python3 -m pip install --upgrade pip
{{ cookiecutter.modules_extra_content }}
- name: app_packages
buildsystem: simple
build-options:
strip: false
no-debuginfo: true
build-args:
- --filesystem=host # For local requirements.
- --share=network # For downloaded requirements.
build-commands:
- mkdir -p /app/briefcase/app_packages
# Python-standalone is configured using clang; but clang isn't in
# the Flatpak build environment. However, clang and gcc are (mostly)
# command line compatible, and the output objects are compatible,
# so we can override the CC build environment variable to force the
# use of gcc.
- CC="gcc -pthread" /app/bin/python3 pip_install.py
sources:
- type: file
path: requirements.txt
- type: file
path: pip-options.txt
- type: file
path: pip_install.py
- name: app
buildsystem: simple
build-options:
strip: false
no-debuginfo: true
build-commands:
- mkdir -p /app/briefcase
- cp --archive src/app/ /app/briefcase/app
sources:
- type: dir
path: src/app/
dest: src/app/