Cleaned setup script and put to my name ;)

This commit is contained in:
Celine Mercier
2019-09-21 23:44:24 +02:00
parent 336100f716
commit e2ba76002a
2 changed files with 9 additions and 43 deletions

View File

@ -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

View File

@ -16,6 +16,7 @@ from distutils.extension import Extension
from distutils.dist import Distribution as ori_Distribution
class Distribution(ori_Distribution):
def __init__(self,attrs=None):
@ -29,6 +30,7 @@ class Distribution(ori_Distribution):
from distutils.command.build import build as build_ori
from distutils.core import Command
class build_clib(Command):
user_options=[]
@ -58,7 +60,7 @@ class build_clib(Command):
log.info("Compile the shared C library")
subprocess.call(['make','install']) # temporary fix but should be in src
os.chdir(oldwd)
class build(build_ori):
def run(self):
@ -68,6 +70,7 @@ class build(build_ori):
sys.path.append(os.path.abspath("python"))
def findPackage(root,base=None):
modules=[]
if base is None:
@ -77,37 +80,12 @@ def findPackage(root,base=None):
modules.append('.'.join(base+[module]))
modules.extend(findPackage(os.path.join(root,module),base+[module]))
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"
VERSION = "0.0.6"
AUTHOR = 'Eric Coissac'
EMAIL = 'eric@metabarcoding.org'
VERSION = "0.0.9"
AUTHOR = 'Celine Mercier'
EMAIL = 'celine.mercier@metabarcoding.org'
URL = "http://metabarcoding.org/obitools3"
LICENSE = "CeCILL-V2"
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"'
#install_dependencies(REQUIRES)
#RunMake()
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/",""),
os.path.splitext(os.path.basename(x))[0]]).replace('/','.'),
@ -163,9 +136,7 @@ xx = cythonize(cython_ext,
annotate=True,
build_dir="build")
#, include_path=["src","src/libecoPCR","src/libjson"]
classifiers=['Development Status :: 1 - Planning',
classifiers=['Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: Other/Proprietary License',