Permalink
Browse files

Test and declare PyPy compatibility

  • Loading branch information...
1 parent bb40c95 commit 37adaf8df00a0193cec6af32fa18e4544a4f7ec2 @hannosch hannosch committed Sep 22, 2012
Showing with 28 additions and 5 deletions.
  1. +4 −1 .gitignore
  2. +4 −0 .travis.yml
  3. +1 −1 CHANGES.rst
  4. +10 −1 Makefile
  5. +9 −2 setup.py
View
@@ -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
@@ -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
@@ -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
@@ -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
@@ -11,6 +11,9 @@
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 @@
'docutils',
'mock',
'nose',
- ]
+]
-if sys.version_info < (3, 0):
+if not (PYTHON3 or PYPY):
tests_require += [
'gevent',
'repoze.sphinx.autointerface',
@@ -47,10 +50,14 @@
"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",

0 comments on commit 37adaf8

Please sign in to comment.