-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
95 lines (81 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import os.path
import sys
from codecs import open
from datetime import datetime
from setuptools import setup, find_packages
minor_version = "0.0.2"
if sys.argv[-1] == "publish":
os.system("python setup.py sdist upload")
sys.exit()
VERSIONFILE = os.path.join(os.path.dirname(__file__), 'tubing/VERSION')
if os.path.exists(os.path.join(os.path.dirname(__file__), 'tubing/VERSION')):
with open(VERSIONFILE, "r", "utf-8") as f:
version = f.read().strip()
else:
if os.environ.get("TRAVIS_BRANCH") == "release":
revision = "r" + os.environ.get("TRAVIS_BUILD_NUMBER")
version = minor_version + revision
else:
date = datetime.now().strftime(".dev%Y%m%d%H%M%S")
revision = os.environ.get("REVISION", date)
version = minor_version + revision
with open(VERSIONFILE, "w", "utf-8") as f:
f.write(version)
with open("README.rst", "r", "utf-8") as f:
readme = f.read()
setup(
name="tubing",
version=version,
description="Python I/O pipe utilities",
long_description=readme,
author="Bob Corsaro",
author_email="[email protected]",
url="http://github.com/dokipen/tubing",
package_data={"": ["LICENSE"], "tubing": ["VERSION"]},
packages=find_packages(exclude='tests'),
include_package_data=True,
install_requires=[
"requests",
"urllib3",
],
license="MIT",
zip_safe=False,
classifiers=(
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
),
extras_require={
"build": [
"yapf",
"pyflakes",
"nose",
"unittest2",
"coveralls",
"boto3",
],
"s3": [
"boto3",
],
"elasticsearch": [],
"docs": [
"sphinx",
"sphinx_rtd_theme",
],
"ujson": [
"ujson",
],
},
)