-
Notifications
You must be signed in to change notification settings - Fork 489
Move project metadata and configuration to 'pyproject.toml' #1311
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
base: master
Are you sure you want to change the base?
Conversation
| @@ -16,47 +12,5 @@ | |||
| ) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to figure out how to get rid of setup.py entirely. Maybe we could use the README.rst instead for the long description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's generally the goal, especially the most PyPI project pages don't include the changelog. The README is the traditional long description, but perhaps you could first consolidate docs/introduction.rst and the README into one file (and have the docs build pull in the README).
Again, it's not too important to remove setup.py for sdist metadata generation, as it will be indefinitely supported and is perfectly fine for non-programmatic metadata such as long-description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps you could first consolidate
docs/introduction.rstand the README into one file (and have the docs build pull in the README).
This sounds good to me.
| [tool.setuptools.dynamic] | ||
| version = { attr = "dateparser.__version__" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use bumpversion. So it probably makes sense to hard-code the version instead of making it dynamic, bumpversion will take care of updating it in both places. In fact, I think it can update it in pyproject.toml without specific configuration for it, and it may be possible to remove the current_version definition under [tool.bumpversion] once the project version is defined through standard pyproject.toml syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no familiarity with bumpversion, and its docs (and its fork's docs) don't mention pyproject.toml. This pull request currently keeps the current release process unchanged, but I'm open to suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://callowayproject.github.io/bump-my-version/reference/configuration/global/#current_version
‡ If pyproject.toml exists, then current_version falls back to project.version in pyproject.toml. This only works if project.version is statically set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, so you use Bump My Version, not bumpversion. Either way, do you want to store the current version in project.version in pyproject.toml, or in dateparser.__version__? The second way isn't actually dynamic, it's simply not statically defined in pyproject.toml.
Makes most metadata and build configuration declarative
Also:
License :: OSI Approved :: BSD Licenseclassifier (license classifiers are deprecated)setuptoolsexplicitly as a build requirement using PEP 518 (and as the backend using PEP 517)I kept your custom
long_description(pyproject.toml:readme) construction: there's no harm in it. Setuptools also has native functionality to read the version from a Python module attribute.