summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--MANIFEST.in1
-rw-r--r--jsonschema/__init__.py5
-rw-r--r--setup.py21
-rw-r--r--tox.ini2
5 files changed, 16 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index 3397f2a..31236db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,3 @@
-/jsonschema/_version.py
-/version.txt
-
_cache
_static
_templates
diff --git a/MANIFEST.in b/MANIFEST.in
index a122503..a951c8a 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,4 @@
include *.rst
include COPYING
include tox.ini
-include version.txt
recursive-include json *
diff --git a/jsonschema/__init__.py b/jsonschema/__init__.py
index 38857fd..7aa31de 100644
--- a/jsonschema/__init__.py
+++ b/jsonschema/__init__.py
@@ -24,6 +24,5 @@ from jsonschema.validators import (
Draft3Validator, Draft4Validator, RefResolver, validate
)
-from jsonschema._version import __version__
-
-# flake8: noqa
+from pkg_resources import get_distribution
+__version__ = get_distribution(__name__).version
diff --git a/setup.py b/setup.py
index b796ba4..db6a9ec 100644
--- a/setup.py
+++ b/setup.py
@@ -30,18 +30,23 @@ extras_require = {
setup(
name="jsonschema",
- packages=["jsonschema", "jsonschema.tests"],
- package_data={"jsonschema": ["schemas/*.json"]},
- install_requires=["attrs>=17.3.0", "pyrsistent>=0.14.0", "six>=1.11.0"],
- setup_requires=["vcversioner>=2.16.0.0"],
- extras_require=extras_require,
- author="Julian Berman",
- author_email="Julian@GrayVines.com",
classifiers=classifiers,
description="An implementation of JSON Schema validation for Python",
license="MIT",
long_description=long_description,
url="http://github.com/Julian/jsonschema",
+
+ author="Julian Berman",
+ author_email="Julian@GrayVines.com",
+
+ setup_requires=["setuptools_scm"],
+ use_scm_version=True,
+
+ install_requires=["attrs>=17.3.0", "pyrsistent>=0.14.0", "six>=1.11.0"],
+ extras_require=extras_require,
+
+ packages=["jsonschema", "jsonschema.tests"],
+ package_data={"jsonschema": ["schemas/*.json"]},
+
entry_points={"console_scripts": ["jsonschema = jsonschema.cli:main"]},
- vcversioner={"version_module_paths": ["jsonschema/_version.py"]},
)
diff --git a/tox.ini b/tox.ini
index 9a83729..3260519 100644
--- a/tox.ini
+++ b/tox.ini
@@ -46,7 +46,7 @@ commands = flake8 {posargs} {toxinidir}/jsonschema {toxinidir}/docs {toxinidir}/
[flake8]
-exclude = jsonschema/_reflect.py
+exclude = jsonschema/__init__.py,jsonschema/_reflect.py
[testenv:coverage]
commands =