This repository was archived by the owner on Sep 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
65 lines (55 loc) · 1.64 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
import sys
import os
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
here = os.path.abspath(os.path.dirname(__file__))
__version__ = None
with open(os.path.join(here, 'optimizely_cli', 'version.py')) as _file:
exec(_file.read())
requirements = [
'click==6.7',
'requests[security]>=2.9.1',
'findup==0.3.0',
'six==1.11.0',
'bravado==9.2.0',
]
test_requirements = requirements + [
'flake8==3.5.0',
'pytest==3.5.0',
]
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ''
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)
setup(
name='optimizely-cli',
version=__version__,
description='A command-line interface for Optimizely Projects',
long_description=open('README.rst').read(),
long_description_content_type='text/x-rst',
author='Optimizely',
author_email='developers@optimizely.com',
url='https://github.com/optimizely/optimizely-cli',
license=open('LICENSE').read(),
py_modules=['opti'],
packages=find_packages(exclude=['tests']),
include_package_data=True,
zip_safe=True,
install_requires=requirements,
tests_require=test_requirements,
cmdclass={
# Pulled from py.test docs.
'test': PyTest,
},
entry_points='''
[console_scripts]
opti = optimizely_cli:cli
''',
)