-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.py
More file actions
79 lines (65 loc) · 2.2 KB
/
setup.py
File metadata and controls
79 lines (65 loc) · 2.2 KB
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
#!/usr/bin/env python
import os
import sys
import json
from setuptools.command.test import test as TestCommand
from setuptools import find_packages
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
readme = '\n' + open('README.rst').read()
with open(os.path.join('gerritssh', 'METADATA'), 'rt') as f:
pkg_metadata = json.load(f)
doclink = """
Documentation
-------------
The full documentation is at http://gerritssh.rtfd.org."""
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
setup(
name='gerritssh',
version=pkg_metadata['version'],
description='Python package wrapping the Gerrit command line API',
long_description=readme + '\n\n' + doclink + '\n\n' + history,
author=pkg_metadata['author'],
author_email=pkg_metadata['email'],
url='https://github.com/kdopen/gerritssh',
packages=find_packages(exclude=['test']),
package_dir={'gerritssh': 'gerritssh'},
include_package_data=True,
install_requires=['paramiko>=1.13,<2',
'semantic-version>=2.3,<3'
],
license='Apache',
zip_safe=False,
keywords='gerritssh',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
tests_require=['pytest>=2.3.5'],
cmdclass={'test': PyTest},
scripts=['gsshcli.py'],
)