|
5 | 5 | # Found this on stack overflow: |
6 | 6 | # https://stackoverflow.com/questions/4529555/building-a-ctypes-based-c-library-with-distutils |
7 | 7 | # noinspection PyPep8Naming |
8 | | -class build_ext(build_ext): |
| 8 | +class build_ext(build_ext, object): |
9 | 9 |
|
10 | 10 | def build_extension(self, ext): |
11 | 11 | # noinspection PyAttributeOutsideInit |
12 | 12 | self._ctypes = isinstance(ext, CTypesExtension) |
13 | | - return super().build_extension(ext) |
| 13 | + return super(build_ext,self).build_extension(ext) |
14 | 14 |
|
15 | 15 | def get_export_symbols(self, ext): |
16 | 16 | if self._ctypes: |
17 | 17 | return ext.export_symbols |
18 | | - return super().get_export_symbols(ext) |
| 18 | + return super(build_ext,self).get_export_symbols(ext) |
19 | 19 |
|
20 | 20 | def get_ext_filename(self, ext_name): |
21 | 21 | if self._ctypes: |
22 | 22 | return ext_name + '.so' |
23 | | - return super().get_ext_filename(ext_name) |
| 23 | + return super(build_ext,self).get_ext_filename(ext_name) |
24 | 24 |
|
25 | 25 |
|
26 | 26 | class CTypesExtension(Extension): |
@@ -53,5 +53,5 @@ class CTypesExtension(Extension): |
53 | 53 | ext_modules=[extension], |
54 | 54 | package_dir={'': 'python'}, |
55 | 55 | py_modules=['VL53L0X'], |
56 | | - requires=['smbus2'], |
| 56 | + requires=['smbus' or 'smbus2'], |
57 | 57 | cmdclass={'build_ext': build_ext}) |
0 commit comments