-
Notifications
You must be signed in to change notification settings - Fork 4
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
Replace setup.py with pyproject.toml #29
Conversation
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 have a couple of items to point out before final approval. I'm not certain either must be adjusted, but I'd like to sanity check them.
python/pyproject.toml
Outdated
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", |
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 suspect this needs to be adjusted, though I'm not exactly sure how. The LICENSE file doesn't exactly reference MIT.
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.
Great call, @robertbartel! I removed the license classifier.
] | ||
dependencies = ["pandas", "hydrotools.nwis-client"] | ||
description = "Hy_Features Package." | ||
dynamic = ["version"] |
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'm not super well versed with how this works, but I think setting dynamic = ["version"]
will change the versioning scheme. That wasn't an explicitly mentioned change. Was this deliberate, or am I missing something about how this functions?
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.
@robertbartel, there is a little indirection going on that can be a little confusing. I had to double take the first time I saw this syntax. Here is the official documentation of the dynamic directive. In short, this tells the software that builds the package from the toml
config file what portions of information are dynamically generated. In this case, we are getting the package version
information from hypy._version.__version__
. This is the same location we were previously getting version information from when we used setup.py
. See:
[tool.setuptools.dynamic]
version = {attr = "hypy._version.__version__"}
61722d4
to
b835a0c
Compare
Replace
setup.py
withpyproject.toml
. This removed arbitrary code execution during packaging and specifies the required build tools needed for packaging.Changes
pyproject.toml
instead ofsetup.py
>=3.7
. This was already implicit, see Hydrotools nwis-client requires python 3.7 #19 for details.