source: setup.py

Last change on this file was 310, checked in by marchulsman, 10 years ago

Solve some bugs, add bitor_reduceat function in cutils, rename map to rmap

File size: 3.0 KB
Line 
1#!/usr/bin/env python
2
3from distutils.core import setup, Extension
4import distutils.sysconfig
5from distutils.debug import DEBUG
6import config
7import sys
8
9_ConfigDefault = {
10    "setup.numpy_path" : distutils.sysconfig.get_python_lib() + \
11        "/numpy/core/include",
12    "setup.db_name":                "ibidas",
13    "setup.db_user":                "postgres",
14    "setup.db_user_pw ":            "Put the postgres password here",
15    "setup.db_host":                "127.0.0.1",
16    "setup.db_port":                "5432",
17    "setup.authenticated_mode":     "yes",
18    "setup.setup_type":             "new"
19}
20# include_dir = "/usr/lib64/python2.6/site-packages/numpy/core/include"
21
22setupconfig = config.loadConfig('setup.ini', _ConfigDefault)
23
24#include_dir = distutils.sysconfig.get_python_lib() + "/numpy/core/include"
25include_dir = "/usr/lib64/python2.6/site-packages/numpy/core/include"
26#include_dir = setupconfig['setup.numpy_path']
27
28setup(name = 'Ibidas', 
29    version = '0.1.0', 
30    description = 'The Ibidas data accession system',
31    author = 'The Collective',
32    author_email = 'letsnot@notgmail.com',
33    url = 'https://wiki.nbic.nl/index.php/Ibidas',
34    py_modules = ['ibidas','test','config'],
35    packages = ['container', ],
36    ext_modules = [
37        Extension(
38                'closure', 
39                ['src/closure.c'],
40                extra_compile_args=["-Wall"]
41            ),
42        Extension(
43                    'multi_visitor', 
44                    ['src/multi_visitor.c'],
45                    extra_compile_args=["-Wall"]
46            ),
47        Extension(
48            'base_container', 
49            ['src/base_container.c'],
50            include_dirs=[include_dir],
51            extra_compile_args=["-Wall"]
52        ),
53        Extension(
54            'xnumpy', 
55            ['src/xnumpy.c'], 
56            include_dirs=[include_dir],
57            extra_compile_args=["-Wall"]
58        ),
59        Extension(
60            'cutils', 
61            ['src/SFMT.c','src/cutils.c'], 
62            include_dirs=[include_dir],
63            extra_compile_args=["-Wall", "-O3", "-msse2","-msse4.2", "-DHAVE_SSE2","-DMEXP=19937"]
64        ),
65     ],
66     requires=['numpy','psycopg2','ipython'],
67     provides=['ibidas'],
68)
69
70if (setupconfig['setup.setup_type'] == "new"):
71    args = []
72   
73    debug_answer = ""
74    while not(debug_answer == "y" or debug_answer == "n"):
75        debug_answer = raw_input("Do you want to run a debugging setup? (y/n)\n")
76    if debug_answer == "y":
77        args.append("debug")
78   
79    override_answer = ""
80    while not(override_answer == "y" or override_answer == "n"):
81        override_answer = raw_input("Do you want to override the database if it already exists? (y/n)\n")
82    if override_answer == "y":
83        args.append("override")
84   
85    soap_answer = ""
86    while not(soap_answer == "y" or soap_answer == "n"):
87        soap_answer = raw_input("Do you want to generate SOAP Serializers? (y/n)\n")
88    if soap_answer == "n":
89        args.append("nosoap")
90   
91    import os
92    if len(args) > 0:
93        add = " " + " ".join(args)
94    else:
95        add = ""
96    os.system("python setup_db.py" + add)
Note: See TracBrowser for help on using the repository browser.