From 74064b37d594f827cbb3068eabe558dba507d611 Mon Sep 17 00:00:00 2001 From: hustcc Date: Thu, 9 Mar 2017 10:50:22 +0800 Subject: [PATCH] add setup.py, v0.1.0.dev0 --- .gitignore | 4 ++++ __init__.py | 3 ++- requirements.txt | 2 -- setup.cfg | 5 ++++ setup.py | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa62446 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.egg-info +*.pyc +dist +build diff --git a/__init__.py b/__init__.py index b794fd4..8519177 100644 --- a/__init__.py +++ b/__init__.py @@ -1 +1,2 @@ -__version__ = '0.1.0' +# -*- coding: utf-8 -*- +__version__ = '0.1.0.dev0' diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 8f084e2..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -redis -Beaker \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..fe62be2 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[metadata] +description-file = README.md + +[bdist_wheel] +universal = 1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..6ecaa7d --- /dev/null +++ b/setup.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +import setuptools # noqa +from distutils.core import setup +import io +import re +import os + + +DOC = '''TODO''' + + +def read(*names, **kwargs): + return io.open( + os.path.join(os.path.dirname(__file__), *names), + encoding=kwargs.get("encoding", "utf8") + ).read() + + +def find_version(*file_paths): + version_file = read(*file_paths) + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", + version_file, re.M) + if version_match: + return version_match.group(1) + raise RuntimeError("Unable to find version string.") + + +setup(name='Py3Cache', + version=find_version('__init__.py'), + description=(u'该项目是 J2Cache 的 Python 语言移植版本。'), + long_description=DOC, + author='ld', + author_email='ld', + url='http://git.oschina.net/ld', + license='MIT', + install_requires=[ + 'redis', + 'Beaker' + ], + classifiers=[ + 'Intended Audience :: Developers', + 'Operating System :: OS Independent', + 'Natural Language :: Chinese (Simplified)', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.5', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Topic :: Utilities' + ], + keywords='Py3Cache, J2Cache', + include_package_data=True, + zip_safe=False, + packages=[]) -- Gitee