Skip to content

Commit b07d0f1

Browse files
committed
vcversioner -> setuptools_scm
1 parent aaee55c commit b07d0f1

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/jsonschema/_version.py
2-
/version.txt
3-
41
_cache
52
_static
63
_templates

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
include *.rst
22
include COPYING
33
include tox.ini
4-
include version.txt
54
recursive-include json *

jsonschema/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@
2424
Draft3Validator, Draft4Validator, RefResolver, validate
2525
)
2626

27-
from jsonschema._version import __version__
28-
29-
# flake8: noqa
27+
from pkg_resources import get_distribution
28+
__version__ = get_distribution(__name__).version

setup.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,23 @@
3030

3131
setup(
3232
name="jsonschema",
33-
packages=["jsonschema", "jsonschema.tests"],
34-
package_data={"jsonschema": ["schemas/*.json"]},
35-
install_requires=["attrs>=17.3.0", "pyrsistent>=0.14.0", "six>=1.11.0"],
36-
setup_requires=["vcversioner>=2.16.0.0"],
37-
extras_require=extras_require,
38-
author="Julian Berman",
39-
author_email="[email protected]",
4033
classifiers=classifiers,
4134
description="An implementation of JSON Schema validation for Python",
4235
license="MIT",
4336
long_description=long_description,
4437
url="http://github.com/Julian/jsonschema",
38+
39+
author="Julian Berman",
40+
author_email="[email protected]",
41+
42+
setup_requires=["setuptools_scm"],
43+
use_scm_version=True,
44+
45+
install_requires=["attrs>=17.3.0", "pyrsistent>=0.14.0", "six>=1.11.0"],
46+
extras_require=extras_require,
47+
48+
packages=["jsonschema", "jsonschema.tests"],
49+
package_data={"jsonschema": ["schemas/*.json"]},
50+
4551
entry_points={"console_scripts": ["jsonschema = jsonschema.cli:main"]},
46-
vcversioner={"version_module_paths": ["jsonschema/_version.py"]},
4752
)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ commands = flake8 {posargs} {toxinidir}/jsonschema {toxinidir}/docs {toxinidir}/
4646

4747

4848
[flake8]
49-
exclude = jsonschema/_reflect.py
49+
exclude = jsonschema/__init__.py,jsonschema/_reflect.py
5050

5151
[testenv:coverage]
5252
commands =

0 commit comments

Comments
 (0)