2121from distutils .command .clean import clean as _clean
2222from distutils .command .sdist import sdist as _sdist
2323
24- import os , platform , shutil , glob
24+ import os
25+ import platform
26+ import shutil
27+ import glob
2528import numpy as np
2629import pyarrow as pa
2730
31+
2832def read (fname ):
2933 with open (os .path .join (os .path .dirname (__file__ ), fname )) as f :
3034 return f .read ()
3135
36+
3237target_dir = os .getcwd () + "/build"
3338output_dir = target_dir + "/install"
3439include_dir = output_dir + "/include"
@@ -38,6 +43,7 @@ def read(fname):
3843py_build_dir = py_target_dir + "/build"
3944py_dist_dir = target_dir + "/dist"
4045
46+
4147class clean (_clean ):
4248 def run (self ):
4349 _clean .run (self )
@@ -47,6 +53,7 @@ def run(self):
4753 pass
4854 shutil .rmtree (target_dir )
4955
56+
5057class build (_build ):
5158 def initialize_options (self ):
5259 _build .initialize_options (self )
@@ -63,40 +70,41 @@ def run(self):
6370 except ImportError :
6471 # TODO: download cmake 3.14 and extract in build dir
6572 raise ImportError ('CMake or make not found' )
66- cmake ['../../..' ]\
67- ['-DFLETCHER_BUILD_ECHO=ON' ]\
68- ['-DCMAKE_BUILD_TYPE=Release' ]\
69- ['-DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0' ]\
70- ['-DCMAKE_INSTALL_PREFIX={}' .format (output_dir )] & FG
73+ cmake ['../../..' ]['-DFLETCHER_BUILD_ECHO=ON' ]['-DCMAKE_BUILD_TYPE=Release' ][
74+ '-DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0' ]['-DCMAKE_INSTALL_PREFIX={}' .format (output_dir )] & FG
7175 make ['-j4' ] & FG
7276 make ['install' ] & FG
7377 _build .run (self )
7478
79+
7580class bdist (_bdist ):
7681 def finalize_options (self ):
7782 _bdist .finalize_options (self )
7883 self .dist_dir = py_dist_dir
7984
85+
8086class sdist (_sdist ):
8187 def finalize_options (self ):
8288 _sdist .finalize_options (self )
8389 self .dist_dir = py_dist_dir
8490
91+
8592class egg_info (_egg_info ):
8693 def initialize_options (self ):
8794 _egg_info .initialize_options (self )
8895 self .egg_base = os .path .relpath (py_target_dir )
8996
97+
9098setup (
9199 name = "pyfletcher" ,
92- version = "0.0.12 " ,
100+ version = "0.0.13 " ,
93101 author = "Accelerated Big Data Systems, Delft University of Technology" ,
94102 packages = find_packages (),
95103 description = "A Python wrapper for the Fletcher runtime library" ,
96104 long_description = read ('README.md' ),
97105 long_description_content_type = 'text/markdown' ,
98106 url = "https://github.com/abs-tudelft/fletcher" ,
99- project_urls = {
107+ project_urls = {
100108 "Bug Tracker" : "https://github.com/abs-tudelft/fletcher/issues" ,
101109 "Documentation" : "https://abs-tudelft.github.io/fletcher/" ,
102110 "Source Code" : "https://github.com/abs-tudelft/fletcher/" ,
@@ -143,16 +151,17 @@ def initialize_options(self):
143151 "License :: OSI Approved :: Apache Software License" ,
144152 "Operating System :: POSIX :: Linux"
145153 ],
146- cmdclass = {
154+ cmdclass = {
147155 'bdist' : bdist ,
148156 'build' : build ,
149157 'clean' : clean ,
150158 'egg_info' : egg_info ,
151159 'sdist' : sdist ,
152160 },
153161 license = 'Apache License, Version 2.0' ,
154- zip_safe = False ,
155- data_files = [
156- ('lib' , [output_dir + '/lib64/libfletcher_echo.so' ] if 'AUDITWHEEL_PLAT' in os .environ else []),
162+ zip_safe = False ,
163+ data_files = [
164+ ('lib' , [output_dir + '/lib64/libfletcher_echo.so' ]
165+ if 'AUDITWHEEL_PLAT' in os .environ else []),
157166 ],
158167)
0 commit comments