diff --git a/Vagrantfile b/Vagrantfile index 02b43c91e..dbb73f377 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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 diff --git a/borg/logger.py b/borg/logger.py index 6c5d2ff81..2d4b49bc1 100644 --- a/borg/logger.py +++ b/borg/logger.py @@ -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 diff --git a/docs/development.rst b/docs/development.rst index 23f28385a..f51ea414c 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -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.