(self)
| 1841 | |
| 1842 | class cmd_build_py(_build_py): |
| 1843 | def run(self): |
| 1844 | root = get_root() |
| 1845 | cfg = get_config_from_root(root) |
| 1846 | versions = get_versions() |
| 1847 | _build_py.run(self) |
| 1848 | if getattr(self, "editable_mode", False): |
| 1849 | # During editable installs `.py` and data files are |
| 1850 | # not copied to build_lib |
| 1851 | return |
| 1852 | # now locate _version.py in the new build/ directory and replace |
| 1853 | # it with an updated value |
| 1854 | if cfg.versionfile_build: |
| 1855 | target_versionfile = os.path.join(self.build_lib, cfg.versionfile_build) |
| 1856 | print("UPDATING %s" % target_versionfile) |
| 1857 | write_to_version_file(target_versionfile, versions) |
| 1858 | |
| 1859 | cmds["build_py"] = cmd_build_py |
| 1860 |
nothing calls this directly
no test coverage detected