From a95af403e6327f9e2412895d63d9781454cc55e7 Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Wed, 1 Aug 2018 21:44:29 +0200 Subject: [PATCH] setup.py -> setup.cfg --- setup.cfg | 51 ++++++++++++++++++++++++++++++++++++++++++++++-- setup.py | 58 +------------------------------------------------------ tox.ini | 5 +---- 3 files changed, 51 insertions(+), 63 deletions(-) diff --git a/setup.cfg b/setup.cfg index 5e4090017..72f8d8f67 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,49 @@ -[wheel] -universal = 1 +[metadata] +name = jsonschema +url = https://github.com/Julian/jsonschema +description = An implementation of JSON Schema validation for Python +long_description = file: README.rst +author = Julian Berman +author_email = Julian@GrayVines.com +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + License :: OSI Approved :: MIT License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: Implementation :: PyPy + +[options] +packages = find: +setup_requires = setuptools_scm +install_requires = + attrs>=17.4.0 + pyrsistent>=0.14.0 + six>=1.11.0 + functools32;python_version<'3' + +[options.extras_require] +format = + jsonpointer>1.13 + rfc3987 + strict-rfc3339 + webcolors + +[options.entry_points] +console_scripts = + jsonschema = jsonschema.cli:main + +[options.package_data] +jsonschema = schemas/*.json + +[flake8] +exclude = + jsonschema/__init__.py + jsonschema/_reflect.py diff --git a/setup.py b/setup.py index 37cadea62..460aabeb2 100644 --- a/setup.py +++ b/setup.py @@ -1,58 +1,2 @@ -import os - from setuptools import setup - - -with open(os.path.join(os.path.dirname(__file__), "README.rst")) as readme: - long_description = readme.read() - -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", -] - -setup( - name="jsonschema", - 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.4.0", - "pyrsistent>=0.14.0", - "six>=1.11.0", - "functools32;python_version<'3'", - ], - extras_require={ - "format": [ - "jsonpointer>1.13", - "rfc3987", - "strict-rfc3339", - "webcolors", - ], - }, - - packages=["jsonschema", "jsonschema.tests"], - package_data={"jsonschema": ["schemas/*.json"]}, - - entry_points={"console_scripts": ["jsonschema = jsonschema.cli:main"]}, -) +setup(use_scm_version=True) diff --git a/tox.ini b/tox.ini index 895ad15ee..24f36fc61 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,5 @@ [tox] +changedir = {envtmpdir} skipsdist = True envlist = py{27,34,35,36,py}-{build,safety,tests}, @@ -62,10 +63,6 @@ basepython = pypy deps = ebb-lint commands = {envbindir}/flake8 {posargs} {toxinidir}/jsonschema {toxinidir}/docs {toxinidir}/setup.py - -[flake8] -exclude = jsonschema/__init__.py,jsonschema/_reflect.py - [testenv:coverage] setenv = {[testenv]setenv}