-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsetup.py
55 lines (43 loc) · 1.39 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from setuptools import setup, Command
import codecs
import re
import os
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
return codecs.open(os.path.join(here, *parts), 'r').read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
errno = subprocess.call(['py.test'])
raise SystemExit(errno)
setup(name='testcloud',
version=find_version('testcloud', '__init__.py'),
description="small helper script to download and "
"boot cloud images locally",
author="Mike Ruckman",
author_email="[email protected]",
license="GPLv2+",
url="https://github.com/Rorosha/testcloud",
packages=["testcloud"],
package_dir={"testcloud": "testcloud"},
include_package_data=True,
cmdclass={'test': PyTest},
entry_points=dict(console_scripts=["testcloud=testcloud.cli:main"]),
install_requires=[
'Jinja2',
'libvirt-python',
'requests',
],
)