mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-23 08:16:54 +00:00
avoid hidden import, make it easy for pyinstaller
this fixes #218 in an easier way so one doesn't have to type --hidden-import=logging.config all the time when using pyinstaller.
This commit is contained in:
parent
ff6e95534c
commit
234a88bec6
3 changed files with 6 additions and 2 deletions
2
Vagrantfile
vendored
2
Vagrantfile
vendored
|
@ -237,7 +237,7 @@ def build_binary_with_pyinstaller(boxname)
|
|||
cd /vagrant/borg
|
||||
. borg-env/bin/activate
|
||||
cd borg
|
||||
pyinstaller -F -n borg.exe --distpath=/vagrant/borg --clean --hidden-import=logging.config borg/__main__.py
|
||||
pyinstaller -F -n borg.exe --distpath=/vagrant/borg --clean borg/__main__.py
|
||||
EOF
|
||||
end
|
||||
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
import inspect
|
||||
import logging
|
||||
|
||||
# make it easy for PyInstaller (it does not discover the dependency on this
|
||||
# module automatically, because it is lazy-loaded by logging, see #218):
|
||||
import logging.config
|
||||
|
||||
|
||||
def setup_logging(stream=None):
|
||||
"""setup logging module according to the arguments provided
|
||||
|
|
|
@ -129,7 +129,7 @@ When using the Vagrant VMs, pyinstaller will already be installed.
|
|||
With virtual env activated::
|
||||
|
||||
pip install pyinstaller>=3.0 # or git checkout master
|
||||
pyinstaller -F -n borg-PLATFORM --hidden-import=logging.config borg/__main__.py
|
||||
pyinstaller -F -n borg-PLATFORM borg/__main__.py
|
||||
for file in dist/borg-*; do gpg --armor --detach-sign $file; done
|
||||
|
||||
If you encounter issues, see also our `Vagrantfile` for details.
|
||||
|
|
Loading…
Reference in a new issue