-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme/project setup for modern pip/tox and remove setuptools …
…usages addresses part of #93
- Loading branch information
1 parent
773e87f
commit 91d53c6
Showing
4 changed files
with
99 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,68 @@ | ||
[metadata] | ||
name = prance | ||
version = 0.20.2 | ||
description = Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser | ||
long_description = file: README.rst | ||
classifiers = | ||
Development Status :: 4 - Beta | ||
Environment :: Plugins | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: MIT License | ||
Natural Language :: English | ||
Operating System :: OS Independent | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.4 | ||
Programming Language :: Python :: 3.5 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Topic :: Internet :: WWW/HTTP | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
keywords = swagger openapi parsing | ||
author = Jens Finkhaeuser | ||
author_email = [email protected] | ||
url = https://github.com/jfinkhaeuser/prance | ||
license = MITNFA | ||
|
||
[options] | ||
packages = find: | ||
include_package_data = True | ||
install_requires = | ||
chardet~=4.0 | ||
PyYAML~=5.3 | ||
requests~=2.25 | ||
six~=1.15 | ||
semver~=2.13 | ||
zip_safe = True | ||
|
||
[options.packages.find] | ||
exclude = | ||
ez_setup | ||
examples | ||
tests | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
prance=prance.cli:cli [cli] | ||
|
||
[options.extras_require] | ||
dev = | ||
tox>=3.21 | ||
bumpversion>=0.6 | ||
pytest>=6.1 | ||
pytest-cov>=2.11 | ||
flake8>=3.8 | ||
pep8-naming>=0.11 | ||
flake8-quotes>=3.2 | ||
flake8_docstrings>=1.5 | ||
sphinx>=3.4 | ||
towncrier>=19.2 | ||
icu = PyICU~=2.4 | ||
ssv = swagger-spec-validator~=2.4 | ||
osv = openapi-spec-validator>0.2,>=0.2.1 | ||
flex = flex~=6.13 | ||
cli = click~=7.0 | ||
|
||
[bumpversion] | ||
current_version = 0.20.2 | ||
commit = True | ||
|
@@ -9,31 +74,25 @@ test = pytest | |
[tool:pytest] | ||
addopts = --verbose --cov=prance --cov-report=term-missing --cov-fail-under=90 | ||
testpaths = tests | ||
markers = | ||
requires_network: Marks test as requring network connections (deselect with '-m "not requires_network"') | ||
markers = | ||
requires_network: Marks test as requring network connections (deselect with '-m "not requires_network"') | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[bumpversion:file:setup.py] | ||
|
||
[bumpversion:file:prance/__init__.py] | ||
|
||
[bumpversion:file:docs/source/conf.py] | ||
|
||
[flake8] | ||
exclude = | ||
.git, | ||
__pycache__, | ||
docs/source/conf.py,old,build,dist,.eggs, | ||
ENV,lib, | ||
.tox | ||
ignore = | ||
E111,E114,E128,E121, | ||
E251, | ||
E402, | ||
E401, | ||
N807. | ||
W503 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
docs/source/conf.py,old,build,dist,.eggs, | ||
ENV,lib, | ||
.tox | ||
ignore = | ||
E111,E114,E128,E121, | ||
E251, | ||
E402, | ||
E401, | ||
N807. | ||
W503 | ||
show-source = True | ||
doctests = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,2 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Dist utils for Prance. | ||
This should work within tox, and install all required dependencies for testing. | ||
""" | ||
|
||
if __name__ == '__main__': | ||
# Get setup function | ||
try: | ||
from setuptools import setup, find_packages | ||
except ImportError: | ||
from distutils.core import setup, find_packages | ||
|
||
dev_require = [ | ||
'tox>=3.21', | ||
'bumpversion>=0.6', | ||
'pytest>=6.1', | ||
'pytest-cov>=2.11', | ||
'flake8>=3.8', | ||
'pep8-naming>=0.11', | ||
'flake8-quotes>=3.2', | ||
'flake8_docstrings>=1.5', | ||
'sphinx>=3.4', | ||
'towncrier>=19.2', | ||
] | ||
|
||
icu_require = [ | ||
'PyICU~=2.4', | ||
] | ||
|
||
ssv_require = [ | ||
'swagger-spec-validator~=2.4', | ||
] | ||
|
||
osv_require = [ | ||
'openapi-spec-validator>0.2,>=0.2.1', | ||
] | ||
|
||
flex_require = [ | ||
'flex~=6.13', | ||
] | ||
|
||
cli_require = [ | ||
'click~=7.0', | ||
] | ||
|
||
# Run setup | ||
setup( | ||
name = 'prance', | ||
version = '0.20.2', | ||
description = 'Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser', | ||
long_description = open('README.rst').read(), | ||
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers | ||
classifiers = [ | ||
'Development Status :: 4 - Beta', | ||
'Environment :: Plugins', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: MIT License', | ||
'Natural Language :: English', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Topic :: Internet :: WWW/HTTP', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
], | ||
keywords = 'swagger openapi parsing', | ||
author = 'Jens Finkhaeuser', | ||
author_email = '[email protected]', | ||
url = 'https://github.com/jfinkhaeuser/prance', | ||
license = 'MITNFA', | ||
packages = find_packages(exclude = ['ez_setup', 'examples', 'tests']), | ||
include_package_data = True, | ||
install_requires = [ | ||
'chardet~=4.0', | ||
'PyYAML~=5.3', | ||
'requests~=2.25', | ||
'six~=1.15', | ||
'semver~=2.13', | ||
], | ||
extras_require = { | ||
'dev': dev_require, | ||
'icu': icu_require, | ||
'ssv': ssv_require, | ||
'osv': osv_require, | ||
'flex': flex_require, | ||
'cli': cli_require, | ||
}, | ||
entry_points={ | ||
'console_scripts': [ | ||
'prance=prance.cli:cli [cli]', | ||
], | ||
}, | ||
zip_safe = True, | ||
test_suite = 'tests', | ||
setup_requires = ['pytest-runner'], | ||
tests_require = dev_require, | ||
) | ||
from setuptools import setup | ||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
[tox] | ||
envlist = py36-{default,no_icu} | ||
|
||
envlist = py{36,37,38}-{default,no_icu} | ||
minver=3.0 | ||
[testenv] | ||
# Different dependencies for different test environments | ||
deps = | ||
default: -r{toxinidir}/requirements.txt | ||
no_icu: -r{toxinidir}/requirements_no_icu.txt | ||
no_osv_or_icu: -r{toxinidir}/requirements_no_osv_or_icu.txt | ||
flex: -r{toxinidir}/requirements_flex.txt | ||
bare: -r{toxinidir}/requirements_bare.txt | ||
extras = | ||
default: dev,ssv,osv,icu,cli | ||
no_icu: dev,ssv,osv,cli | ||
no_osv_or_icu: dev,ssv,cli | ||
flex: dev,flex,icu | ||
bare: dev | ||
deps = | ||
six | ||
pytest | ||
pytest-cov | ||
# We need to set environment variables for py3 to work with click | ||
setenv = | ||
LC_ALL=C.UTF-8 | ||
LANG=C.UTF-8 | ||
# For Python 3.6 (main dev version), also run flake8 and sphinx | ||
commands = | ||
py{34,35,37,38,py3}: python setup.py test | ||
py36: python setup.py test flake8 build_sphinx | ||
pytest | ||
py36: python setup.py build_sphinx | ||
py36: flake8 prance # tests |