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

Replace setup.py with pyproject.toml #29

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

aaraney
Copy link
Member

@aaraney aaraney commented Jul 6, 2023

Replace setup.py with pyproject.toml. This removed arbitrary code execution during packaging and specifies the required build tools needed for packaging.

Changes

Copy link
Contributor

@robertbartel robertbartel left a 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.

classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
Copy link
Contributor

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.

Copy link
Member Author

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"]
Copy link
Contributor

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?

Copy link
Member Author

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__"}

@aaraney aaraney merged commit ae0bd8c into NOAA-OWP:master Jul 10, 2023
@aaraney aaraney deleted the update-pkg-config branch July 10, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants