Skip to content

Commit cd3ecec

Browse files
authored
Merge pull request #53 from PyO3/remove-python2
Remove python 2 support
2 parents e67f11e + c0ea580 commit cd3ecec

File tree

4 files changed

+13
-22
lines changed

4 files changed

+13
-22
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ dist: xenial
55
matrix:
66
fast_finish: true
77
include:
8-
- python: "2.7"
98
- python: "3.5"
109
- python: "3.6"
1110
- python: "3.7"

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Changelog
22

3+
## 0.11
4+
5+
- Removed python 2 support
6+
37
## 0.10.6 (2018-11-07)
48

5-
- Fix tomlgen\_rust generating invalid `Cargo.toml` files.
6-
- Fix tomlgen\_rust setting wrong path in `.cargo/config`
9+
- Fix tomlgen\_rust generating invalid `Cargo.toml` files.
10+
- Fix tomlgen\_rust setting wrong path in `.cargo/config`
711

812
## 0.10.5 (2018-09-09)
913

setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from setuptools import setup
44

5-
version = "0.10.6"
5+
version = "0.11.0"
66

77
setup(
88
name="setuptools-rust",
@@ -22,8 +22,6 @@
2222
"Topic :: Software Development :: Version Control",
2323
"License :: OSI Approved :: MIT License",
2424
"Intended Audience :: Developers",
25-
"Programming Language :: Python :: 2",
26-
"Programming Language :: Python :: 2.7",
2725
"Programming Language :: Python :: 3",
2826
"Programming Language :: Python :: 3.5",
2927
"Programming Language :: Python :: 3.6",

setuptools_rust/utils.py

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,19 @@ def cpython_feature(ext=True, binding=Binding.PyO3):
3838
if binding in (Binding.NoBinding, Binding.Exec):
3939
return ()
4040
elif binding is Binding.PyO3:
41-
if (2, 7) < version < (2, 8):
41+
if version > (3, 5):
4242
if ext:
43-
return ("pyo3/python2", "pyo3/extension-module")
43+
return {"pyo3/extension-module"}
4444
else:
45-
return ("pyo3/python2",)
46-
elif version > (3, 4):
47-
if ext:
48-
return ("pyo3/python3", "pyo3/extension-module")
49-
else:
50-
return ("pyo3/python3",)
45+
return {}
5146
else:
5247
raise DistutilsPlatformError("Unsupported python version: %s" % sys.version)
5348
elif binding is Binding.RustCPython:
54-
if (2, 7) < version < (2, 8):
55-
if ext:
56-
return ("cpython/python27-sys", "cpython/extension-module-2-7")
57-
else:
58-
return ("cpython/python27-sys",)
59-
elif (3, 3) < version:
49+
if (3, 3) < version:
6050
if ext:
61-
return ("cpython/python3-sys", "cpython/extension-module")
51+
return {"cpython/python3-sys", "cpython/extension-module"}
6252
else:
63-
return ("cpython/python3-sys",)
53+
return {"cpython/python3-sys"}
6454
else:
6555
raise DistutilsPlatformError("Unsupported python version: %s" % sys.version)
6656
else:

0 commit comments

Comments
 (0)