| Conditions | 2 |
| Total Lines | 5 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import os |
||
| 5 | def get_version(version_file='_version.py'): |
||
| 6 | """Retrieve the package version from a version file in the package root.""" |
||
| 7 | filename = os.path.join(os.path.dirname(__file__), 'dirutility', version_file) |
||
| 8 | with open(filename, 'rb') as fp: |
||
| 9 | return fp.read().decode('utf8').split('=')[1].strip(" \n'") |
||
| 10 | |||
| 28 |