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 deprecated pkg_resources #480

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ def build_libraries(self, libraries):
cmdclass={"build_clib": build_clib_hpy},
use_scm_version=get_scm_config,
setup_requires=['setuptools_scm'],
install_requires=['setuptools>=64.0'],
install_requires=[
'setuptools>=64.0',

Choose a reason for hiding this comment

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

Does hpy actually still need setuptools at run time after this?

Copy link
Author

Choose a reason for hiding this comment

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

I have no idea, should I remove this?

Choose a reason for hiding this comment

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

Does the code import either setuptools or pkg_resources anywhere in the code base after your changes? If not, you can remove the dependency.

Choose a reason for hiding this comment

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

Frankly setuptools should never be a run-time dependency of any project. Its only legitimate use at the moment is as a build back-end.

Copy link
Author

Choose a reason for hiding this comment

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

looks like hpy.devel still require setuptools

Choose a reason for hiding this comment

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

Is that a separate project?

Copy link
Author

@trim21 trim21 Jun 3, 2024

Choose a reason for hiding this comment

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

actually I have no idea what dependency should I have if I use hpy in universal mode........

it require hpy.universal to load dll, so it looks like I should install hpy.universal, and
indeed there is a hpy.universal package in pypi. but it doesn't look right, so I need to include whole hpy, including devel, trace and so on as runtime dependency for my package using hpy in universal mode?

Choose a reason for hiding this comment

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

Is hpy.universal a separate project or is it somehow packaged separately from this project?

Choose a reason for hiding this comment

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

Anyway, if setuptools is directly imported by this project, it should be kept as a run-time dependency. At best it could be moved to extras if it's only used in some edge cases, provided that it's properly documented that way.

Copy link
Author

Choose a reason for hiding this comment

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

Is hpy.universal a separate project or is it somehow packaged separately from this project?

I don't know 🧐, didn't even successfully pack my hpy universal mode wheel yet.

'importlib_resources; python_version<"3.10"',
trim21 marked this conversation as resolved.
Show resolved Hide resolved
],
python_requires='>=3.8',
)