This repository was archived by the owner on Oct 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
62 lines (51 loc) · 1.99 KB
/
setup.py
File metadata and controls
62 lines (51 loc) · 1.99 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
import codecs
import io
import re
from os.path import abspath, dirname, join
from setuptools import find_packages, setup
MODULE_NAME = 'SlackLogger'
CWD = abspath(dirname(__file__))
def read(*names, **kwargs):
with io.open(join(dirname(__file__), *names), encoding=kwargs.get("encoding", "utf8")) as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^VERSION = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
VERSION = find_version(join(CWD, MODULE_NAME), "version.py")
with codecs.open(join(CWD, 'README.rst'), encoding='utf-8') as reader:
LONG_DESCRIPTION = reader.read()
setup(
name='logging-slackhandler',
version=VERSION,
description='A logging handler for Slack',
long_description=LONG_DESCRIPTION,
url='https://github.com/Greums/logging-slackhandler',
download_url='https://github.com/Greums/logging-slackhandler/tarball/%s' % VERSION,
author='Damien Le Bourdonnec',
author_email='greumsworkshop@gmail.com',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Communications :: Chat',
'Topic :: System :: Logging',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
keywords='logging slack',
platforms='any',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
install_requires=[],
include_package_data=True,
zip_safe=False
)