Skip to content

Commit

Permalink
hooks: add hook for ens package
Browse files Browse the repository at this point in the history
Add hook for `ens` package to collect its data files. Required by
`web3` >= 6.6.0.
  • Loading branch information
rokm committed Jul 19, 2023
1 parent e3cf013 commit a854966
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/617.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add hook for ``ens`` package, required by ``web3`` v6.6.0 and later.
3 changes: 2 additions & 1 deletion requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Twisted==22.10.0
tzdata==2023.3
Unidecode==1.3.6
weasyprint==59.0
web3==6.5.0
web3==6.6.1
websockets==11.0.3
zeep==4.2.1
pypsexec==0.3.0
Expand Down Expand Up @@ -135,6 +135,7 @@ xyzservices==2023.7.0
mistune==3.0.1
pydantic==2.0.3
jsonschema==4.18.3
ens==0.6.1

# ------------------- Platform (OS) specifics

Expand Down
15 changes: 15 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-ens.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ------------------------------------------------------------------
# Copyright (c) 2023 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

datas = collect_data_files("ens")
7 changes: 7 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1695,3 +1695,10 @@ def test_jsonschema(pyi_builder):
except jsonschema.ValidationError as e:
print(f"Validation error: {e}")
""")


@importorskip('ens')
def test_ens(pyi_builder):
pyi_builder.test_source("""
import ens
""")

0 comments on commit a854966

Please sign in to comment.