Skip to content

Commit d726f27

Browse files
committed
Remove python 2 support
This also allows removing the python3 feature from pyo3
1 parent e67f11e commit d726f27

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

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: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,15 @@ 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:
6151
return ("cpython/python3-sys", "cpython/extension-module")
6252
else:

0 commit comments

Comments
 (0)