-
Notifications
You must be signed in to change notification settings - Fork 5
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
Change from setup.cfg to pyproject.toml #73
Conversation
pyproject.toml
Outdated
[tool.setuptools] | ||
packages = ["htmltools"] | ||
include-package-data = true | ||
# test-suite = "tests" |
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.
This wasn't commented out in the old setup.cfg, but it caused errors in this file. Should it just be removed?
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 would set any test options using a pytest section
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.
Thanks, pytest
seems to work without this line, so I'll just remove it.
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.
LGTM -- I didn't test out building the package, only read through (and have to admit that I can never remember the names of things in pyproject.toml files)
pyproject.toml
Outdated
[tool.setuptools] | ||
packages = ["htmltools"] | ||
include-package-data = true | ||
# test-suite = "tests" |
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 would set any test options using a pytest section
"setuptools", | ||
"wheel" | ||
] | ||
build-backend = "setuptools.build_meta" |
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.
If you use setuptools-scm, you can set the version automatically using git tags
(but the current approach seems totally fine and reasonable!)
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.
Thanks - maybe in the future we'll switch over.
One unfortunate thing about this change is that it apparently breaks pyright support when this py-htmltools is installed as an editable package with microsoft/pyright#3846 It looks like the workaround is to install with
|
This PR switches htmltools from setup.cfg/setup.py to the newer pyproject.toml config file.