forked from pjwerneck/pyrql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
44 lines (34 loc) · 786 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# -*- coding: utf-8 -*-
import os
import re
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'test':
try:
__import__('pytest')
except ImportError:
print('pytest required.')
sys.exit(1)
errors = os.system('pytest')
sys.exit(bool(errors))
with open('pyrql/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
packages = [
'pyrql'
]
install = [
'pyparsing',
'python-dateutil',
]
setup(
name='pyrql',
version=version,
description="RQL parsing",
packages=packages,
tests_require=['pytest'],
install_requires=install,
)