summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsetup.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/setup.py b/setup.py
index 6845d9e..bde020f 100755
--- a/setup.py
+++ b/setup.py
@@ -1,16 +1,14 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
+import re
+import ast
+from setuptools import setup
-import os
-import sys
-try:
- from setuptools import setup
-except ImportError:
- from distutils.core import setup
+_version_re = re.compile(r'__version__\s+=\s+(.*)')
-from dotfiles.core import __version__
+with open('dotfiles/core.py', 'rb') as f:
+ version = str(ast.literal_eval(_version_re.search(
+ f.read().decode('utf-8')).group(1)))
setup(name='dotfiles',
version=__version__,