setup.py 3.45 KB
Newer Older
Eric Coissac committed
1
#!/usr/bin/env python
Eric Coissac committed
2 3

import sys
4
import os
5 6

PACKAGE = "ORG.asm"
Eric Coissac committed
7 8
AUTHOR      = 'Eric Coissac'
EMAIL       = 'eric@coissac.eu'
9
URL         = 'http://metabarcoding.org/obitools3'
Eric Coissac committed
10
LICENSE     = 'CeCILL-V2'
11
DESCRIPTION ="A de novo assembler dedicated to organelle genome assembling"
Eric Coissac committed
12

Eric Coissac committed
13 14
SRC       = 'python'
CSRC      = 'src'
Eric Coissac committed
15

16
classifiers=['Development Status :: 3 - Alpha',
Eric Coissac committed
17 18 19 20 21 22 23 24 25
             'Environment :: Console',
             'Intended Audience :: Science/Research',
             'License :: Other/Proprietary License',
             'Operating System :: Unix',
             'Programming Language :: Python',
             'Programming Language :: Python :: 3',
             'Topic :: Scientific/Engineering :: Bio-Informatics',
             'Topic :: Utilities',
             ]
Eric Coissac committed
26

Eric Coissac committed
27

Eric Coissac committed
28
PYTHONMIN='3.4'
Eric Coissac committed
29

30 31 32 33 34 35 36 37
directory = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(directory,'distutils.ext'))
sys.path.append(os.path.join(directory,SRC))

print(sys.path)


VERSION=open(os.path.join(directory,'VERSION')).read().strip()
38

Eric Coissac committed
39 40 41

if __name__=="__main__":
    
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
    import sys
    
    print("----------------")
    print(" ".join(sys.argv))
    print("----------------")
    
    #
    # Horrible hack
    #
    
    if sys.argv[0]=="-c":
        sys.argv[0]="setup.py"
    
    #
    # End of the horrible hack
    #
    
Eric Coissac committed
59 60 61 62
    from obidistutils.serenity import serenity_mode

    serenity=serenity_mode(PACKAGE,VERSION)

Eric Coissac committed
63 64 65 66 67
    from obidistutils.core import setup
    from obidistutils.core import CTOOLS
    from obidistutils.core import CEXES
    from obidistutils.core import FILES
    
Eric Coissac committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
    CTOOLS.extend([('buildcomplement',{"sources":["src/buildcomplement.c"]}),
                   ('buildcode',{"sources":["src/buildcode.c"]}),
                   ('buildexpand8bits',{"sources":["src/buildexpand8bits.c"]})])
    
    
    # Files starting with an @ are built by the setup script 
    # according to the FILES rules
    
    CEXES.extend([('orgasmi',{"sources":["src/orgasmi.c",
                                         "src/buffer.c",
                                         "src/buildindex.c",
                                         "@code16bits.c",
                                         "@codecomp.c",
                                         "src/compsort.c",
                                         "src/debug.c",
                                         "src/decode.c",
                                         "src/encode.c",
                                         "src/fastq.c",
                                         "src/indexinput.c",
                                         "src/indexoutput.c",
                                         "src/load.c",
                                         "src/lookfor.c",
                                         "src/malloc.c",
                                         "src/fgetln.c",
                                         "src/sort.c"
                                         ]})])    
    
    FILES.extend([('codecomp.c','buildcomplement','%(prog)s > %(dest)s'),
                  ('code16bits.c','buildcode','%(prog)s > %(dest)s'),
                  ('expand8bits.c','buildexpand8bits','%(prog)s > %(dest)s')
                  ])
Eric Coissac committed
99 100 101 102
 
    setup(name=PACKAGE,
          description=DESCRIPTION,
          classifiers=classifiers,
Eric Coissac committed
103 104 105 106 107 108
          version=VERSION,
          author=AUTHOR,
          author_email=EMAIL,
          license=LICENSE,
          url=URL,
          python_src=SRC,
Eric Coissac committed
109 110 111 112
          sse='sse2',
          serenity=serenity,
          pythonmin=PYTHONMIN)