Created
May 12, 2017 02:42
-
-
Save chen0040/c0c04de745b76ac7a36e3a5a7ad3e5e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import ast | |
import io | |
_version_re = re.compile(r'__version__\s+=\s+(.*)') | |
package_name = 'pyalgs' | |
with open(package_name + '/__init__.py', 'rb') as f: | |
version = str(ast.literal_eval(_version_re.search( | |
f.read().decode('utf-8')).group(1))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment