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

MAINT: move static metadata to pyproject.toml #2512

Merged

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Jul 31, 2022

This PR is a follow-up from #2419, and moves the project metatdata from setup.py to pyproject.toml as described by PEP 621 and supported by setuptools >= 61. This supersedes #2424 as there are more community commitments behind maintaining project metadata in pyproject.toml than setup.cfg.

Details:

  • Add new metadata: keywords and classifiers.
  • Change author to "Kelsey Jordahl" (with existing email match), move "GeoPandas contributors" as maintainers.
  • Change licence from slightly ambiguous "BSD" to SPDX compliant "BSD 3-Clause".
  • Change how packages are found, using patterns geopandas and geopandas.*. This now finds geopandas.io.tests, which seems to be unintentionally excluded.
  • Change how package data is found, using an explicit list of datasets.
  • Option install_requires is moved to pyproject.toml as dependencies. If a workaround is indeed required for ReadTheDocs, a modern approach should be found.
  • Most of setup.py is used to support versioneer or anyone that expects to see this file. For POSIX systems, it is now an executable, and runs python3.

Some of these are new or changed, so feedback or suggestions are welcome.

Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

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

This looks okay to me. Thanks!

@jorisvandenbossche
Copy link
Member

Given the experimental status for this feature in setuptools (and the problems we have seen in pyproj/shapely for debian packagers), let's maybe wait a few more months with this? (I think it's OK to just leave open the PR)

@mwtoews
Copy link
Contributor Author

mwtoews commented Oct 3, 2022

I've checked this with a few debian docker images, and not surprisingly, it does not build with testing (bookworm), which uses a slightly older setuptools. But it does work with debian unstable (sid), which is encouraging.

Agree to hold off a merge until I can see a clean check with debian testing.

@EwoutH
Copy link
Contributor

EwoutH commented Oct 12, 2022

Given the experimental status for this feature in setuptools

Just a heads up: setuptools declared defining metadata in pyproject.toml to be stable in June.

@jorisvandenbossche
Copy link
Member

That's only for the general project metadata, though, the [tool.setuptools] table is still "beta".

(and anyway, whatever setuptools says about it doesn't change potential downstream packaging problems if they don't yet support such recent setuptools)

@martinfleis martinfleis modified the milestones: 0.12, 0.13 Oct 24, 2022
@mwtoews
Copy link
Contributor Author

mwtoews commented Oct 30, 2022

Good news, setuptools in debian testing was recently upgraded and I've checked this with a docker image of bookworm (debian testing) with success. I can resolve the conflicts if there is appetite to merge this.

@martinfleis
Copy link
Member

@mwtoews great! Let's resolve the conflicts and merge then!

@martinfleis martinfleis merged commit 89e53d6 into geopandas:main Nov 3, 2022
@martinfleis
Copy link
Member

Thanks @mwtoews!

@Zeroto521
Copy link
Contributor

Hi, since 0.26, versioneer has started to support pyproject.toml file.
I thought we could move [versioneer] section from setup.cfg into pyproject.toml.

@mwtoews mwtoews deleted the move-static-metadata-to-pyproj-toml branch November 3, 2022 09:05
@martinfleis
Copy link
Member

We could do the same with pytest but flake8 does not currently support pyproject.toml (PyCQA/flake8#234), so we won't be able to get rid of setup.cfg anyway.

@jorisvandenbossche jorisvandenbossche mentioned this pull request Dec 6, 2022
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.

None yet

5 participants