Skip to content

Commit

Permalink
dev: produce wheels for Python 3 only
Browse files Browse the repository at this point in the history
For instance, the version 5.0.0 shipped a wheel
letting users know that Python 2 and 3 are supported.
This is not true for Python 2.

The patch will changes the wheel name:
`mss-VERSION-py2.py3-none-any.whl` -> `mss-VERSION-py3-none-any.whl`

Also fixed missing test data.
  • Loading branch information
BoboTiG committed Jan 4, 2020
1 parent 2d24115 commit 627a97f
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ build/
dist/
*.egg-info/
.idea/
MANIFEST*
.DS_Store
*.orig
*.jpg
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ History:

<see Git checking messages for history>

5.0.1 2020/xx/xx
- produce wheels for Python 3 only

5.0.0 2019/12/31
- removed support for Python 2.7
- MSS: improve type annotations and add CI check
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Include tests files and data
include mss/tests/*.py
recursive-include mss/tests/res *
17 changes: 17 additions & 0 deletions mss/tests/test_setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
This is part of the MSS Python's module.
Source: https://github.com/BoboTiG/python-mss
"""

from subprocess import check_output

from mss import __version__

CMD = "python setup.py sdist bdist_wheel".split()


def test_wheel_python_3_only():
"""Ensure the produced wheel is Python 3 only."""
output = str(check_output(CMD))
text = "mss-{}-py3-none-any.whl".format(__version__)
assert text in output
7 changes: 1 addition & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,13 @@ classifiers =
[options]
zip-safe = False
include_package_data = True
packages =
mss
mss.tests
packages = mss
python_requires = >=3.5

[options.entry_points]
console_scripts =
mss = mss.__main__:main

[bdist_wheel]
universal = 1

[flake8]
ignore =
# E203 whitespace before ':', but E203 is not PEP 8 compliant
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ deps =
# Must pin that version to support PyPy3
numpy==1.15.4
pillow
wheel
commands =
python -m pytest {posargs}

Expand Down

0 comments on commit 627a97f

Please sign in to comment.