Skip to content

moved most of setup to pyproject#48

Open
shimwell wants to merge 1 commit intodevelopfrom
setup.py_to_pyproject.toml
Open

moved most of setup to pyproject#48
shimwell wants to merge 1 commit intodevelopfrom
setup.py_to_pyproject.toml

Conversation

@shimwell
Copy link
Owner

@shimwell shimwell commented Jan 2, 2024

Description

This PR changes from a setup.py to a pyproject.toml

  • It requires python 3.8 or above, this allows the version to be found with importlib.metadata
  • changes the scripts names, this is compatible with python file naming requirments
  • doesn't move the cythonize part from the setup.py but this could in theory be done like this

Checklist

  • I have performed a self-review of my own code
  • I have followed the style guidelines for Python source files (if applicable)

@MicahGale
Copy link

I think this is a good start. However this still depends on a setup.py workflow instead of something like python -m build. To ultimately future proof this setup.py should be removed, but I'm not sure if that's possible yet. Looking into this I wasn't able to find an easy way to get cython and build to all cooperate. Though I did come across scikit-build which seemed promising.


__version__ = '0.14.1-dev'

__version__ = importlib.metadata.version("openmc")

Choose a reason for hiding this comment

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

I would recommend using dynamic metadata instead to keep this more consistent with what people expect: dynamic metadata.

@MicahGale
Copy link

Also relevant blog post on setup.py deprecation: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

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