(self)
| 1823 | |
| 1824 | class cmd_build_py(_build_py): |
| 1825 | def run(self): |
| 1826 | root = get_root() |
| 1827 | cfg = get_config_from_root(root) |
| 1828 | versions = get_versions() |
| 1829 | _build_py.run(self) |
| 1830 | if getattr(self, "editable_mode", False): |
| 1831 | # During editable installs `.py` and data files are |
| 1832 | # not copied to build_lib |
| 1833 | return |
| 1834 | # now locate _version.py in the new build/ directory and replace |
| 1835 | # it with an updated value |
| 1836 | if cfg.versionfile_build: |
| 1837 | target_versionfile = os.path.join(self.build_lib, |
| 1838 | cfg.versionfile_build) |
| 1839 | print("UPDATING %s" % target_versionfile) |
| 1840 | write_to_version_file(target_versionfile, versions) |
| 1841 | cmds["build_py"] = cmd_build_py |
| 1842 | |
| 1843 | if 'build_ext' in cmds: |
nothing calls this directly
no test coverage detected