Skip to content

Commit 496e8eb

Browse files
authored
packaging: conform to PEP 517 guidelines #519
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
1 parent 12acffc commit 496e8eb

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ neovim/ui/screen.c
44
neovim/ui/screen.so
55
build/
66
dist/
7+
venv
78
*.pyc
89
.cache
910
.eggs
1011
.tox
12+
.pytest_cache
1113

1214
# Sphinx documentation
1315
docs/_build/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ Release
129129
- bump the version in `pynvim/util.py` and `setup.py` (3 places in total)
130130
2. Make a release on GitHub with the same commit/version tag and copy the message.
131131
3. Run `scripts/disable_log_statements.sh`
132-
4. Run `python setup.py sdist`
132+
4. Run `python -m build`
133133
- diff the release tarball `dist/pynvim-x.y.z.tar.gz` against the previous one.
134-
5. Run `twine upload -r pypi dist/pynvim-x.y.z.tar.gz`
134+
5. Run `twine upload -r pypi dist/*`
135135
- Assumes you have a pypi account with permissions.
136136
6. Run `scripts/enable_log_statements.sh` or `git reset --hard` to restore the working dir.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@
4949
setup_requires=setup_requires,
5050
tests_require=tests_require,
5151
extras_require=extras_require,
52-
zip_safe=False)
52+
options={"bdist_wheel": {"universal": True}},
53+
)

0 commit comments

Comments
 (0)