Skip to content

Commit 627a97f

Browse files
committed
dev: produce wheels for Python 3 only
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.
1 parent 2d24115 commit 627a97f

File tree

6 files changed

+25
-7
lines changed

6 files changed

+25
-7
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ build/
33
dist/
44
*.egg-info/
55
.idea/
6-
MANIFEST*
76
.DS_Store
87
*.orig
98
*.jpg

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ History:
22

33
<see Git checking messages for history>
44

5+
5.0.1 2020/xx/xx
6+
- produce wheels for Python 3 only
7+
58
5.0.0 2019/12/31
69
- removed support for Python 2.7
710
- MSS: improve type annotations and add CI check

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Include tests files and data
2+
include mss/tests/*.py
3+
recursive-include mss/tests/res *

mss/tests/test_setup.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
This is part of the MSS Python's module.
3+
Source: https://github.com/BoboTiG/python-mss
4+
"""
5+
6+
from subprocess import check_output
7+
8+
from mss import __version__
9+
10+
CMD = "python setup.py sdist bdist_wheel".split()
11+
12+
13+
def test_wheel_python_3_only():
14+
"""Ensure the produced wheel is Python 3 only."""
15+
output = str(check_output(CMD))
16+
text = "mss-{}-py3-none-any.whl".format(__version__)
17+
assert text in output

setup.cfg

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,13 @@ classifiers =
3131
[options]
3232
zip-safe = False
3333
include_package_data = True
34-
packages =
35-
mss
36-
mss.tests
34+
packages = mss
3735
python_requires = >=3.5
3836

3937
[options.entry_points]
4038
console_scripts =
4139
mss = mss.__main__:main
4240

43-
[bdist_wheel]
44-
universal = 1
45-
4641
[flake8]
4742
ignore =
4843
# E203 whitespace before ':', but E203 is not PEP 8 compliant

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ deps =
1414
# Must pin that version to support PyPy3
1515
numpy==1.15.4
1616
pillow
17+
wheel
1718
commands =
1819
python -m pytest {posargs}
1920

0 commit comments

Comments
 (0)