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

Remove setup.cfg in favor of pyproject.toml #58

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AdamRJensen
Copy link
Member

Closes #57

@AdamRJensen
Copy link
Member Author

AdamRJensen commented Oct 15, 2024

  • Figure out how to infer the package version (or whether to retain the hardcoded value). link

@kandersolar
Copy link
Member

pvlib-python uses setuptools_scm

@AdamRJensen
Copy link
Member Author

With the new modification, the dynamic versioning seems to work.

I verified this by pip installing the package from my local development repository and checking the version
image

Copy link
Member

@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

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

The new wheel file includes data and test folders, increasing file size to 1.8 MB versus 13 kB for the latest PyPI wheel.

pyproject.toml Outdated
"Intended Audience :: Science/Research",
]
dependencies = [
'importlib-metadata; python_version<"3.10"',
Copy link
Member

Choose a reason for hiding this comment

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

Where did importlib-metadata come from? Do we need it? I thought it was only needed for python<3.8.

pyproject.toml Outdated
"setuptools>=42",
"wheel"
]
requires = ["setuptools", "setuptools-scm"]
Copy link
Member

Choose a reason for hiding this comment

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

We should require >=61 for setuptools, since that's when it started supporting pyproject.toml/PEP 621.
https://setuptools.pypa.io/en/stable/history.html#v61-0-0

pyproject.toml Outdated
Comment on lines 9 to 12
authors = [
{name = "Adam R. Jensen", email = "adam-r-j@hotmail.com"},
{name = "Kevin S. Anderson"},
]
Copy link
Member

Choose a reason for hiding this comment

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

This results in the wheel's METADATA file including this, which doesn't seem quite right to me:

Author: Kevin S. Anderson
Author-email: "Adam R. Jensen" <adam-r-j@hotmail.com>

The v0.2.5 wheel on PyPI has this, which seems better to me:

Author: 'Adam R. Jensen, Kevin Anderson'
Author-email: adam-r-j@hotmail.com

Copy link
Member Author

Choose a reason for hiding this comment

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

This seems like a strange behavior, see explanation below from this link. I've made my email in a separate email entry now.

If only name is provided, the value goes in Author or Maintainer as appropriate.

If only email is provided, the value goes in Author-email or Maintainer-email as appropriate.

If both email and name are provided, the value goes in Author-email or Maintainer-email as appropriate, with the format {name} <{email}>.

Multiple values should be separated by commas.

Copy link
Member Author

Choose a reason for hiding this comment

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

In the twoaxistracking.egg-info/PKG-INFO file this now lists as:

Author: Adam R. Jensen, Kevin S. Anderson
Author-email: adam-r-j@hotmail.com

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.

Transition from setup.cfg to pyproject.toml
2 participants