Changeset 1167
- Timestamp:
- 07/28/08 22:22:06 (4 months ago)
- Files:
-
- trunk/audiolab/setup.py (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/audiolab/setup.py
r559 r1167 1 1 #! /usr/bin/env python 2 # Last Change: Fri Sep 07 06:00 PM 2007J2 # Last Change: Tue Jul 29 12:00 PM 2008 J 3 3 4 4 # Copyright (C) 2006-2007 Cournapeau David <cournape@gmail.com> … … 8 8 # Software Foundation; either version 2.1 of the License, or (at your option) any 9 9 # later version. 10 # 10 # 11 11 # This library is distributed in the hope that it will be useful, but WITHOUT ANY 12 12 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 13 # PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 14 14 # details. 15 # 15 # 16 16 # You should have received a copy of the GNU Lesser General Public License along 17 17 # with this library; if not, write to the Free Software Foundation, Inc., 51 … … 26 26 libsndfile from Erik Castro de Lopo for the underlying IO, which supports many 27 27 different audio formats: http://www.mega-nerd.com/libsndfile/ 28 28 29 29 For now, the python api for audio IO should be stable; a matlab-like API is 30 30 also available for quick read/write (ala wavread, wavwrite, etc...). For 1.0 … … 41 41 import sys 42 42 43 DISTNAME = 'scikits.audiolab' 43 DISTNAME = 'scikits.audiolab' 44 44 DESCRIPTION = 'A python module to make noise from numpy arrays' 45 45 LONG_DESCRIPTION = descr … … 61 61 """ sndfile (http://www.mega-nerd.com/libsndfile/) library not found. 62 62 Directories to search for the libraries can be specified in the 63 site.cfg file (section [sndfile]).""" 63 site.cfg file (section [sndfile]).""" 64 64 65 65 class sndfile_info(system_info): … … 85 85 86 86 # 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) 88 88 lib_dirs = self.get_lib_dirs() 89 tmp = None89 tmp = None 90 90 for i in lib_dirs: 91 91 tmp = self.check_libs(i, sndfile_libs) … … 94 94 break 95 95 if tmp is None: 96 raise SndfileNotFoundError("sndfile library not found")97 96 raise SndfileNotFoundError("sndfile library not found") 97 98 98 # Look for the header file 99 include_dirs = self.get_include_dirs() 99 include_dirs = self.get_include_dirs() 100 100 inc_dir = None 101 101 for d in include_dirs: … … 105 105 headername = os.path.abspath(p[0]) 106 106 break 107 107 108 108 if inc_dir is None: 109 raise SndfileNotFoundError("header not found")110 109 raise SndfileNotFoundError("header not found") 110 111 111 if inc_dir is not None and tmp is not None: 112 112 if sys.platform == 'win32': … … 121 121 # All others (Linux for sure; what about solaris) ? 122 122 fullname = prefix + tmp['libraries'][0] + '.so' + \ 123 '.' + str(SNDFILE_MAJ_VERSION) 123 '.' + str(SNDFILE_MAJ_VERSION) 124 124 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) 128 128 else: 129 129 raise RuntimeError("This is a bug") … … 151 151 repdict['%SHARED_LOCATION%'] = libname 152 152 #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'), 155 155 repdict) 156 156 … … 165 165 description = DESCRIPTION, 166 166 license = LICENSE, 167 url = URL, 167 url = URL, 168 168 download_url = DOWNLOAD_URL, 169 169 long_description = LONG_DESCRIPTION) … … 172 172 #print config.make_svn_version_py() 173 173 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), 175 175 # so we need to add them here while the bug is not solved... 176 176 config.add_data_files(('docs', \ … … 178 178 179 179 config.add_data_files(('test_data', \ 180 ['scikits/audiolab/test_data/' + i 180 ['scikits/audiolab/test_data/' + i 181 181 for i in TEST_DATA_FILES])) 182 182 183 183 config.add_data_files(('misc', \ 184 ['scikits/audiolab/misc/' + i 184 ['scikits/audiolab/misc/' + i 185 185 for i in BAD_FLAC_FILES])) 186 186 … … 189 189 return config 190 190 191 TEST_DATA_FILES = ['test.raw', 'test.flac', 'test.wav', 'test.au', 191 TEST_DATA_FILES = ['test.raw', 'test.flac', 'test.wav', 'test.au', 192 192 'test.sdif'] 193 193 DOC_FILES = ['audiolab.pdf', 'index.txt'] … … 204 204 205 205 setup(configuration = configuration, 206 install_requires='numpy', # can also add version specifiers 206 install_requires='numpy', # can also add version specifiers 207 207 namespace_packages=['scikits'], 208 208 packages=setuptools.find_packages(), 209 209 include_package_data = True, 210 #package_data = {'scikits.audiolab': data_files}, 210 #package_data = {'scikits.audiolab': data_files}, 211 211 test_suite="tester", # for python setup.py test 212 212 zip_safe=True, # the package can run out of an .egg file 213 213 #FIXME url, download_url, ext_modules 214 classifiers = 214 classifiers = 215 215 [ 'Development Status :: 4 - Beta', 216 216 'Environment :: Console',
