-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·71 lines (61 loc) · 3.24 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from turnstile.version import version
class PyTest(TestCommand):
def initialize_options(self):
TestCommand.initialize_options(self)
self.cov = None
self.pytest_args = ['--cov', 'turnstile',
'--cov-report', 'term-missing',
'--doctest-modules', 'turnstile', 'tests']
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.pytest_args)
sys.exit(errno)
setup(
name='turnstile-core',
packages=find_packages(),
version=version,
description='Turnstile - Local Git Hooks',
author='João Santos',
url='https://github.com/jmcs/turnstile',
license='Apache License Version 2.0',
install_requires=['click', 'GitPython', 'pathlib', 'PyYAML', 'rfc3986', 'MapGitConfig', 'requests', 'pip',
'pyrsistent'],
tests_require=['pytest-cov', 'pytest', 'pytest-mock', ],
cmdclass={'test': PyTest},
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Topic :: Software Development :: Version Control',
],
long_description='Turnstile - Local Git Hooks',
entry_points={'console_scripts': ['turnstile = turnstile.manager:manager',
'zalando-turnstile-commit-msg = turnstile.commit_msg:commit_msg',
'zalando-turnstile-pre-commit = turnstile.pre_commit:pre_commit'
'turnstile-commit-msg = turnstile.commit_msg:commit_msg',
'turnstile-pre-commit = turnstile.pre_commit:pre_commit'],
'turnstile.commands': ['config = turnstile.manager_subcommands.config',
'install = turnstile.manager_subcommands.install',
'open-spec = turnstile.manager_subcommands.open_spec',
'remove = turnstile.manager_subcommands.remove',
'specification = turnstile.manager_subcommands.specification',
'upgrade = turnstile.manager_subcommands.upgrade',
'version = turnstile.manager_subcommands.version'],
'turnstile.commit_msg': ['branch_pattern = turnstile.checks.commit_msg.branch_pattern',
'branch_release = turnstile.checks.commit_msg.branch_release',
'branch_type = turnstile.checks.commit_msg.branch_type',
'protect_master = turnstile.checks.commit_msg.protect_master',
'specification = turnstile.checks.commit_msg.specification']}
)