Skip to content

Commit

Permalink
packaging: conform to PEP 517 guidelines #519
Browse files Browse the repository at this point in the history
Problem:
Not compliant with python packaging standards.
Deprecation warnings from pip due to outdated packaging format.
ref #518

Solution:
- Conform to PEP 517 packaging guidelines
- Change packaging and uploading commands in README to allow for building and
  uploading a source distribution as well as a wheel.
- Added language to setup.py to create universal wheel (necessary for continuing
  py2.7 compatibility - even if py2.7 is EOL).
- Add minimal pyproject.toml
  • Loading branch information
crowellel authored Jan 26, 2023
1 parent 12acffc commit 496e8eb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ neovim/ui/screen.c
neovim/ui/screen.so
build/
dist/
venv
*.pyc
.cache
.eggs
.tox
.pytest_cache

# Sphinx documentation
docs/_build/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ Release
- bump the version in `pynvim/util.py` and `setup.py` (3 places in total)
2. Make a release on GitHub with the same commit/version tag and copy the message.
3. Run `scripts/disable_log_statements.sh`
4. Run `python setup.py sdist`
4. Run `python -m build`
- diff the release tarball `dist/pynvim-x.y.z.tar.gz` against the previous one.
5. Run `twine upload -r pypi dist/pynvim-x.y.z.tar.gz`
5. Run `twine upload -r pypi dist/*`
- Assumes you have a pypi account with permissions.
6. Run `scripts/enable_log_statements.sh` or `git reset --hard` to restore the working dir.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@
setup_requires=setup_requires,
tests_require=tests_require,
extras_require=extras_require,
zip_safe=False)
options={"bdist_wheel": {"universal": True}},
)

0 comments on commit 496e8eb

Please sign in to comment.