forked from lionheart/python-onfleet
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
78 lines (65 loc) · 2.46 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env/python
# -*- coding: utf-8 -*-
import unittest
import io
import os
from distutils.cmd import Command
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with io.open(os.path.join(os.path.dirname(__file__), "README.rst"), encoding='utf-8') as file:
long_description = file.read()
id_regex = re.compile(r"<\#([\w-]+)>")
link_regex = re.compile(r"<(\w+)>")
link_alternate_regex = re.compile(r" :target: (\w+)")
long_description = id_regex.sub(r"<https://github.com/lionheart/python-onfleet#\1>", long_description)
long_description = link_regex.sub(r"<https://github.com/lionheart/python-onfleet/blob/master/\1>", long_description)
long_description = link_regex.sub(r"<https://github.com/lionheart/python-onfleet/blob/master/\1>", long_description)
long_description = link_alternate_regex.sub(r" :target: https://github.com/lionheart/python-onfleet/blob/master/\1", long_description)
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries",
"Topic :: Utilities",
"License :: OSI Approved :: Apache Software License",
]
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from test_onfleet import TestOnfleetAPI
suite = unittest.TestLoader().loadTestsFromTestCase(TestOnfleetAPI)
unittest.TextTestRunner(verbosity=2).run(suite)
__version__ = "0.0.1"
__author__ = "Dan Loewenherz"
__copyright__ = "Copyright 2015, Lionheart Software"
__maintainer__ = "Dan Loewenherz"
__email__ = "[email protected]"
__license__ = "Apache 2.0"
setup(
author=__author__,
author_email=__email__,
classifiers=classifiers,
cmdclass={'test': TestCommand},
description="A Python wrapper for Onfleet",
install_requires=["requests"],
keywords="onfleet",
license=__license__,
long_description=long_description,
name='onfleet',
package_data={'': ['LICENSE', 'README.rst']},
include_package_data=True,
packages=['onfleet'],
url="http://github.com/lionheart/python-onfleet",
version=__version__,
)