Skip to content
This repository was archived by the owner on Nov 3, 2019. It is now read-only.

Commit 1775f1b

Browse files
committed
1.2.2 Release
1 parent 85d782a commit 1775f1b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

setup.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
import os
22
from setuptools import setup
33

4+
VERSION = (1, 2)
5+
46

57
def read(name):
68
with open(os.path.join(os.path.dirname(__file__), name)) as f:
79
return f.read()
810

911

12+
def get_version_number():
13+
parts = []
14+
for v in VERSION:
15+
parts.append(str(v))
16+
if "TRAVIS_JOB_NUMBER" in os.environ:
17+
job_number = os.environ["TRAVIS_JOB_NUMBER"]
18+
parts.append(str(job_number).split(".")[0])
19+
return ".".join(parts)
20+
21+
1022
setup(
1123
name='CallerLookup',
1224
description='Reverse Caller Identity',
@@ -15,7 +27,7 @@ def read(name):
1527
author='Scott Philip',
1628
author_email='[email protected]',
1729
packages=['CallerLookup'],
18-
version='1.2.3',
30+
version=get_version_number(),
1931
install_requires=read('REQUIREMENTS.txt').splitlines(),
2032
test_suite='nose.collector',
2133
tests_require=['nose'],

0 commit comments

Comments
 (0)