add PyInstaller script and hook (#166)

pull/231/head
Mike Fährmann 6 years ago
parent 96c7ccd380
commit 18345381f3
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -23,11 +23,14 @@ release: man completion docs/supportedsites.rst
test:
scripts/run_tests.sh
executable:
scripts/pyinstaller.py
completion: gallery-dl.bash_completion
man: gallery-dl.1 gallery-dl.conf.5
.PHONY: all clean install release test completion man
.PHONY: all clean install release test executable completion man
docs/supportedsites.rst: gallery_dl/*/*.py scripts/supportedsites.py
$(PYTHON) scripts/supportedsites.py

@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
from gallery_dl import extractor, downloader, postprocessor
hiddenimports = [
package.__name__ + "." + module
for package in (extractor, downloader, postprocessor)
for module in package.modules
]

@ -0,0 +1,18 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Build a standalone executable using PyInstaller"""
import PyInstaller.__main__
import util
PyInstaller.__main__.run([
"--onefile",
"--console",
"--name", "gallery-dl." + ("exe" if PyInstaller.is_win else "bin"),
"--additional-hooks-dir", util.path("scripts"),
"--distpath", util.path("dist"),
"--workpath", util.path("build"),
"--specpath", util.path("build"),
util.path("gallery_dl", "__main__.py"),
])
Loading…
Cancel
Save