mirror of
https://github.com/sprockets/sprockets.mixins.mediatype.git
synced 2024-12-28 11:24:12 +00:00
Support Tornado 6, remove setuptools_scm
This commit is contained in:
parent
5079ed1b06
commit
7da331464b
7 changed files with 34 additions and 13 deletions
|
@ -1,6 +1,11 @@
|
|||
Version History
|
||||
===============
|
||||
|
||||
`3.0.1`_ (5 Mar 2019)
|
||||
---------------------
|
||||
- Set Tornado PIN to >=5, <7
|
||||
- Remove setuptools_scm
|
||||
|
||||
`3.0.0`_ (4 Dec 2018)
|
||||
---------------------
|
||||
- Add MessagePack dependencies to package extras (eg. `pip install sprockets.mixins.mediatype[msgpack]`)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
ietfparse>=1.5.1,<2
|
||||
tornado>=5,<6
|
||||
tornado>=5,<7
|
||||
|
|
|
@ -14,4 +14,7 @@ exclude = build,env,.eggs
|
|||
[nosetests]
|
||||
cover-branches = 1
|
||||
cover-erase = 1
|
||||
cover-package = sprockets.mixins
|
||||
cover-package = sprockets.mixins.mediatype
|
||||
logging-level=DEBUG
|
||||
verbosity=2
|
||||
with-coverage=1
|
||||
|
|
11
setup.py
11
setup.py
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
import pathlib
|
||||
import setuptools
|
||||
|
||||
from sprockets.mixins import mediatype
|
||||
|
||||
REPO_DIR = pathlib.Path(__name__).parent
|
||||
|
||||
|
@ -23,6 +23,7 @@ def read_requirements(name):
|
|||
|
||||
setuptools.setup(
|
||||
name='sprockets.mixins.mediatype',
|
||||
version=mediatype.__version__,
|
||||
description='A mixin for reporting handling content-type/accept headers',
|
||||
long_description=REPO_DIR.joinpath('README.rst').read_text(),
|
||||
url='https://github.com/sprockets/sprockets.mixins.mediatype',
|
||||
|
@ -41,18 +42,12 @@ setuptools.setup(
|
|||
'Topic :: Software Development :: Libraries',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules'
|
||||
],
|
||||
packages=[
|
||||
'sprockets',
|
||||
'sprockets.mixins',
|
||||
'sprockets.mixins.mediatype'
|
||||
],
|
||||
packages=setuptools.find_packages(),
|
||||
install_requires=read_requirements('requires/installation.txt'),
|
||||
tests_require=read_requirements('requires/testing.txt'),
|
||||
extras_require={
|
||||
'msgpack': ['u-msgpack-python>=2.5.0,<3']
|
||||
},
|
||||
setup_requires=['setuptools_scm'],
|
||||
use_scm_version=True,
|
||||
namespace_packages=['sprockets', 'sprockets.mixins'],
|
||||
test_suite='nose.collector',
|
||||
python_requires='>=3.7',
|
||||
|
|
1
sprockets/__init__.py
Normal file
1
sprockets/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
__import__('pkg_resources').declare_namespace(__name__)
|
1
sprockets/mixins/__init__.py
Normal file
1
sprockets/mixins/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
__import__('pkg_resources').declare_namespace(__name__)
|
|
@ -2,11 +2,27 @@
|
|||
sprockets.mixins.mediatype
|
||||
|
||||
"""
|
||||
try:
|
||||
from .content import (ContentMixin, ContentSettings,
|
||||
add_binary_content_type, add_text_content_type,
|
||||
set_default_content_type)
|
||||
except ImportError as error: # pragma no cover
|
||||
def _error_closure(*args, **kwargs):
|
||||
raise error
|
||||
|
||||
from .content import (ContentMixin, ContentSettings,
|
||||
add_binary_content_type, add_text_content_type,
|
||||
set_default_content_type)
|
||||
class ErrorClosureClass(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
raise error
|
||||
|
||||
ContentMixin = ErrorClosureClass
|
||||
ContentSettings = ErrorClosureClass
|
||||
add_binary_content_type = _error_closure
|
||||
add_text_content_type = _error_closure
|
||||
set_default_content_type = _error_closure
|
||||
|
||||
|
||||
version_info = (3, 0, 1)
|
||||
__version__ = '.'.join(str(x) for x in version_info)
|
||||
|
||||
__all__ = ['ContentMixin', 'ContentSettings', 'add_binary_content_type',
|
||||
'add_text_content_type', 'set_default_content_type',
|
||||
|
|
Loading…
Reference in a new issue