Commit 35eeb07f by Eric Coissac

Build the C src in build/cobject

parent 3afbbeb7
......@@ -27,6 +27,23 @@ def findPackage(root,base=None):
modules.extend(findPackage(os.path.join(root,module),base+[module]))
return modules
def RunMake():
try:
os.mkdir("build")
except OSError:
pass
try:
os.mkdir("build/cobject")
except OSError:
pass
oldwd = os.getcwd()
os.chdir("build/cobject")
install_clibdir_option="-DPYTHONLIB:STRING='%s'" % get_python_lib()
subprocess.call(['cmake', install_clibdir_option, '../../src'])
subprocess.call(['make','install']) # temporary fix but should be in src
os.chdir(oldwd)
PACKAGE = "OBITools3"
VERSION = "0.0.0"
......@@ -48,7 +65,8 @@ REQUIRES = ['Cython>=0.24',
os.environ['CFLAGS'] = '-O3 -Wall -I "src" -I "src/libecoPCR" -I "src/libjson"'
#sys.path.append("/Users/coissac/git/obitools3/python")
RunMake()
cython_src = [x for x in glob.iglob('python/obitools3/**/*.pyx',
recursive=True
......@@ -58,10 +76,6 @@ cython_src = [x for x in glob.iglob('python/obitools3/**/*.pyx',
#with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
# readme = f.read()
install_clibdir_option="-DPYTHONLIB:STRING='%s'" % get_python_lib()
subprocess.call(['cmake', install_clibdir_option, 'src'])
subprocess.call(['make','install']) # temporary fix but should be in src
cython_ext = [Extension('.'.join([os.path.dirname(x).replace("python/",""),
os.path.splitext(os.path.basename(x))[0]]).replace('/','.'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment