Skip to contentSkip to conversation

py-smbus/setup.py: use setuptools instead of distutils

PATCH In review Ross Burton 2 participants 4 messages Jan 14, 2022 – Jan 19, 2022 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 py-smbus/setup.py: use setuptools instead of distutils

As per [1], distutils is deprecated in Python 3.10 and will be removed entirely in Python 3.12.

As setuptools is essentially an enhanced version of distutils, it's trivial to port to that.

[1] https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated

---
 py-smbus/setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
py-smbus/setup.py +1 -1
index 28a4500..26db33a 100644
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from distutils.core import setup, Extension
+from setuptools import setup, Extension
 
 setup(	name="smbus",
 	version="1.1",
Signature · 1 line
2.25.1
#1 lore raw

Hi Ross,

Quoted 18 lines · Ross Burton

As per [1], distutils is deprecated in Python 3.10 and will be removed entirely in Python 3.12.

As setuptools is essentially an enhanced version of distutils, it's trivial to port to that.

[1] https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated

---
 py-smbus/setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
py-smbus/setup.py +0 -0
index 28a4500..26db33a 100644

py-smbus/setup.py line 6

Quoted 7 lines
py-smbus/setup.py +1 -1
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from distutils.core import setup, Extension
+from setuptools import setup, Extension
 
 setup(	name="smbus",
 	version="1.1",

Is setuptools available in python 2.7? For now, py-smbus can be built for either python2 or python3, and I would like to maintain that possibility.

Thanks,

Signature · 2 lines
Jean Delvare
SUSE L3 Support
#2 lore raw
Quoted 3 lines

Is setuptools available in python 2.7? For now, py-smbus can be built for either python2 or python3, and I would like to maintain that possibility.

Yes, it is.

Ross

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#3 lore raw
Quoted 5 lines · Ross Burton
Quoted 3 lines

Is setuptools available in python 2.7? For now, py-smbus can be built for either python2 or python3, and I would like to maintain that possibility.

Yes, it is.

Patch applied then, thanks for your contribution.

Signature · 2 lines
Jean Delvare
SUSE L3 Support