@@ -19,11 +19,7 @@ def run(self):
1919 if os .path .isfile (bindings ):
2020 os .remove (bindings )
2121
22- if (platform .system () == 'Windows' ):
23- dll = os .path .join (dest , "MetaWear.Win32.dll" )
24- if os .path .isfile (dll ):
25- os .remove (dll )
26- elif (platform .system () == 'Linux' ):
22+ if (platform .system () == 'Linux' ):
2723 for f in os .listdir (dest ):
2824 if (f .startswith ("libmetawear.so" )):
2925 os .remove (os .path .join (dest , f ))
@@ -38,19 +34,14 @@ def _move(src, dest, basename):
3834 def run (self ):
3935 cpp_sdk = os .path .join (root , 'MetaWear-SDK-Cpp' )
4036 system = platform .system ()
41- dist_dir = os .path .join (cpp_sdk , 'dist' , 'release' , 'lib' , "Win32" if machine == "x86" and system == "Windows" else machine )
37+ dist_dir = os .path .join (cpp_sdk , 'dist' , 'release' , 'lib' , machine )
4238
4339 if os .path .exists (os .path .join (root , '.git' )):
4440 status = call (["git" , "submodule" , "update" , "--init" ], cwd = root , stderr = STDOUT )
4541 if (status != 0 ):
4642 raise RuntimeError ("Could not init git submodule" )
4743
48- if (system == 'Windows' ):
49- if (call (["MSBuild.exe" , "MetaWear.Win32.vcxproj" , "/p:Platform=%s" % machine , "/p:Configuration=Release" ], cwd = cpp_sdk , stderr = STDOUT ) != 0 ):
50- raise RuntimeError ("Failed to compile MetaWear.dll" )
51-
52- move (os .path .join (dist_dir , "MetaWear.Win32.dll" ), dest )
53- elif (system == 'Linux' ):
44+ if (system == 'Linux' ):
5445 status = call (["make" , "-C" , "MetaWear-SDK-Cpp" , "OPT_FLAGS=-Wno-strict-aliasing" , "-j%d" % (cpu_count ())], cwd = root , stderr = STDOUT )
5546 if (status != 0 ):
5647 raise RuntimeError ("Failed to compile C++ SDK" )
@@ -62,13 +53,13 @@ def run(self):
6253 copy2 (os .path .join (cpp_sdk , 'bindings' , 'python' , 'mbientlab' , 'metawear' , 'cbindings.py' ), dest )
6354 build_py .run (self )
6455
65- so_pkg_data = ['libmetawear.so' ] if platform . system () == 'Linux' else [ 'MetaWear.Win32.dll' ]
56+ so_pkg_data = ['libmetawear.so' ]
6657setup (
6758 name = 'metawear' ,
6859 packages = ['mbientlab' , 'mbientlab.metawear' ],
69- version = '0.7 .0' ,
60+ version = '0.8 .0' ,
7061 description = 'Python bindings for the MetaWear C++ SDK by MbientLab' ,
71- long_description = open (os .path .join (os .path .dirname (__file__ ), "README.rst " )).read (),
62+ long_description = open (os .path .join (os .path .dirname (__file__ ), "README.md " )).read (),
7263 package_data = {'mbientlab.metawear' : so_pkg_data },
7364 include_package_data = True ,
7465 url = 'https://github.com/mbientlab/MetaWear-SDK-Python' ,
@@ -83,13 +74,11 @@ def run(self):
8374 'clean' : MetaWearClean
8475 },
8576 keywords = ['sensors' , 'mbientlab' , 'metawear' , 'bluetooth le' , 'native' ],
86- python_requires = '>=2.7 ' ,
77+ python_requires = '>=3.4 ' ,
8778 classifiers = [
8879 'Development Status :: 4 - Beta' ,
8980 'Intended Audience :: Developers' ,
9081 'Operating System :: POSIX :: Linux' ,
91- 'Operating System :: Microsoft :: Windows :: Windows 10' ,
92- 'Programming Language :: Python :: 2.7' ,
9382 'Programming Language :: Python :: 3' ,
9483 ]
9584)
0 commit comments