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

Move project metadata to pyproject.toml; avoid calling setup.py #3619

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Nov 18, 2022

Overview

The PR utilizes pyproject.toml for project metadata and build dependencies, and uses PyPA's build tool instead of invoking setup.py directly.

Details

  • Specifies project build dependencies (PEP 518), i.e. it's just setuptools. This means you don't need to pip install any thing before installing this package
  • Moves project metadata from setup.py to pyproject.toml, see setuptools docs and PEP 621
    • This is close to a 1:1 conversion, with a few small modifications such as alphasorting lists
    • Explicit listing of packages is replaced with setuptools' find() to gather everything under "pyvista*"
    • Out in the wild, most folks and docs seem to prefer double quotes, but this PR maintains the current style using mostly single quotes (except keys)
  • While setup.py is nearly empty, keep it for now, since some packages depend on it
  • Calling setup.py is discouraged; use PyPA's build tool instead
  • Use twine check --strict dist/* to fail CI check if needed

@github-actions github-actions bot added docker maintenance Low-impact maintenance activity labels Nov 18, 2022
@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Merging #3619 (9675ccb) into main (3b97cab) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3619   +/-   ##
=======================================
  Coverage   95.11%   95.11%           
=======================================
  Files          83       83           
  Lines       18558    18558           
=======================================
  Hits        17652    17652           
  Misses        906      906           

Copy link
Member

@akaszynski akaszynski left a comment

Choose a reason for hiding this comment

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

Excellent work. Thanks for adding it, and I appreciate barely around setup.py so we can support legacy installs until it completely goes away.

I'm also happy we're no longer reading in the __version__ from file, thanks for refactoring that out.

Copy link
Member

@banesullivan banesullivan left a comment

Choose a reason for hiding this comment

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

Excellent! Thank you for taking the initiative on this as a few of us have wanted/talked about doing this for a while

@tkoyama010 tkoyama010 merged commit 80185ea into pyvista:main Nov 21, 2022
@mwtoews mwtoews deleted the pyproject-metadata branch November 21, 2022 10:40
adeak added a commit to adeak/pyvista that referenced this pull request Nov 22, 2022
* upstream/main:
  Fix test names (pyvista#3631)
  Add use_scalar_weights argument (pyvista#3189)
  Clarify that interpolate only maps point data to point data (pyvista#3621)
  Bump awalsh128/cache-apt-pkgs-action from 1.1.2 to 1.1.3 (pyvista#3630)
  Update hypothesis requirement from <6.57.2 to <6.58.1 (pyvista#3629)
  Move project metadata to pyproject.toml; avoid calling setup.py (pyvista#3619)
@banesullivan banesullivan mentioned this pull request Feb 1, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker maintenance Low-impact maintenance activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants