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

Fix mypy pep561 #1088

Merged
merged 1 commit into from
May 12, 2023
Merged
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
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def get_required_packages(requirement_files: list[str]) -> list[str]:
packages=find_packages(where="src", include=["anomalib", "anomalib.*"]),
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
include_package_data=True,
package_data={"": ["config.yaml"]},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I tested
package_data={"": ["config.yaml"], "anomalib": ["py.typed"]},
should be sufficient

Copy link
Contributor Author

@WenjingKangIntel WenjingKangIntel May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've tested it as well. It worked. But if we are going to use MANIFEST.in, we need to use the include_package_data=True.
If we are going to use package_data={"": ["config.yaml"], "anomalib": ["py.typed"]},, then we need to remove py.typed from MANIFEST.in, because they have duplicated functionality, which is to include the same file.

To sum up, if we do not use include_package_data=True, MANIFEST.in will not take effect.

entry_points={"console_scripts": ["anomalib=anomalib.utils.cli.cli:main"]},
)