(self)
| 222 | return full_install_dir, generated_path |
| 223 | |
| 224 | def build_npy_pkg_config(self): |
| 225 | log.info('build_src: building npy-pkg config files') |
| 226 | |
| 227 | # XXX: another ugly workaround to circumvent distutils brain damage. We |
| 228 | # need the install prefix here, but finalizing the options of the |
| 229 | # install command when only building sources cause error. Instead, we |
| 230 | # copy the install command instance, and finalize the copy so that it |
| 231 | # does not disrupt how distutils want to do things when with the |
| 232 | # original install command instance. |
| 233 | install_cmd = copy.copy(get_cmd('install')) |
| 234 | if not install_cmd.finalized == 1: |
| 235 | install_cmd.finalize_options() |
| 236 | build_npkg = False |
| 237 | if self.inplace == 1: |
| 238 | top_prefix = '.' |
| 239 | build_npkg = True |
| 240 | elif hasattr(install_cmd, 'install_libbase'): |
| 241 | top_prefix = install_cmd.install_libbase |
| 242 | build_npkg = True |
| 243 | |
| 244 | if build_npkg: |
| 245 | for pkg, infos in self.distribution.installed_pkg_config.items(): |
| 246 | pkg_path = self.distribution.package_dir[pkg] |
| 247 | prefix = os.path.join(os.path.abspath(top_prefix), pkg_path) |
| 248 | d = {'prefix': prefix} |
| 249 | for info in infos: |
| 250 | install_dir, generated = self._build_npy_pkg_config(info, d) |
| 251 | self.distribution.data_files.append((install_dir, |
| 252 | [generated])) |
| 253 | |
| 254 | def build_py_modules_sources(self): |
| 255 | if not self.py_modules: |
no test coverage detected