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.py
for example usage and the Astropy development docs for more details.This function obtains that information by iterating through all packages in
srcdir
and locating asetup_package.py
module. 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_extensions
returns a list of distutils.extension.Extension objects.get_package_data()
returns a dict formatted as required by thepackage_data
argument 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.