This repository has been archived by the owner on Jan 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
62 lines (46 loc) · 1.42 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
#!/usr/bin/env python
# coding=utf-8
"""
Setup script for git-doctor.
https://github.com/jhauberg/gitdoctor
Copyright 2018 Jacob Hauberg Hansen.
License: MIT (see LICENSE)
"""
import sys
import re
from setuptools import setup, find_packages
from doctor import VERSION_PATTERN, exit_if_not_compatible
exit_if_not_compatible()
def determine_version_or_exit() -> str:
""" Determine version identifier or exit with non-zero status. """
with open('doctor/__version__.py') as file:
version_contents = file.read()
version_match = re.search(VERSION_PATTERN, version_contents, re.M)
if version_match:
version = version_match.group(1)
return version
sys.exit('Version not found')
VERSION = determine_version_or_exit()
setup(
name='git-doctor',
version=VERSION,
description='Keep a healthy repository',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://github.com/jhauberg/gitdoctor',
download_url='https://github.com/jhauberg/gitdoctor/archive/master.zip',
author='Jacob Hauberg Hansen',
author_email='jacob.hauberg@gmail.com',
license='MIT',
packages=find_packages(),
include_package_data=True,
platforms='any',
install_requires=[
'docopt==0.6.2'
],
entry_points={
'console_scripts': [
'git-doctor=doctor.__main__:main',
],
}
)