Changeset ad5203c for python/setup.py


Ignore:
Timestamp:
Mar 5, 2013, 5:46:48 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
63f6c13
Parents:
208336b
Message:

python/: improve build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/setup.py

    r208336b rad5203c  
    22
    33from distutils.core import setup, Extension
    4 from generator import generate_object_files
    54import sys
    65import os.path
     
    87
    98# read from VERSION
    10 for l in open(os.path.join('..','VERSION')).readlines(): exec (l.strip())
     9for l in open('VERSION').readlines(): exec (l.strip())
    1110__version__ = '.'.join \
    1211        ([str(x) for x in [AUBIO_MAJOR_VERSION, AUBIO_MINOR_VERSION, AUBIO_PATCH_VERSION]]) \
    1312        + AUBIO_VERSION_STATUS
    1413
    15 library_dirs = ['../build/src', '../src/.libs']
    16 include_dirs = ['../build/src', '../src', '.' ]
     14library_dirs = ['../build/src']
     15include_dirs = ['../src'] # aubio.h
     16include_dirs += ['../build/src'] # config.h
     17include_dirs += ['ext']
     18include_dirs += ['gen']
     19#include_dirs += ['../build/src', '../src', '.' ]
     20
    1721library_dirs = filter (lambda x: os.path.isdir(x), library_dirs)
    1822include_dirs = filter (lambda x: os.path.isdir(x), include_dirs)
     23
     24generated_object_files = []
     25
     26output_path = 'gen'
     27
     28if not os.path.isdir(output_path):
     29    from generator import generate_object_files
     30    generated_object_files = generate_object_files(output_path)
     31else:
     32    import glob
     33    generated_object_files = glob.glob(os.path.join(output_path, '*.c'))
    1934
    2035aubio_extension = Extension("aubio._aubio", [
     
    3045            "ext/py-phasevoc.c",
    3146            # generated files
    32             ] + generate_object_files(),
     47            ] + generated_object_files,
    3348        include_dirs = include_dirs + [ numpy.get_include() ],
    3449        library_dirs = library_dirs,
Note: See TracChangeset for help on using the changeset viewer.