Skip to content

Commit ef8aac0

Browse files
committed
Don't import boxsdk from setup.py.
1 parent c601a61 commit ef8aac0

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

HISTORY.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Upcoming
77
++++++++
88

99

10-
1.5.0 (2016-02-26)
10+
1.5.0 (2016-03-02)
1111
++++++++++++++++++
1212

1313
- Added a new class, ``LoggingClient``. It's a ``Client`` that uses the ``LoggingNetwork`` class so that

boxsdk/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ class API(object):
1313

1414
class Version(object):
1515
"""Configuration object containing the package version and user agent string."""
16-
VERSION = '1.4.3'
16+
VERSION = '1.5.0'
1717
USER_AGENT_STRING = 'box-python-sdk-{0}'.format(VERSION)

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
from codecs import open # pylint:disable=redefined-builtin
66
from collections import defaultdict
77
from os.path import dirname, join
8+
import re
89
import sys
910

1011
from setuptools import setup, find_packages
1112
from setuptools.command.test import test as TestCommand
1213

13-
from boxsdk.config import Version
14-
1514

1615
CLASSIFIERS = [
1716
'Development Status :: 5 - Production/Stable',
@@ -82,9 +81,11 @@ def main():
8281
python_conditional = 'python_version=="{0}"'.format(python_version)
8382
key = ':{0}'.format(python_conditional)
8483
extra_requires[key].append(requirement)
84+
with open('boxsdk/config.py', 'r', 'utf-8') as config_py:
85+
version = re.search(r'^\s+VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', config_py.read(), re.MULTILINE).group(1)
8586
setup(
8687
name='boxsdk',
87-
version=Version.VERSION,
88+
version=version,
8889
description='Official Box Python SDK',
8990
long_description=open(join(base_dir, 'README.rst'), encoding='utf-8').read(),
9091
author='Box',

0 commit comments

Comments
 (0)