summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorHervé Beraud <hberaud@redhat.com>2019-02-20 16:43:16 +0100
committerHervé Beraud <hberaud@redhat.com>2019-02-21 21:42:13 +0100
commitacc6466a0a19a5c359c2058e892f2fa2e567e55b (patch)
tree2a945267fce486161e461c9b8c66a3cab78a9a36 /setup.py
parent1ab7ef20d71de8289edc26ff2b79b7827b612601 (diff)
downloadpymemcache-acc6466a0a19a5c359c2058e892f2fa2e567e55b.tar.gz
Introduce package metadata configuration by using setup.cfg
Since setuptools 30.3.0 we can use setup.cfg to configure package for build and distribute. These changes propose to adopt a more modern approach to package pymemcache by using latest and stable feature of setuptools. Overview: - remove python code to maintain - introduce package metadata, - centralize version management in package metadata
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py45
1 files changed, 2 insertions, 43 deletions
diff --git a/setup.py b/setup.py
index fa8174d..beda28e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,46 +1,5 @@
#!/usr/bin/env python
-import os
-import re
+from setuptools import setup
-from setuptools import setup, find_packages
-
-
-def read(path):
- return open(os.path.join(os.path.dirname(__file__), path)).read()
-
-
-def read_version(path):
- match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", read(path), re.M)
- if match:
- return match.group(1)
- raise RuntimeError("Unable to find __version__ in %s." % path)
-
-
-readme = read('README.rst')
-changelog = read('ChangeLog.rst')
-version = read_version('pymemcache/__init__.py')
-
-setup(
- name='pymemcache',
- version=version,
- author='Charles Gordon',
- author_email='charles@pinterest.com',
- packages=find_packages(),
- install_requires=['six'],
- description='A comprehensive, fast, pure Python memcached client',
- long_description=readme + '\n' + changelog,
- license='Apache License 2.0',
- url='https://github.com/Pinterest/pymemcache',
- classifiers=[
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.7',
- 'Programming Language :: Python :: Implementation :: PyPy',
- 'License :: OSI Approved :: Apache Software License',
- 'Topic :: Database',
- ],
-)
+setup()