-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from edx/aht/BOM-STANDARDIZE-VERSION-NUMBER-P…
…LACEMENT Standardize version number placement
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
""" | ||
from .lti_xblock import LtiConsumerXBlock | ||
from .apps import LTIConsumerApp | ||
|
||
__version__ = '3.1.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,9 +91,26 @@ def is_requirement(line): | |
with open('README.rst') as _f: | ||
long_description = _f.read() | ||
|
||
|
||
def get_version(file_path): | ||
""" | ||
Extract the version string from the file at the given relative path fragments. | ||
""" | ||
filename = os.path.join(os.path.dirname(__file__), file_path) | ||
with open(filename, encoding='utf-8') as opened_file: | ||
version_file = opened_file.read() | ||
version_match = re.search(r"(?m)^__version__ = ['\"]([^'\"]+)['\"]", version_file) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError('Unable to find version string.') | ||
|
||
|
||
VERSION = get_version("lti_consumer/__init__.py") | ||
|
||
|
||
setup( | ||
name='lti-consumer-xblock', | ||
version='3.1.0', | ||
version=VERSION, | ||
author='Open edX project', | ||
author_email='[email protected]', | ||
description='This XBlock implements the consumer side of the LTI specification.', | ||
|