Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Fix package_data path in setup.py to include resources #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
], # Keywords that define your package best
packages=find_packages(where="src"),
package_dir={"": "src"},
package_data={"": ["*.zip"]},
package_data={"": ["resources/*.zip"]},
install_requires=[
"pandas>=1.0.3",
"numpy>=1.18.4",
Expand Down
2 changes: 1 addition & 1 deletion src/pyate/term_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_general_domain(language: str = None, size: int = None):
TermExtraction.DEFAULT_GENERAL_DOMAINS[(
language, size)] = pd.read_csv(
pkg_resources.resource_stream(
__name__, f"default_general_domain.{language}.zip"),
__name__, f"resources/default_general_domain.{language}.zip"),
compression="zip",
nrows=size,
)["SECTION_TEXT"]
Expand Down