Skip to content

Commit 4908bc1

Browse files
committed
Centralized version definition to dropbox.dropbox.
1 parent da0f628 commit 4908bc1

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

docs/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
# that may be in the sys.path.
2121
sys.path.insert(0, os.path.abspath('..'))
2222

23+
import dropbox
24+
2325
# If extensions (or modules to document with autodoc) are in another directory,
2426
# add these directories to sys.path here. If the directory is relative to the
2527
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -59,9 +61,9 @@
5961
# built documents.
6062
#
6163
# The short X.Y version.
62-
version = '6.2'
64+
version = dropbox.__version__
6365
# The full version, including alpha/beta/rc tags.
64-
release = '6.2'
66+
release = dropbox.__version__
6567

6668
# The language for content autogenerated by Sphinx. Refer to documentation
6769
# for a list of supported languages.

dropbox/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import absolute_import
22

3-
from .dropbox import __version__
4-
from .dropbox import Dropbox, DropboxTeam, create_session
3+
from .dropbox import __version__, Dropbox, DropboxTeam, create_session
54
from .oauth import DropboxOAuth2Flow, DropboxOAuth2FlowNoRedirect
65

76
# Compatibility with the deprecated v1 client.

dropbox/dropbox.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
'create_session',
55
]
66

7-
# TODO(kelkabany): We need to auto populate this as done in the v1 SDK.
8-
__version__ = '6.2'
7+
__version__ = '6.3.0'
98

109
import contextlib
1110
import json

dropbox/rest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
else:
3232
url_encode = urllib.urlencode
3333

34-
SDK_VERSION = "6.2"
34+
from dropbox import __version__
35+
36+
SDK_VERSION = __version__
3537

3638
TRUSTED_CERT_FILE = pkg_resources.resource_filename(__name__, 'trusted-certs.crt')
3739

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
from setuptools import setup
1717

18+
from dropbox import __version__
19+
1820
install_reqs = ['urllib3',
1921
'requests>=2.5.1',
2022
'six>=1.3.0']
@@ -25,7 +27,7 @@
2527

2628
dist = setup(
2729
name='dropbox',
28-
version='6.2',
30+
version=__version__,
2931
description='Official Dropbox API Client',
3032
author='Dropbox',
3133
author_email='dev-platform@dropbox.com',

update_version.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
if [ -z $1 ]; then echo "error: $0 needs a version number as argument."; fi
3+
sed -i "s/^__version__.*/__version__ = '$1'/g" dropbox/dropbox.py

0 commit comments

Comments
 (0)