Otherwise the package is installed from PyPI without deps and doesn't
work.
Also add missing deps on mock and Jinja2.
roshi |
testcloud |
Otherwise the package is installed from PyPI without deps and doesn't
work.
Also add missing deps on mock and Jinja2.
tried with python setup.py develop, seems to install the deps
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | .gitignore (1 line) | |||
M | requirements.txt (2 lines) | |||
M | setup.py (9 lines) |
Commit | Tree | Parents | Author | Summary | Date |
---|---|---|---|---|---|
1b82230d5af4 | 504ec3323b99 | 0e3ac634518c | Kamil Páral | setup: specify package deps (Show More…) | May 19 2017, 11:21 AM |
Show All 13 Lines | |||||
14 | /*.rpm | 14 | /*.rpm | ||
15 | /docs/build/ | 15 | /docs/build/ | ||
16 | 16 | | |||
17 | # virtualenv | 17 | # virtualenv | ||
18 | /env_*/ | 18 | /env_*/ | ||
19 | 19 | | |||
20 | # unit testing | 20 | # unit testing | ||
21 | /.coverage | 21 | /.coverage | ||
22 | /.cache |
1 | # This is a list of pypi packages to be installed into virtualenv. Alternatively, | 1 | # This is a list of pypi packages to be installed into virtualenv. Alternatively, | ||
---|---|---|---|---|---|
2 | # you can install these as RPMs instead of pypi packages. See README. | 2 | # you can install these as RPMs instead of pypi packages. See README. | ||
3 | 3 | | |||
4 | Jinja2 | ||||
4 | libvirt-python | 5 | libvirt-python | ||
5 | requests | 6 | requests | ||
6 | 7 | | |||
7 | # Test suite requirements | 8 | # Test suite requirements | ||
9 | mock | ||||
8 | pytest | 10 | pytest | ||
9 | pytest-cov | 11 | pytest-cov |
1 | from setuptools import setup, Command | 1 | from setuptools import setup, Command | ||
---|---|---|---|---|---|
2 | import codecs | 2 | import codecs | ||
3 | import re | 3 | import re | ||
4 | import os | 4 | import os | ||
5 | 5 | | |||
6 | here = os.path.abspath(os.path.dirname(__file__)) | 6 | here = os.path.abspath(os.path.dirname(__file__)) | ||
7 | 7 | | |||
8 | | ||||
8 | def read(*parts): | 9 | def read(*parts): | ||
9 | return codecs.open(os.path.join(here, *parts), 'r').read() | 10 | return codecs.open(os.path.join(here, *parts), 'r').read() | ||
10 | 11 | | |||
11 | 12 | | |||
12 | def find_version(*file_paths): | 13 | def find_version(*file_paths): | ||
13 | version_file = read(*file_paths) | 14 | version_file = read(*file_paths) | ||
14 | version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | 15 | version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
15 | version_file, re.M) | 16 | version_file, re.M) | ||
16 | if version_match: | 17 | if version_match: | ||
17 | return version_match.group(1) | 18 | return version_match.group(1) | ||
18 | raise RuntimeError("Unable to find version string.") | 19 | raise RuntimeError("Unable to find version string.") | ||
19 | 20 | | |||
20 | 21 | | |||
21 | class PyTest(Command): | 22 | class PyTest(Command): | ||
22 | user_options = [] | 23 | user_options = [] | ||
24 | | ||||
23 | def initialize_options(self): | 25 | def initialize_options(self): | ||
24 | pass | 26 | pass | ||
27 | | ||||
25 | def finalize_options(self): | 28 | def finalize_options(self): | ||
26 | pass | 29 | pass | ||
30 | | ||||
27 | def run(self): | 31 | def run(self): | ||
28 | import subprocess | 32 | import subprocess | ||
29 | errno = subprocess.call(['py.test']) | 33 | errno = subprocess.call(['py.test']) | ||
30 | raise SystemExit(errno) | 34 | raise SystemExit(errno) | ||
31 | 35 | | |||
32 | 36 | | |||
33 | setup(name='testcloud', | 37 | setup(name='testcloud', | ||
34 | version=find_version('testcloud', '__init__.py'), | 38 | version=find_version('testcloud', '__init__.py'), | ||
35 | description="small helper script to download and " | 39 | description="small helper script to download and " | ||
36 | "boot cloud images locally", | 40 | "boot cloud images locally", | ||
37 | author="Mike Ruckman", | 41 | author="Mike Ruckman", | ||
38 | author_email="roshi@fedoraproject.org", | 42 | author_email="roshi@fedoraproject.org", | ||
39 | license="GPLv2+", | 43 | license="GPLv2+", | ||
40 | url="https://github.com/Rorosha/testcloud", | 44 | url="https://github.com/Rorosha/testcloud", | ||
41 | packages=["testcloud"], | 45 | packages=["testcloud"], | ||
42 | package_dir={"testcloud": "testcloud"}, | 46 | package_dir={"testcloud": "testcloud"}, | ||
43 | include_package_data=True, | 47 | include_package_data=True, | ||
44 | cmdclass={'test': PyTest}, | 48 | cmdclass={'test': PyTest}, | ||
45 | entry_points=dict(console_scripts=["testcloud=testcloud.cli:main"]), | 49 | entry_points=dict(console_scripts=["testcloud=testcloud.cli:main"]), | ||
50 | install_requires=[ | ||||
51 | 'Jinja2', | ||||
52 | 'libvirt-python', | ||||
53 | 'requests', | ||||
54 | ], | ||||
46 | ) | 55 | ) |