Similar to add_library, but the specified library is installed. Most C libraries used with `distutils` are only used to build python extensions, but libraries built through this method will be installed so that they can be reused by third-party packages. Pa
(self, name, sources, install_dir, build_info=None)
| 1595 | self.libraries.append((name, build_info)) |
| 1596 | |
| 1597 | def add_installed_library(self, name, sources, install_dir, build_info=None): |
| 1598 | """ |
| 1599 | Similar to add_library, but the specified library is installed. |
| 1600 | |
| 1601 | Most C libraries used with `distutils` are only used to build python |
| 1602 | extensions, but libraries built through this method will be installed |
| 1603 | so that they can be reused by third-party packages. |
| 1604 | |
| 1605 | Parameters |
| 1606 | ---------- |
| 1607 | name : str |
| 1608 | Name of the installed library. |
| 1609 | sources : sequence |
| 1610 | List of the library's source files. See `add_library` for details. |
| 1611 | install_dir : str |
| 1612 | Path to install the library, relative to the current sub-package. |
| 1613 | build_info : dict, optional |
| 1614 | The following keys are allowed: |
| 1615 | |
| 1616 | * depends |
| 1617 | * macros |
| 1618 | * include_dirs |
| 1619 | * extra_compiler_args |
| 1620 | * extra_f77_compile_args |
| 1621 | * extra_f90_compile_args |
| 1622 | * f2py_options |
| 1623 | * language |
| 1624 | |
| 1625 | Returns |
| 1626 | ------- |
| 1627 | None |
| 1628 | |
| 1629 | See Also |
| 1630 | -------- |
| 1631 | add_library, add_npy_pkg_config, get_info |
| 1632 | |
| 1633 | Notes |
| 1634 | ----- |
| 1635 | The best way to encode the options required to link against the specified |
| 1636 | C libraries is to use a "libname.ini" file, and use `get_info` to |
| 1637 | retrieve the required options (see `add_npy_pkg_config` for more |
| 1638 | information). |
| 1639 | |
| 1640 | """ |
| 1641 | if not build_info: |
| 1642 | build_info = {} |
| 1643 | |
| 1644 | install_dir = os.path.join(self.package_path, install_dir) |
| 1645 | self._add_library(name, sources, install_dir, build_info) |
| 1646 | self.installed_libraries.append(InstallableLib(name, build_info, install_dir)) |
| 1647 | |
| 1648 | def add_npy_pkg_config(self, template, install_dir, subst_dict=None): |
| 1649 | """ |
no test coverage detected