get_package_info¶
- astropy_helpers.setup_helpers.get_package_info(srcdir='.', exclude=())¶
Collates all of the information for building all subpackages and returns a dictionary of keyword arguments that can be passed directly to distutils.setup.
The purpose of this function is to allow subpackages to update the arguments to the package’s
setup()function in its setup.py script, rather than having to specify all extensions/package data directly in thesetup.py. See Astropy’s ownsetup.pyfor example usage and the Astropy development docs for more details.This function obtains that information by iterating through all packages in
srcdirand locating asetup_package.pymodule. This module can contain the following functions:get_extensions(),get_package_data(),get_build_options(), andget_external_libraries().Each of those functions take no arguments.
get_extensionsreturns a list of distutils.extension.Extension objects.get_package_data()returns a dict formatted as required by thepackage_dataargument tosetup().get_build_options()returns a list of tuples describing the extra build options to add.get_external_libraries()returns a list of libraries that can optionally be built using external dependencies.