Changeset 1167

Show
Ignore:
Timestamp:
07/28/08 22:22:06 (4 months ago)
Author:
cdavid
Message:

Fix space/tab issue in setup.py.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/audiolab/setup.py

    r559 r1167  
    11#! /usr/bin/env python 
    2 # Last Change: Fri Sep 07 06:00 PM 2007
     2# Last Change: Tue Jul 29 12:00 PM 2008
    33 
    44# Copyright (C) 2006-2007 Cournapeau David <cournape@gmail.com> 
     
    88# Software Foundation; either version 2.1 of the License, or (at your option) any 
    99# later version. 
    10 #  
     10# 
    1111# This library is distributed in the hope that it will be useful, but WITHOUT ANY 
    1212# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
    1313# PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more 
    1414# details. 
    15 #  
     15# 
    1616# You should have received a copy of the GNU Lesser General Public License along 
    1717# with this library; if not, write to the Free Software Foundation, Inc., 51 
     
    2626libsndfile from Erik Castro de Lopo for the underlying IO, which supports many 
    2727different audio formats: http://www.mega-nerd.com/libsndfile/ 
    28      
     28 
    2929For now, the python api for audio IO should be stable; a matlab-like API is 
    3030also available for quick read/write (ala wavread, wavwrite, etc...). For 1.0 
     
    4141import sys 
    4242 
    43 DISTNAME            = 'scikits.audiolab'  
     43DISTNAME            = 'scikits.audiolab' 
    4444DESCRIPTION         = 'A python module to make noise from numpy arrays' 
    4545LONG_DESCRIPTION    = descr 
     
    6161    """ sndfile (http://www.mega-nerd.com/libsndfile/) library not found. 
    6262    Directories to search for the libraries can be specified in the 
    63     site.cfg file (section [sndfile])."""  
     63    site.cfg file (section [sndfile]).""" 
    6464 
    6565class sndfile_info(system_info): 
     
    8585 
    8686        # Look for the shared library 
    87         sndfile_libs    = self.get_libs('sndfile_libs', self.libname)  
     87        sndfile_libs    = self.get_libs('sndfile_libs', self.libname) 
    8888        lib_dirs        = self.get_lib_dirs() 
    89         tmp                    = None 
     89        tmp             = None 
    9090        for i in lib_dirs: 
    9191            tmp = self.check_libs(i, sndfile_libs) 
     
    9494                break 
    9595        if tmp is None: 
    96                    raise SndfileNotFoundError("sndfile library not found") 
    97                          
     96            raise SndfileNotFoundError("sndfile library not found") 
     97 
    9898        # Look for the header file 
    99         include_dirs    = self.get_include_dirs()  
     99        include_dirs    = self.get_include_dirs() 
    100100        inc_dir         = None 
    101101        for d in include_dirs: 
     
    105105                headername  = os.path.abspath(p[0]) 
    106106                break 
    107          
     107 
    108108        if inc_dir is None: 
    109                    raise SndfileNotFoundError("header not found") 
    110                          
     109            raise SndfileNotFoundError("header not found") 
     110 
    111111        if inc_dir is not None and tmp is not None: 
    112112            if sys.platform == 'win32': 
     
    121121                # All others (Linux for sure; what about solaris) ? 
    122122                fullname    = prefix + tmp['libraries'][0] + '.so' + \ 
    123                         '.' + str(SNDFILE_MAJ_VERSION)  
     123                        '.' + str(SNDFILE_MAJ_VERSION) 
    124124            fullname    = os.path.join(info['library_dirs'][0], fullname) 
    125             dict_append(info, include_dirs=[inc_dir],  
    126                     fullheadloc = headername,  
    127                     fulllibloc  = fullname)  
     125            dict_append(info, include_dirs=[inc_dir], 
     126                    fullheadloc = headername, 
     127                    fulllibloc  = fullname) 
    128128        else: 
    129129            raise RuntimeError("This is a bug") 
     
    151151    repdict['%SHARED_LOCATION%'] = libname 
    152152    #do_subst_in_file('pysndfile.py.in', 'pysndfile.py', repdict) 
    153     do_subst_in_file(os.path.join(pkg_prefix_dir, 'pysndfile.py.in'),  
    154             os.path.join(pkg_prefix_dir, 'pysndfile.py'),  
     153    do_subst_in_file(os.path.join(pkg_prefix_dir, 'pysndfile.py.in'), 
     154            os.path.join(pkg_prefix_dir, 'pysndfile.py'), 
    155155            repdict) 
    156156 
     
    165165        description = DESCRIPTION, 
    166166        license = LICENSE, 
    167         url = URL,  
     167        url = URL, 
    168168        download_url = DOWNLOAD_URL, 
    169169        long_description = LONG_DESCRIPTION) 
     
    172172    #print config.make_svn_version_py() 
    173173 
    174     # package_data does not work with sdist for setuptools 0.5 (setuptools bug),  
     174    # package_data does not work with sdist for setuptools 0.5 (setuptools bug), 
    175175    # so we need to add them here while the bug is not solved... 
    176176    config.add_data_files(('docs', \ 
     
    178178 
    179179    config.add_data_files(('test_data', \ 
    180             ['scikits/audiolab/test_data/' + i  
     180            ['scikits/audiolab/test_data/' + i 
    181181                for i in TEST_DATA_FILES])) 
    182182 
    183183    config.add_data_files(('misc', \ 
    184             ['scikits/audiolab/misc/' + i  
     184            ['scikits/audiolab/misc/' + i 
    185185                for i in BAD_FLAC_FILES])) 
    186186 
     
    189189    return config 
    190190 
    191 TEST_DATA_FILES = ['test.raw', 'test.flac', 'test.wav', 'test.au',  
     191TEST_DATA_FILES = ['test.raw', 'test.flac', 'test.wav', 'test.au', 
    192192        'test.sdif'] 
    193193DOC_FILES = ['audiolab.pdf', 'index.txt'] 
     
    204204 
    205205    setup(configuration = configuration, 
    206         install_requires='numpy', # can also add version specifiers       
     206        install_requires='numpy', # can also add version specifiers 
    207207        namespace_packages=['scikits'], 
    208208        packages=setuptools.find_packages(), 
    209209        include_package_data = True, 
    210         #package_data = {'scikits.audiolab': data_files},  
     210        #package_data = {'scikits.audiolab': data_files}, 
    211211        test_suite="tester", # for python setup.py test 
    212212        zip_safe=True, # the package can run out of an .egg file 
    213213        #FIXME url, download_url, ext_modules 
    214         classifiers =  
     214        classifiers = 
    215215            [ 'Development Status :: 4 - Beta', 
    216216              'Environment :: Console',