Skip to content

Commit 6805f36

Browse files
committed
use setuptools for deployment, put version in __init__.py
1 parent 13baf0e commit 6805f36

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

pythonwhat/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
__version__ = '2.7.0'
2+
13
from .test_exercise import test_exercise, allow_errors
24

setup.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
#!/usr/bin/env python
22

3-
from distutils.core import setup
3+
import re
4+
import ast
5+
from setuptools import setup
6+
7+
_version_re = re.compile(r'__version__\s+=\s+(.*)')
8+
9+
with open('sqlwhat/__init__.py', 'rb') as f:
10+
version = str(ast.literal_eval(_version_re.search(
11+
f.read().decode('utf-8')).group(1)))
412

513
setup(
614
name='pythonwhat',
7-
version='2.7.0',
15+
version=version,
816
packages=['pythonwhat', 'pythonwhat.test_funcs'],
9-
install_requires=["dill", "IPython", "numpy", "pandas", "markdown2", "jinja2"]
10-
)
17+
install_requires=["dill", "IPython", "numpy", "pandas", "markdown2", "jinja2"],
18+
maintainer = 'Michael Chow',
19+
maintainer_email = 'michael@datacamp.com',
20+
url = 'https://github.com/datacamp/pythonwhat')

0 commit comments

Comments
 (0)