forked from charleso/git-cc
-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
46 lines (39 loc) · 1.21 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
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup, find_packages
# The following approach to retrieve the version number is inspired by this
# comment:
#
# https://github.com/zestsoftware/zest.releaser/issues/37#issuecomment-14496733
#
# With this approach, development installs always show the right version number
# and do not require a reinstall (as the definition of the version number in
# this setup file would).
version = 'no version defined'
current_dir = os.path.dirname(__file__)
with open(os.path.join(current_dir, "git_cc", "__init__.py")) as f:
rx = re.compile("__version__ = '(.*)'")
for line in f:
m = rx.match(line)
if m:
version = m.group(1)
with open('README.md') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='git_cc',
version=version,
description='Provides a bridge between git and ClearCase',
long_description=readme,
author="Charles O'Farrel and others",
url='https://github.com/charleso/git-cc',
license=license,
packages=find_packages(exclude=('tests', 'docs')),
entry_points={
'console_scripts': [
'gitcc=git_cc.gitcc:main',
],
},
)