(rel_path)
| 85 | def get_version(rel_path): |
| 86 | """Read version from a file via text parsing, following PyPA guide.""" |
| 87 | def read(rel_path): |
| 88 | here = os.path.abspath(os.path.dirname(__file__)) |
| 89 | with codecs.open(os.path.join(here, rel_path), "r") as fp: |
| 90 | return fp.read() |
| 91 | for line in read(rel_path).splitlines(): |
| 92 | if line.startswith("__version__"): |
| 93 | delim = '"' if '"' in line else "'" |