Add library to configuration. Parameters ---------- name : str Name of the extension. sources : sequence List of the sources. The list of sources may contain functions (called source generators) which must take an extensio
(self,name,sources,**build_info)
| 1543 | return ext |
| 1544 | |
| 1545 | def add_library(self,name,sources,**build_info): |
| 1546 | """ |
| 1547 | Add library to configuration. |
| 1548 | |
| 1549 | Parameters |
| 1550 | ---------- |
| 1551 | name : str |
| 1552 | Name of the extension. |
| 1553 | sources : sequence |
| 1554 | List of the sources. The list of sources may contain functions |
| 1555 | (called source generators) which must take an extension instance |
| 1556 | and a build directory as inputs and return a source file or list of |
| 1557 | source files or None. If None is returned then no sources are |
| 1558 | generated. If the Extension instance has no sources after |
| 1559 | processing all source generators, then no extension module is |
| 1560 | built. |
| 1561 | build_info : dict, optional |
| 1562 | The following keys are allowed: |
| 1563 | |
| 1564 | * depends |
| 1565 | * macros |
| 1566 | * include_dirs |
| 1567 | * extra_compiler_args |
| 1568 | * extra_f77_compile_args |
| 1569 | * extra_f90_compile_args |
| 1570 | * f2py_options |
| 1571 | * language |
| 1572 | |
| 1573 | """ |
| 1574 | self._add_library(name, sources, None, build_info) |
| 1575 | |
| 1576 | dist = self.get_distribution() |
| 1577 | if dist is not None: |
| 1578 | self.warn('distutils distribution has been initialized,'\ |
| 1579 | ' it may be too late to add a library '+ name) |
| 1580 | |
| 1581 | def _add_library(self, name, sources, install_dir, build_info): |
| 1582 | """Common implementation for add_library and add_installed_library. Do |
nothing calls this directly
no test coverage detected