VERSION += get_git_devstr(False) # Populate the dict of setup command overrides; this should be done before # invoking any other functionality from distutils since it can potentially # modify distutils' behavior. cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE) # Adjust the compiler in case the default on this platform is to use a # broken one. adjust_compiler(PACKAGENAME) # Freeze build information in version.py generate_version_py(PACKAGENAME, VERSION, RELEASE, get_debug_option()) # Use the find_packages tool to locate all packages and modules packagenames = filter_packages(find_packages()) # Treat everything in scripts except README.rst as a script to be installed scripts = [fname for fname in glob.glob(os.path.join('scripts', '*')) if os.path.basename(fname) != 'README.rst'] # Additional C extensions that are not Cython-based should be added here. extensions = [] # A dictionary to keep track of all package data to install package_data = {PACKAGENAME: ['data/*']} # A dictionary to keep track of extra packagedir mappings package_dirs = {} # Update extensions, package_data, packagenames and package_dirs from
# details. package_info = get_package_info(PACKAGENAME) # Add the project-global data package_info['package_data'][PACKAGENAME] = ['data/*'] except ImportError: # compatibility with Astropy 0.2 - can be removed in cases # where Astropy 0.2 is no longer supported from setuptools import find_packages from astropy.setup_helpers import filter_packages, update_package_files package_info = {} # Use the find_packages tool to locate all packages and modules package_info['packages'] = filter_packages(find_packages()) # Additional C extensions that are not Cython-based should be added here. package_info['ext_modules'] = [] # A dictionary to keep track of all package data to install package_info['package_data'] = {PACKAGENAME: ['data/*']} # A dictionary to keep track of extra packagedir mappings package_info['package_dir'] = {} # Update extensions, package_data, packagenames and package_dirs from # any sub-packages that define their own extension modules and package # data. See the docstring for setup_helpers.update_package_files for # more details. update_package_files(PACKAGENAME, package_info['ext_modules'],
release = 'dev' not in version download_base_url = 'http://cloud.github.com/downloads/astropy/astropy' # Adjust the compiler in case the default on this platform is to use a # broken one. setup_helpers.adjust_compiler() if not release: version += get_git_devstr(False) generate_version_py('astropy', version, release, setup_helpers.get_debug_option()) # Use the find_packages tool to locate all packages and modules packagenames = find_packages() packagenames = setup_helpers.filter_packages(packagenames) # Treat everything in scripts except README.rst as a script to be installed scripts = glob.glob(os.path.join('scripts', '*')) scripts.remove(os.path.join('scripts', 'README.rst')) # This dictionary stores the command classes used in setup below cmdclassd = {'test': setup_helpers.setup_test_command('astropy'), # Use distutils' sdist because it respects package_data. # setuptools/distributes sdist requires duplication of # information in MANIFEST.in 'sdist': sdist.sdist, # Use a custom build command which understands additional # commandline arguments