Commit eaf73ab7 authored by Tres Seaver's avatar Tres Seaver

Add support for PyPy.

parent 6ecf9838
......@@ -5,6 +5,8 @@ CHANGES
4.0.0 (unreleased)
------------------
- Added support for PyPy.
- Added a pure-Python fallback implementations of ``zope.proxy.ProxyBase``
and the proxy module API functions.
......
......@@ -18,12 +18,35 @@
##############################################################################
"""Setup for zope.proxy package
"""
import os, sys
from setuptools import setup, Extension
import os
import platform
from setuptools import setup, Extension, Feature
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
Cwrapper = Feature(
"C wrapper",
standard = True,
ext_modules=[Extension("zope.proxy._zope_proxy_proxy",
[os.path.join('src', 'zope', 'proxy',
"_zope_proxy_proxy.c")
],
extra_compile_args=['-g']),
],
)
# PyPy won't build the extension.
py_impl = getattr(platform, 'python_implementation', lambda: None)
is_pypy = py_impl() == 'PyPy'
if is_pypy:
features = {}
headers = []
else:
features = {'Cwrapper': Cwrapper}
headers=[os.path.join('src', 'zope', 'proxy', 'proxy.h')],
setup(name='zope.proxy',
version = '4.0.0dev',
author='Zope Foundation and Contributors',
......@@ -46,20 +69,16 @@ setup(name='zope.proxy',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
'Operating System :: OS Independent'],
keywords='proxy generic transparent',
packages=['zope', 'zope.proxy'],
package_dir = {'': 'src'},
namespace_packages=['zope',],
headers=[os.path.join('src', 'zope', 'proxy', 'proxy.h')],
ext_modules=[Extension("zope.proxy._zope_proxy_proxy",
[os.path.join('src', 'zope', 'proxy',
"_zope_proxy_proxy.c")
]),
],
features=features,
headers=headers,
test_suite = 'zope.proxy',
install_requires=[
'zope.interface',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment