-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Embed default html templates #87
Conversation
@hoodmane @rth Can I ask for a review for this when you have time? BTW, this PR also adds empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have this? This _templates
directory is not a submodule, it has data files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned here, I wasn't able to make packages: find
to locate data files in subdirectories correctly. So I added __init__.py
as a hack to make setuptools add that directory to the wheel. I don't wanted to use packages = find_namespace:
since it often adds unwanted directories to wheels when we are not careful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can get @henryiii to help...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the correct way to make it accessible to importlib.metadata
. If you don't need that, then you can make it available via setting package_data. Though what do you think about just moving to hatchling or flit-core, which IMO are much easier to configure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am in favor of moving to a different build backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Does hatchling or flit support auto versioning? We use setuptools-scm for versioning.
(TBH, I haven't used those build backends before)
This embeds
test.html
andmodule_test.html
into pytest-pyodide wheel. So we don't need to bundle them into pyodide distribution.Additional context : I found that
pyodide-core
archive does not contain these test templates... which make it hard for me to run tests withpyodide-core
. Anyway, I think it is better to remove test templates from pyodide distribution.