#! /usr/bin/env python
#
# Install script
#
#

import sys
import os
import os.path
import re
import glob

from os import path

#
# Add to the python path the directory containing the extensions
# of distutils
#


PACKAGE = "ORG.asm"
VERSION = "00.01.000"


sys.path.append('distutils.ext')






AUTHOR  = 'Eric Coissac'
EMAIL   = 'eric@coissac.eu'
URL     = 'metabarcoding.org/orgasm'
LICENSE = 'CeCILL-V2'

SRC                = 'python'
CSRC               = 'src'


#CEXES.extend([])

if __name__=="__main__":

    from obidistutils.serenity import serenity_mode
    
    serenity_mode(PACKAGE,VERSION)
    
    from obidistutils.core import setup
    from obidistutils.core import CTOOLS
    from obidistutils.core import CEXES
    from obidistutils.core import FILES
    
    DEPRECATED_SCRIPTS=['orgasmu',
                        'orgasmg',
                        'orgasml'
                       ]
    
    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')
                  ])
       
    setup(name="ORG.asm",
          description="Scripts and library for organelle assembling",
          version=VERSION,
          author=AUTHOR,
          author_email=EMAIL,
          license=LICENSE,
          url=URL,
          python_src=SRC,
          sse='sse2')
