-
Notifications
You must be signed in to change notification settings - Fork 127
build/dist: modernize pyproject.toml #600
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
91629d8
chore: update pyproject.toml with project metadata and dependencies
Samarthegde 7022164
chore: update pyproject.toml to include additional dependencies and i…
Samarthegde e4a4e1d
chore: update version to 0.6.1.dev0 and modify bumpversion configuration
Samarthegde 2b52080
docs: add instructions for releasing with bump-my-version
Samarthegde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,84 @@ | ||
| [build-system] | ||
| requires = ["setuptools"] | ||
| build-backend = "setuptools.build_meta" | ||
| requires = ["setuptools", "wheel"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "pynvim" | ||
| version = "0.6.1.dev0" | ||
| description = "Python client for Neovim" | ||
| readme = "README.md" | ||
| license = { text = "Apache-2.0" } | ||
| authors = [ | ||
| { name = "Neovim Authors" } | ||
| ] | ||
| requires-python = ">=3.7" | ||
| dependencies = [ | ||
| "msgpack>=1.0.0", | ||
| "greenlet>=3.0; python_implementation != 'PyPy'", | ||
| "typing-extensions>=4.5; python_version < '3.12'", | ||
| ] | ||
|
|
||
| classifiers = [ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.7", | ||
| "Programming Language :: Python :: 3.8", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "License :: OSI Approved :: Apache Software License", | ||
| "Operating System :: OS Independent", | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| test = [ | ||
| "pytest", | ||
| "pytest-timeout", | ||
| ] | ||
| docs = [ | ||
| "sphinx", | ||
| "sphinx-rtd-theme", | ||
| ] | ||
| dev = [ | ||
| "bump-my-version", | ||
| ] | ||
|
|
||
| [project.scripts] | ||
| pynvim-python = "pynvim.python:main" | ||
|
|
||
| [project.urls] | ||
| Homepage = "https://github.com/neovim/pynvim" | ||
| Download = "https://github.com/neovim/pynvim/archive/refs/tags/0.6.1.dev0.tar.gz" | ||
| Documentation = "https://pynvim.readthedocs.io" | ||
|
|
||
| # Configuration for bumpversion / bump-my-version | ||
| [tool.bumpversion] | ||
| current_version = "0.6.1.dev0" | ||
| commit = true | ||
| tag = true | ||
|
|
||
| # Regex that captures major/minor/patch/prerelease (prerelease optional) | ||
| parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(?:\\.(?P<prerelease>[a-zA-Z]+\\d*))?" | ||
| serialize = [ | ||
| "{major}.{minor}.{patch}.{prerelease}", | ||
| "{major}.{minor}.{patch}" | ||
| ] | ||
|
|
||
| # Update the version in pyproject.toml | ||
| [[tool.bumpversion.files]] | ||
| filename = "pyproject.toml" | ||
| search = 'version = "{current_version}"' | ||
| replace = 'version = "{new_version}"' | ||
|
|
||
| # Update the version in pynvim/_version.py (non-hardcoded) | ||
| [[tool.bumpversion.files]] | ||
| filename = "pynvim/_version.py" | ||
| search = 'VERSION = SimpleNamespace(major={current_major}, minor={current_minor}, patch={current_patch}, prerelease="{current_prerelease}")' | ||
| replace = 'VERSION = SimpleNamespace(major={new_major}, minor={new_minor}, patch={new_patch}, prerelease="{new_prerelease}")' | ||
|
|
||
| # Update the download URL in pyproject.toml | ||
| [[tool.bumpversion.files]] | ||
| filename = "pyproject.toml" | ||
| search = 'Download = "https://github.com/neovim/pynvim/archive/refs/tags/{current_version}.tar.gz"' | ||
| replace = 'Download = "https://github.com/neovim/pynvim/archive/refs/tags/{new_version}.tar.gz"' | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why is wheel required?
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.
Including
wheelis a best practice that ensures your project can be built into the modern, faster-installing wheel format, while not strictly necessary to build a basic source distribution, it's a key part of the modern Python packaging ecosystem.