1
|
|
|
# Copyright (c) 2015 Fabian Kochem |
2
|
|
|
|
3
|
|
|
|
4
|
|
|
try: |
5
|
|
|
from setuptools import setup, find_packages, Command |
6
|
|
|
except ImportError: |
7
|
|
|
from ez_setup import use_setuptools |
8
|
|
|
use_setuptools() |
9
|
|
|
from setuptools import setup, find_packages, Command |
10
|
|
|
|
11
|
|
|
import platform |
12
|
|
|
import os |
13
|
|
|
import subprocess |
14
|
|
|
import sys |
15
|
|
|
|
16
|
|
|
from setuptools.command.test import test as TestCommand |
17
|
|
|
|
18
|
|
|
|
19
|
|
|
class PyTest(TestCommand): |
20
|
|
|
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] |
21
|
|
|
|
22
|
|
|
def initialize_options(self): |
23
|
|
|
TestCommand.initialize_options(self) |
24
|
|
|
self.pytest_args = [] |
25
|
|
|
|
26
|
|
|
def finalize_options(self): |
27
|
|
|
TestCommand.finalize_options(self) |
28
|
|
|
self.test_args = [] |
29
|
|
|
self.test_suite = True |
30
|
|
|
|
31
|
|
|
def run_tests(self): |
32
|
|
|
# import here, cause outside the eggs aren't loaded |
33
|
|
|
import pytest |
34
|
|
|
errno = pytest.main(self.pytest_args) |
35
|
|
|
sys.exit(errno) |
36
|
|
|
|
37
|
|
|
setup( |
38
|
|
|
name='hug_store_redis', |
39
|
|
|
version='0.0.1', |
40
|
|
|
author='Fabian Kochem', |
41
|
|
|
author_email='[email protected]', |
42
|
|
|
description='Redis Store extension for hug', |
43
|
|
|
url='https://github.com/vortec/hug_store_redis', |
44
|
|
|
|
45
|
|
|
# Dependencies |
46
|
|
|
install_requires=[ |
47
|
|
|
'hug', |
48
|
|
|
'redis==2.10.5' |
49
|
|
|
], |
50
|
|
|
tests_require=[ |
51
|
|
|
'pytest==2.9.0' |
52
|
|
|
], |
53
|
|
|
|
54
|
|
|
cmdclass={ |
55
|
|
|
'test': PyTest |
56
|
|
|
}, |
57
|
|
|
entry_points={}, |
58
|
|
|
packages=find_packages(), |
59
|
|
|
zip_safe=False, |
60
|
|
|
include_package_data=True, |
61
|
|
|
|
62
|
|
|
classifiers=[ |
63
|
|
|
'Development Status :: 3 - Alpha', |
64
|
|
|
'Intended Audience :: Developers', |
65
|
|
|
'License :: OSI Approved :: MIT License', |
66
|
|
|
'Operating System :: OS Independent', |
67
|
|
|
'Programming Language :: Python', |
68
|
|
|
'Programming Language :: Python :: 3', |
69
|
|
|
'Topic :: Database', |
70
|
|
|
'Topic :: Software Development :: Libraries' |
71
|
|
|
], |
72
|
|
|
) |
73
|
|
|
|