Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooks: add hook for folium #62

Merged
merged 2 commits into from Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions news/62.new.rst
@@ -0,0 +1 @@
Add hook for ``folium``.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Expand Up @@ -9,6 +9,7 @@ cloudscraper==1.2.58
dash==2.0.0
dash-bootstrap-components==0.13.0
dash-uploader==0.5.0
folium==0.12.1
h5py==3.4.0; python_version >= '3.7'
humanize==3.11.0
iminuit==2.8.3
Expand Down
16 changes: 16 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-folium.py
@@ -0,0 +1,16 @@
# ------------------------------------------------------------------
# Copyright (c) 2021 PyInstaller Development Team.
#
# This file is distributed under the terms of the GNU General Public
# License (version 2.0 or later).
#
# The full license is available in LICENSE.GPL.txt, distributed with
# this software.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ------------------------------------------------------------------

from PyInstaller.utils.hooks import collect_data_files

# Collect data files (templates)
datas = collect_data_files("folium")
8 changes: 8 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_libraries.py
Expand Up @@ -801,3 +801,11 @@ def test_branca(pyi_builder):
pyi_builder.test_source("""
import branca
""")


@importorskip("folium")
def test_folium(pyi_builder):
pyi_builder.test_source("""
import folium
m = folium.Map(location=[0, 0], zoom_start=5)
""")