diff --git a/.travis.yml b/.travis.yml index 407dbd7..4799079 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,17 +2,13 @@ --- language: python python: - - 2.6 - 2.7 - pypy - 3.2 - 3.3 - 3.4 install: - - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi - - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then pip install -r requirements2.txt; fi - - if [[ $TRAVIS_PYTHON_VERSION == pypy ]]; then pip install -r requirements2.txt; fi - - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then pip install -r requirements3.txt; fi + - pip install -e . - pip install -r test-requirements.txt script: nosetests after_success: diff --git a/LICENSE b/LICENSE index 630f26e..e28794a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014 AWeber Communications +Copyright (c) 2014-2018 AWeber Communications All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -22,4 +22,4 @@ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MANIFEST.in b/MANIFEST.in index 9d5d250..ca75aa4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,5 @@ include LICENSE -include README.rst +include requirements.txt +include test-requirements.txt +include dev-requirements.txt +include tests.py diff --git a/README.rst b/README.rst index 973b00d..47fba69 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ sprockets.clients.memcached =========================== Memcached client wrapper that is configured via environment variables. -|Version| |Downloads| |Status| |Coverage| |License| +|Version| |Status| |Coverage| |License| Installation ------------ @@ -20,8 +20,7 @@ https://sprocketsclientsmemcached.readthedocs.org Requirements ------------ -- `python-memcached `_ (Python 2) -- `python3-memcached `_ (Python 3) +- `python-memcached `_ Example ------- @@ -45,7 +44,7 @@ memcached commands: Version History --------------- -Available at https://sprocketsclientsmemcached.readthedocs.org/en/latest/history.html +Available at https://sprocketsclientsmemcached.readthedocs.io/en/latest/history.html .. |Version| image:: https://badge.fury.io/py/sprockets.clients.memcached.svg? :target: http://badge.fury.io/py/sprockets.clients.memcached @@ -56,8 +55,5 @@ Available at https://sprocketsclientsmemcached.readthedocs.org/en/latest/history .. |Coverage| image:: https://img.shields.io/coveralls/sprockets/sprockets.clients.memcached.svg? :target: https://coveralls.io/r/sprockets/sprockets.clients.memcached -.. |Downloads| image:: https://pypip.in/d/sprockets.clients.memcached/badge.svg? - :target: https://pypi.python.org/pypi/sprockets.clients.memcached - -.. |License| image:: https://pypip.in/license/sprockets.clients.memcached/badge.svg? - :target: https://sprocketsclientsmemcached.readthedocs.org \ No newline at end of file +.. |License| image:: https://img.shields.io/github/license/sprockets/sprockets.clients.memcached.svg + :target: https://sprocketsclientsmemcached.readthedocs.io diff --git a/dev-requirements.txt b/dev-requirements.txt index abd370c..d6b937f 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,3 @@ -# Include this version only for documentation building purposes, normally ignored --e git://github.com/gmr/python-memcached.git@docstring-update#egg=python-memcached sphinx>=1.2,<2 sphinx-rtd-theme>=0.1,<1.0 sphinxcontrib-httpdomain>=1.2,<2 diff --git a/docs/conf.py b/docs/conf.py index a5ab4ea..b165e4b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,8 +1,6 @@ #!/usr/bin/env python import sphinx_rtd_theme -from sprockets.clients.memcached import version_info, __version__ - needs_sphinx = '1.0' extensions = [ 'sphinx.ext.autodoc', @@ -14,15 +12,11 @@ templates_path = [] source_suffix = '.rst' master_doc = 'index' project = 'sprockets.clients.memcached' -copyright = '2014, AWeber Communications' -version = '.'.join(__version__.split('.')[0:1]) -release = __version__ -if len(version_info) > 3: - release += '-{0}'.format(str(v) for v in version_info[3:]) +copyright = '2014-2018, AWeber Communications' +version = '1.0.1' +release = '1.0' exclude_patterns = [] pygments_style = 'sphinx' html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] -intersphinx_mapping = { - 'python': ('https://docs.python.org/2/', None) -} \ No newline at end of file +intersphinx_mapping = {'python': ('https://docs.python.org/2/', None)} diff --git a/docs/history.rst b/docs/history.rst index 75e0d5a..c26036e 100644 --- a/docs/history.rst +++ b/docs/history.rst @@ -1,4 +1,11 @@ Version History --------------- +- Next Release + + - Remove usage of python3-memcached since python-memcached supports + both Python2 & Python3 + - Drop support for Python 2.6 + - 1.0.0 [2014-09-03] - - Initial release + + - Initial release diff --git a/docs/index.rst b/docs/index.rst index 0d82047..a347e0b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,7 +2,7 @@ sprockets.clients.memcached =========================== Memcached client wrapper that is configured via environment variables -|Version| |Downloads| |Status| |Coverage| |License| +|Version| |Status| |Coverage| |License| Installation ------------ @@ -12,12 +12,11 @@ and can be installed via ``pip`` or ``easy_install``: .. code:: bash - pip install sprockets.clients.memcached + pip install sprockets.clients.memcached Requirements ------------ -- `python-memcached `_ (Python 2) -- `python3-memcached `_ (Python 3) +- `python-memcached `_ API Documentation ----------------- @@ -26,6 +25,7 @@ API Documentation api examples + history Version History --------------- @@ -59,8 +59,5 @@ Indices and tables .. |Coverage| image:: https://img.shields.io/coveralls/sprockets/sprockets.clients.memcached.svg? :target: https://coveralls.io/r/sprockets/sprockets.clients.memcached -.. |Downloads| image:: https://pypip.in/d/sprockets.clients.memcached/badge.svg? - :target: https://pypi.python.org/pypi/sprockets.clients.memcached - -.. |License| image:: https://pypip.in/license/sprockets.clients.memcached/badge.svg? - :target: https://sprocketsclientsmemcached.readthedocs.org \ No newline at end of file +.. |License| image:: https://img.shields.io/github/license/sprockets/sprockets.clients.memcached.svg + :target: https://sprocketsclientsmemcached.readthedocs.io diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e2263c0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +python-memcached>=1.59,<2 diff --git a/requirements2.txt b/requirements2.txt deleted file mode 100644 index 851bfd8..0000000 --- a/requirements2.txt +++ /dev/null @@ -1 +0,0 @@ -python-memcached diff --git a/requirements3.txt b/requirements3.txt deleted file mode 100644 index d76721d..0000000 --- a/requirements3.txt +++ /dev/null @@ -1 +0,0 @@ -python3-memcached diff --git a/setup.py b/setup.py index 261d2fc..ccc98a6 100644 --- a/setup.py +++ b/setup.py @@ -3,12 +3,15 @@ import sys import setuptools -install_requires = ['sprockets'] -if sys.version_info < (3, 0): - install_requires.append('python-memcached') -if sys.version_info >= (3, 0): - install_requires.append('python3-memcached') +def read_requirements(name): + requirements = [] + with open(name) as req_file: + for line in req_file: + if '#' in line: + line = line[:line.index('#')] + requirements.append(line.strip()) + return requirements setuptools.setup( @@ -22,13 +25,12 @@ setuptools.setup( author_email='api@aweber.com', license=codecs.open('LICENSE', encoding='utf-8').read(), classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', @@ -44,7 +46,7 @@ setuptools.setup( 'sprockets.clients.memcached'], package_data={'': ['LICENSE', 'README.rst']}, include_package_data=True, - namespace_packages=['sprockets', - 'sprockets.clients'], - install_requires=install_requires, + namespace_packages=['sprockets', 'sprockets.clients'], + install_requires=read_requirements('requirements.txt'), + tests_require=read_requirements('test-requirements.txt'), zip_safe=False)