Skip to content

Commit 39532e9

Browse files
authored
Merge pull request johnbryanmoore#4 from naisy/naisy
update for pip
2 parents b5eac4d + c8f091b commit 39532e9

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
# Found this on stack overflow:
66
# https://stackoverflow.com/questions/4529555/building-a-ctypes-based-c-library-with-distutils
77
# noinspection PyPep8Naming
8-
class build_ext(build_ext):
8+
class build_ext(build_ext, object):
99

1010
def build_extension(self, ext):
1111
# noinspection PyAttributeOutsideInit
1212
self._ctypes = isinstance(ext, CTypesExtension)
13-
return super().build_extension(ext)
13+
return super(build_ext,self).build_extension(ext)
1414

1515
def get_export_symbols(self, ext):
1616
if self._ctypes:
1717
return ext.export_symbols
18-
return super().get_export_symbols(ext)
18+
return super(build_ext,self).get_export_symbols(ext)
1919

2020
def get_ext_filename(self, ext_name):
2121
if self._ctypes:
2222
return ext_name + '.so'
23-
return super().get_ext_filename(ext_name)
23+
return super(build_ext,self).get_ext_filename(ext_name)
2424

2525

2626
class CTypesExtension(Extension):
@@ -53,5 +53,5 @@ class CTypesExtension(Extension):
5353
ext_modules=[extension],
5454
package_dir={'': 'python'},
5555
py_modules=['VL53L0X'],
56-
requires=['smbus2'],
56+
requires=['smbus' or 'smbus2'],
5757
cmdclass={'build_ext': build_ext})

0 commit comments

Comments
 (0)