Skip to content

Commit f1ec1b0

Browse files
committed
setup python package
1 parent 0f6ead0 commit f1ec1b0

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

intercomic/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
__all__ = ['IntercomApp']
66

7+
__version__ = '0.1.1'
8+
79

810
class IntercomAuth(AuthBase):
911
def __init__(self, token):

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.md

setup.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import re
2+
from os import path
3+
from setuptools import setup
4+
5+
6+
def read(*parts):
7+
filename = path.join(path.dirname(__file__), *parts)
8+
with open(filename) as fp:
9+
return fp.read()
10+
11+
12+
def find_version(*file_paths):
13+
version_file = read(*file_paths)
14+
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
15+
version_file, re.M)
16+
if version_match:
17+
return version_match.group(1)
18+
raise RuntimeError("Unable to find version string.")
19+
20+
21+
DESCRIPTION = "Tiny REST API Client for intercom.io"
22+
23+
LONG_DESCRIPTION = None
24+
try:
25+
LONG_DESCRIPTION = open('README.md').read()
26+
except:
27+
pass
28+
29+
CLASSIFIERS = [
30+
'Development Status :: 4 - Beta',
31+
'Intended Audience :: Developers',
32+
'License :: OSI Approved :: MIT License',
33+
'Operating System :: OS Independent',
34+
'Programming Language :: Python',
35+
'Programming Language :: Python :: 3.5',
36+
'Programming Language :: Python :: 3.6',
37+
'Topic :: Software Development :: Libraries :: Python Modules',
38+
]
39+
40+
setup(
41+
name='intercomic',
42+
version=find_version("intercomic", "__init__.py"),
43+
description=DESCRIPTION,
44+
long_description=LONG_DESCRIPTION,
45+
classifiers=CLASSIFIERS,
46+
keywords="intercom, api",
47+
author='Dmitrii Gerasimenko',
48+
author_email='[email protected]',
49+
url='http://github.com/kidig/intercomic',
50+
license='MIT',
51+
packages=['intercomic'],
52+
install_requires=[
53+
"requests"
54+
],
55+
include_package_data=True,
56+
zip_safe=False,
57+
)

0 commit comments

Comments
 (0)