-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
72 lines (57 loc) · 1.82 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import codecs
import os
import re
from setuptools import Command, setup
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(["pytest-3"])
raise SystemExit(errno)
with open("README.md") as f:
long_description_readme = f.read()
setup(
name="testcloud",
version=find_version("testcloud", "__init__.py"),
description="A tool to download and boot cloud images locally, with an easy to use API.",
long_description=long_description_readme,
long_description_content_type="text/markdown",
author="Mike Ruckman",
author_email="[email protected]",
license="GPLv2+",
url="https://pagure.io/testcloud",
packages=["testcloud", "testcloud.distro_utils"],
package_dir={"testcloud": "testcloud"},
include_package_data=True,
cmdclass={"test": PyTest},
entry_points=dict(
console_scripts=[
"testcloud=testcloud.cli:main",
"t7d=testcloud.cli:main",
]
),
data_files=[
("share/man/man1", ["manpages/testcloud.1"]),
("share/bash-completion/completions", ["conf/testcloud"]),
],
install_requires=[
"libvirt-python",
"peewee",
"requests",
"packaging",
],
extras_require={"image_resolve_caching": ["requests_cache>=1.2"]},
)