Cleaned setup script and put to my name ;)
This commit is contained in:
@ -1,5 +0,0 @@
|
|||||||
--extra-index-url https://pypi.python.org/simple/
|
|
||||||
Cython>=0.24
|
|
||||||
Sphinx>=1.2.0
|
|
||||||
ipython>=3.0.0
|
|
||||||
breathe>=4.0.0
|
|
43
setup.py
43
setup.py
@ -16,6 +16,7 @@ from distutils.extension import Extension
|
|||||||
|
|
||||||
from distutils.dist import Distribution as ori_Distribution
|
from distutils.dist import Distribution as ori_Distribution
|
||||||
|
|
||||||
|
|
||||||
class Distribution(ori_Distribution):
|
class Distribution(ori_Distribution):
|
||||||
|
|
||||||
def __init__(self,attrs=None):
|
def __init__(self,attrs=None):
|
||||||
@ -29,6 +30,7 @@ class Distribution(ori_Distribution):
|
|||||||
from distutils.command.build import build as build_ori
|
from distutils.command.build import build as build_ori
|
||||||
from distutils.core import Command
|
from distutils.core import Command
|
||||||
|
|
||||||
|
|
||||||
class build_clib(Command):
|
class build_clib(Command):
|
||||||
user_options=[]
|
user_options=[]
|
||||||
|
|
||||||
@ -68,6 +70,7 @@ class build(build_ori):
|
|||||||
|
|
||||||
sys.path.append(os.path.abspath("python"))
|
sys.path.append(os.path.abspath("python"))
|
||||||
|
|
||||||
|
|
||||||
def findPackage(root,base=None):
|
def findPackage(root,base=None):
|
||||||
modules=[]
|
modules=[]
|
||||||
if base is None:
|
if base is None:
|
||||||
@ -78,36 +81,11 @@ def findPackage(root,base=None):
|
|||||||
modules.extend(findPackage(os.path.join(root,module),base+[module]))
|
modules.extend(findPackage(os.path.join(root,module),base+[module]))
|
||||||
return modules
|
return modules
|
||||||
|
|
||||||
def RunMake():
|
|
||||||
log.info("Build the build/cobject directory")
|
|
||||||
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()
|
|
||||||
log.info("Run CMake")
|
|
||||||
subprocess.call(['cmake', install_clibdir_option, '../../src'])
|
|
||||||
log.info("Compile the shared C library")
|
|
||||||
subprocess.call(['make','install']) # temporary fix but should be in src
|
|
||||||
os.chdir(oldwd)
|
|
||||||
|
|
||||||
#def install_dependencies(deps):
|
|
||||||
# for r in deps:
|
|
||||||
# log.info("Installing dependency : %s" %r)
|
|
||||||
# subprocess.call(['pip','install',r])
|
|
||||||
|
|
||||||
|
|
||||||
PACKAGE = "OBITools3"
|
PACKAGE = "OBITools3"
|
||||||
VERSION = "0.0.6"
|
VERSION = "0.0.9"
|
||||||
AUTHOR = 'Eric Coissac'
|
AUTHOR = 'Celine Mercier'
|
||||||
EMAIL = 'eric@metabarcoding.org'
|
EMAIL = 'celine.mercier@metabarcoding.org'
|
||||||
URL = "http://metabarcoding.org/obitools3"
|
URL = "http://metabarcoding.org/obitools3"
|
||||||
LICENSE = "CeCILL-V2"
|
LICENSE = "CeCILL-V2"
|
||||||
DESCRIPTION = "Tools and library for DNA metabarcoding",
|
DESCRIPTION = "Tools and library for DNA metabarcoding",
|
||||||
@ -124,8 +102,6 @@ REQUIRES = ['Cython>=0.24',
|
|||||||
|
|
||||||
os.environ['CFLAGS'] = '-O3 -Wall -I "src" -I "src/libecoPCR" -I "src/libjson"'
|
os.environ['CFLAGS'] = '-O3 -Wall -I "src" -I "src/libecoPCR" -I "src/libjson"'
|
||||||
|
|
||||||
#install_dependencies(REQUIRES)
|
|
||||||
#RunMake()
|
|
||||||
|
|
||||||
from Cython.Build import cythonize
|
from Cython.Build import cythonize
|
||||||
|
|
||||||
@ -134,9 +110,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()
|
|
||||||
|
|
||||||
|
|
||||||
cython_ext = [Extension('.'.join([os.path.dirname(x).replace("python/",""),
|
cython_ext = [Extension('.'.join([os.path.dirname(x).replace("python/",""),
|
||||||
os.path.splitext(os.path.basename(x))[0]]).replace('/','.'),
|
os.path.splitext(os.path.basename(x))[0]]).replace('/','.'),
|
||||||
@ -163,9 +136,7 @@ xx = cythonize(cython_ext,
|
|||||||
annotate=True,
|
annotate=True,
|
||||||
build_dir="build")
|
build_dir="build")
|
||||||
|
|
||||||
#, include_path=["src","src/libecoPCR","src/libjson"]
|
classifiers=['Development Status :: 4 - Beta',
|
||||||
|
|
||||||
classifiers=['Development Status :: 1 - Planning',
|
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
'Intended Audience :: Science/Research',
|
'Intended Audience :: Science/Research',
|
||||||
'License :: Other/Proprietary License',
|
'License :: Other/Proprietary License',
|
||||||
|
Reference in New Issue
Block a user