forked from python-semantic-release/python-semantic-release
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
54 lines (46 loc) · 1.38 KB
/
setup.py
File metadata and controls
54 lines (46 loc) · 1.38 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
import re
from setuptools import find_packages, setup
import sys
def _read_long_description():
try:
with open('readme.rst') as fd:
return fd.read()
except Exception:
return None
with open('semantic_release/__init__.py', 'r') as fd:
version = re.search(
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(),
re.MULTILINE
).group(1)
with open('requirements/base.txt', 'r') as fd:
requirements = fd.read().strip().split('\n')
try:
from semantic_release import setup_hook
setup_hook(sys.argv)
except ImportError:
pass
setup(
name='python-semantic-release',
version=version,
url='http://github.com/relekang/python-semantic-release',
author='Rolf Erik Lekang',
author_email='me@rolflekang.com',
description='Automatic semantic versioning for python projects',
long_description=_read_long_description(),
packages=find_packages(exclude='tests'),
license='MIT',
install_requires=requirements,
entry_points='''
[console_scripts]
semantic-release=semantic_release.cli:main
''',
include_package_data=True,
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
]
)