Skip to content

Commit

Permalink
Add hook for humanize to collect package metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed May 26, 2021
1 parent af92d6b commit a4dc1c7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ boto3==1.12.33
botocore==1.15.33
dash==1.19.0
dash-bootstrap-components==0.12.0
humanize==3.5.0
iminuit==2.4.0
markdown==3.2.1
openpyxl==3.0.3
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from PyInstaller.utils.hooks import copy_metadata

datas = copy_metadata('humanize')
9 changes: 9 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ def test_pendulum(pyi_builder):
print(pendulum.now().isoformat())
""")

@importorskip('humanize')
def test_humanize(pyi_builder):
pyi_builder.test_source("""
import humanize
from datetime import timedelta
print(humanize.naturaldelta(timedelta(seconds=125)))
""")


@importorskip('argon2')
def test_argon2(pyi_builder):
Expand Down

0 comments on commit a4dc1c7

Please sign in to comment.