8000 Remove automatic versioning · lina1/python-jsonpath-rw@3364ec9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3364ec9

Browse files
committed
Remove automatic versioning
1 parent 25db9bd commit 3364ec9

File tree

3 files changed

+3
-50
lines changed

3 files changed

+3
-50
lines changed

jsonpath_rw/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
from .jsonpath import *
22
from .parser import parse
3-
from .version import __version__
3+
4+
__version__ = '1.2.3a1'

jsonpath_rw/version.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,16 @@
44
import os.path
55
import subprocess
66

7-
VERSION_PATH='jsonpath_rw/VERSION'
8-
9-
# Ensure that the VERSION file is shipped with the distribution
10-
if 'sdist' in sys.argv:
11-
import jsonpath_rw.version
12-
with io.open(VERSION_PATH, 'w', encoding='ascii') as fh:
13-
fh.write(jsonpath_rw.version.git_version())
14-
15-
# This requires either jsonpath_rw/VERSION or to be in a git clone (as does the package in general)
16-
# This is identical to code in jsonpath_rw.version. It would be nice to re-use but importing requires all deps
17-
def stored_version():
18-
if os.path.exists(VERSION_PATH):
19-
with io.open(VERSION_PATH, encoding='ascii') as fh:
20-
return fh.read().strip()
21-
else:
22-
return None
23-
24-
def git_version():
25-
described_version_bytes = subprocess.Popen(['git', 'describe'], stdout=subprocess.PIPE).communicate()[0].strip()
26-
return described_version_bytes.decode('ascii')
27-
28-
version = stored_version() or git_version()
29-
307
setuptools.setup(
318
name='jsonpath-rw',
32-
version=version,
9+
version='1.2.3a1',
3310
description='A robust and significantly extended implementation of JSONPath for Python, with a clear AST for metaprogramming.',
3411
author='Kenneth Knowles',
3512
author_email='kenn.knowles@gmail.com',
3613
url='https://github.com/kennknowles/python-jsonpath-rw',
3714
license='Apache 2.0',
3815
long_description=io.open('README.rst', encoding='utf-8').read(),
3916
packages = ['jsonpath_rw'],
40-
package_data = {'': ['VERSION']},
4117
test_suite = 'tests',
4218
install_requires = [ 'ply', 'decorator', 'six' ],
4319
classifiers = [

0 commit comments

Comments
 (0)
0