mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-13 20:52:39 -04:00
builder: Allow .pyc files without .py
This is common for binary-only releases, for example as described in: https://lists.freedesktop.org/archives/flatpak/2017-June/000697.html
This commit is contained in:
37
tests/org.test.Python2.json
Normal file
37
tests/org.test.Python2.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"app-id": "org.test.Python2",
|
||||
"runtime": "org.test.PythonPlatform",
|
||||
"sdk": "org.test.PythonSdk",
|
||||
"command": "testpython.py",
|
||||
"modules": [
|
||||
{
|
||||
"name": "compiled-python",
|
||||
"post-install": [
|
||||
"mkdir /app/bin",
|
||||
"cp testpython.py /app/bin",
|
||||
"cp importme.py /app/bin",
|
||||
/* Compile importme.py */
|
||||
"/app/bin/testpython.py",
|
||||
/* Remove .py file, but keep .pyc */
|
||||
"rm /app/bin/importme.py",
|
||||
/* Make sure it still works */
|
||||
"/app/bin/testpython.py"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"path": "empty-configure",
|
||||
"dest-filename": "configure"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "testpython.py"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "importme.py"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user