Skip to content

Commit

Permalink
Add copy_metadata to pycountry hook (#113)
Browse files Browse the repository at this point in the history
Based off this thread: http://pyinstaller.47505.x6.nabble.com/PyInstaller-not-working-with-module-pycountry-td3064.html
I faced this same issue and used this modified hook, and it worked.
  • Loading branch information
obsidianforensics authored Apr 27, 2021
1 parent bcf8e1b commit f3cd1cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/113.update.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the hook for ``pycountry`` to copy metadata, in addition to collecting data files.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ------------------------------------------------------------------

from PyInstaller.utils.hooks import collect_data_files
from PyInstaller.utils.hooks import collect_data_files, copy_metadata

# pycountry requires the ISO databases for country data.
# Tested v1.15 on Linux/Ubuntu.
# https://pypi.python.org/pypi/pycountry
datas = collect_data_files('pycountry')
datas = copy_metadata('pycountry') + collect_data_files('pycountry')

0 comments on commit f3cd1cd

Please # to comment.