diff options
author | Kenn Knowles <kenn.knowles@gmail.com> | 2013-12-18 10:55:20 -0500 |
---|---|---|
committer | Kenn Knowles <kenn.knowles@gmail.com> | 2013-12-18 10:55:20 -0500 |
commit | 3364ec96a6b0132be6ac36615192eed275b66afc (patch) | |
tree | 84f29202294aa24662d56216c256ea8e9fd9b0ee | |
parent | 25db9bd0de73d895893ef8dac7e78209574aa890 (diff) | |
download | jsonpath-rw-3364ec96a6b0132be6ac36615192eed275b66afc.tar.gz |
Remove automatic versioning
-rw-r--r-- | jsonpath_rw/__init__.py | 3 | ||||
-rw-r--r-- | jsonpath_rw/version.py | 24 | ||||
-rw-r--r-- | setup.py | 26 |
3 files changed, 3 insertions, 50 deletions
diff --git a/jsonpath_rw/__init__.py b/jsonpath_rw/__init__.py index 5666efb..173ed7e 100644 --- a/jsonpath_rw/__init__.py +++ b/jsonpath_rw/__init__.py @@ -1,3 +1,4 @@ from .jsonpath import * from .parser import parse -from .version import __version__ + +__version__ = '1.2.3a1' diff --git a/jsonpath_rw/version.py b/jsonpath_rw/version.py deleted file mode 100644 index 9d9e891..0000000 --- a/jsonpath_rw/version.py +++ /dev/null @@ -1,24 +0,0 @@ -from __future__ import print_function, unicode_literals -import io -import subprocess -import os.path - -__all__ = ['__version__', 'stored_version', 'git_version'] - -VERSION_PATH = os.path.join(os.path.dirname(__file__), 'VERSION') - -def stored_version(): - if os.path.exists(VERSION_PATH): - with io.open(VERSION_PATH, encoding='ascii') as fh: - return fh.read().strip() - else: - return None - -def git_version(): - described_version_bytes = subprocess.Popen(['git', 'describe'], stdout=subprocess.PIPE).communicate()[0].strip() - return described_version_bytes.decode('ascii') - -__version__ = stored_version() or git_version() - -if __name__ == '__main__': - print(__version__) @@ -4,32 +4,9 @@ import sys import os.path import subprocess -VERSION_PATH='jsonpath_rw/VERSION' - -# Ensure that the VERSION file is shipped with the distribution -if 'sdist' in sys.argv: - import jsonpath_rw.version - with io.open(VERSION_PATH, 'w', encoding='ascii') as fh: - fh.write(jsonpath_rw.version.git_version()) - -# This requires either jsonpath_rw/VERSION or to be in a git clone (as does the package in general) -# This is identical to code in jsonpath_rw.version. It would be nice to re-use but importing requires all deps -def stored_version(): - if os.path.exists(VERSION_PATH): - with io.open(VERSION_PATH, encoding='ascii') as fh: - return fh.read().strip() - else: - return None - -def git_version(): - described_version_bytes = subprocess.Popen(['git', 'describe'], stdout=subprocess.PIPE).communicate()[0].strip() - return described_version_bytes.decode('ascii') - -version = stored_version() or git_version() - setuptools.setup( name='jsonpath-rw', - version=version, + version='1.2.3a1', description='A robust and significantly extended implementation of JSONPath for Python, with a clear AST for metaprogramming.', author='Kenneth Knowles', author_email='kenn.knowles@gmail.com', @@ -37,7 +14,6 @@ setuptools.setup( license='Apache 2.0', long_description=io.open('README.rst', encoding='utf-8').read(), packages = ['jsonpath_rw'], - package_data = {'': ['VERSION']}, test_suite = 'tests', install_requires = [ 'ply', 'decorator', 'six' ], classifiers = [ |