Test and declare PyPy compatibility

This commit is contained in:
Hanno Schlichting
2012-09-22 16:21:16 +02:00
parent bb40c950b2
commit 37adaf8df0
5 changed files with 28 additions and 5 deletions

5
.gitignore vendored
View File

@@ -15,11 +15,14 @@ dist/
docs/_build
dropin.cache
eggs/
include/
include
lib/
lib-python/
lib_pypy/
man/
parts/
share/
site-packages/
.coverage
.idea
.pip_cache

View File

@@ -25,6 +25,10 @@ matrix:
env: ZOOKEEPER_VERSION=3.3.6
- python: "3.2"
env: ZOOKEEPER_VERSION=3.4.3
- python: "pypy"
env: ZOOKEEPER_VERSION=3.3.6
- python: "pypy"
env: ZOOKEEPER_VERSION=3.4.3
notifications:
email:

View File

@@ -18,7 +18,7 @@ Features
- Automatic background scanning for a Read/Write server when connected to a
server in read-only mode.
- Handles connecting to Zookeeper 3.4+ read-only servers.
- Added support for Python 3.2 and 3.3 (only for the threading handler).
- Added support for Python 3.2, 3.3 and PyPy (only for the threading handler).
Bug Handling
************

View File

@@ -10,12 +10,21 @@ BUILD_DIRS = bin build include lib lib64 man share
GEVENT_VERSION ?= 1.0b4
PYTHON_EXE = $(shell [ -f $(PYTHON) ] && echo $(PYTHON) || echo python)
PYPY = $(shell $(PYTHON_EXE) -c "import sys; print(getattr(sys, 'pypy_version_info', False) and 'yes' or 'no')")
TRAVIS_PYTHON_VERSION ?= $(shell $(PYTHON_EXE) -c "import sys; print('.'.join([str(s) for s in sys.version_info][:2]))")
ZOOKEEPER = $(BIN)/zookeeper
ZOOKEEPER_VERSION ?= 3.3.6
ZOOKEEPER_PATH ?= $(ZOOKEEPER)
GEVENT_SUPPORTED = yes
ifeq ($(findstring 3.,$(TRAVIS_PYTHON_VERSION)), 3.)
GEVENT_SUPPORTED = no
endif
ifeq ($(PYPY),yes)
GEVENT_SUPPORTED = no
endif
.PHONY: all build clean test zookeeper clean-zookeeper
all: build
@@ -25,7 +34,7 @@ $(PYTHON):
rm distribute-0.6.*.tar.gz
build: $(PYTHON)
ifeq ($(findstring 3.,$(TRAVIS_PYTHON_VERSION)), 3.)
ifeq ($(GEVENT_SUPPORTED),no)
$(INSTALL) -U -r requirements3.txt
else
$(INSTALL) -U -r requirements.txt

View File

@@ -11,6 +11,9 @@ with open(os.path.join(here, 'README.rst')) as f:
with open(os.path.join(here, 'CHANGES.rst')) as f:
CHANGES = f.read()
PYTHON3 = sys.version_info > (3, )
PYPY = getattr(sys, 'pypy_version_info', False) and True or False
install_requires = [
'zope.interface >= 3.8.0', # has zope.interface.registry
]
@@ -20,9 +23,9 @@ tests_require = install_requires + [
'docutils',
'mock',
'nose',
]
]
if sys.version_info < (3, 0):
if not (PYTHON3 or PYPY):
tests_require += [
'gevent',
'repoze.sphinx.autointerface',
@@ -47,10 +50,14 @@ setup(
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"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 :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Communications",
"Topic :: System :: Distributed Computing",
"Topic :: System :: Networking",