(self, filename)
| 76 | class VersionMixin: |
| 77 | |
| 78 | def _fix_version(self, filename): |
| 79 | # Replace asyncpg.__version__ with the actual version |
| 80 | # of the distribution (possibly inferred from git). |
| 81 | |
| 82 | with open(str(filename)) as f: |
| 83 | content = f.read() |
| 84 | |
| 85 | version_re = r"(.*__version__\s*=\s*)'[^']+'(.*)" |
| 86 | repl = r"\1'{}'\2".format(self.distribution.metadata.version) |
| 87 | content = re.sub(version_re, repl, content) |
| 88 | |
| 89 | with open(str(filename), 'w') as f: |
| 90 | f.write(content) |
| 91 | |
| 92 | |
| 93 | class sdist(setuptools_sdist.sdist, VersionMixin): |
no outgoing calls
no test coverage detected