forked from tomchristie/webdriverplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·40 lines (33 loc) · 1.08 KB
/
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import re
import os
import sys
PACKAGE = 'webdriverplus'
base_dir = os.path.dirname(__file__)
module = os.path.join(base_dir, PACKAGE, '__init__.py')
version = eval(re.search('VERSION = (.*)', open(module).read()).group(1))
version_str = '%d.%d.%d' % (version[0], version[1], version[2])
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist upload")
print("You probably want to also tag the version now:")
print(" git tag -a %s -m 'version %s'" % (version, version))
print(" git push --tags")
sys.exit()
f = open('requirements.txt', 'r')
lines = f.readlines()
requirements = [l.strip().strip('\n') for l in lines if l.strip() and not l.strip().startswith('#')]
setup(
name=PACKAGE,
version=version_str,
url='http://webdriverplus.org',
license='BSD',
description='WebDriver Plus.',
author='Tom Christie',
packages=[PACKAGE],
package_dir={PACKAGE: PACKAGE},
include_package_data=True,
test_suite='runtests.main',
install_requires=requirements,
)