-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathsetup.py
103 lines (79 loc) · 2.63 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
PACKAGE_NAME = 'ricloud'
class PyTest(TestCommand):
"""Allows for testing through setuptools. From the pytest docs:
https://docs.pytest.org/en/latest/goodpractices.html#manual-integration
"""
user_options = [("pytest-args=", "a", "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = '-n auto'
def run_tests(self):
import shlex
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
def markdown2rst(path):
try:
import pypandoc
return pypandoc.convert(path, 'rst', 'md')
except ImportError:
with open(path, 'r') as f:
return f.read()
test_requirements = [
'pytest>=3.4',
'pytest>=3.5,<5; python_version<"3.0"',
'pytest-mock>=1.7',
'pytest-xdist>=1.22',
'pytest-cov>=2.5',
'pytest-env>=0.6.2',
]
setup(
name=PACKAGE_NAME,
version='3.2.0',
description="Python client for Reincubate's ricloud API.",
long_description=markdown2rst('README.md'),
url='https://github.com/reincubate/ricloud',
author='Reincubate',
author_email='[email protected]',
license='AGPLv3',
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
install_requires=[
'requests>=2.0; python_version>="3.0"',
'requests[security]>=2; python_version<"3.0"',
'click<8.0',
],
tests_require=test_requirements,
extras_require={
'gs': ['google-cloud-storage>=1.13.2,<2'],
's3': ['boto3>=1.9.79,<2'],
'event': ['flask>=1.1.1,<2'],
'test': test_requirements,
},
cmdclass={'test': PyTest},
entry_points='''
[console_scripts]
ricloud=ricloud.cli:cli
''',
packages=[PACKAGE_NAME],
package_data={PACKAGE_NAME: [PACKAGE_NAME + '/*']},
include_package_data=True,
zip_safe=False,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Utilities'
],
)