From ed51012ee1646e2fdb49cf635bf3fbe757e79655 Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Tue, 9 Jan 2018 14:01:54 -0500 Subject: [PATCH] Remove python3-memcached. Use python-memcached instead since it now supports python 2 and python 3. --- MANIFEST.in | 5 ++++- docs/history.rst | 3 +++ requirements.txt | 1 + requirements2.txt | 1 - requirements3.txt | 1 - setup.py | 19 +++++++++++-------- 6 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 requirements.txt delete mode 100644 requirements2.txt delete mode 100644 requirements3.txt 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/docs/history.rst b/docs/history.rst index 75e0d5a..83ed6a5 100644 --- a/docs/history.rst +++ b/docs/history.rst @@ -1,4 +1,7 @@ Version History --------------- +- Next Release + - Remove usage of python3-memcached since python-memcached supports + both Python2 & Python3 - 1.0.0 [2014-09-03] - Initial release 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..320280e 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( @@ -44,7 +47,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)