Commit cb0bd4a6 authored by Boxiang Sun's avatar Boxiang Sun

pretend we are still 2.13.9

parent eefcf53e
......@@ -208,8 +208,10 @@ static PyExtensionClass NAME ## Type = { PyObject_HEAD_INIT(NULL) 0, # NAME, \
PyExtensionClassCAPI->PyECMethod_New_((CALLABLE),(INST))
/* Return the instance that is bound by an extension class method. */
// Pyston change: cannot access the member of PyMethodObject in Pyston directly.
#define PyECMethod_Self(M) \
(PyMethod_Check((M)) ? ((PyMethodObject*)(M))->im_self : NULL)
(PyMethod_Check((M)) ? PyMethod_GET_SELF(M) : NULL)
// (PyMethod_Check((M)) ? ((PyMethodObject*)(M))->im_self : NULL)
/* Check whether an object has an __of__ method for returning itself
in the context of it's container. */
......
......@@ -25,11 +25,16 @@ with open('CHANGES.rst') as f:
CHANGES = f.read()
# PyPy won't build the extension.
# Pyston change: if there has Python implementation
# I think it is better use it, because Pyston JIT can track objects
# which created by pure Python, and apply some JIT optimization.
# But cannot apply optimization on C extension for now.
py_impl = getattr(platform, 'python_implementation', lambda: None)
is_pypy = py_impl() == 'PyPy'
is_pyston = py_impl() == 'Pyston'
is_pure = 'PURE_PYTHON' in os.environ
py3k = sys.version_info >= (3, )
if is_pypy or is_pure or py3k:
if is_pypy or is_pyston or is_pure or py3k:
ext_modules = []
else:
ext_modules=[Extension("Acquisition._Acquisition",
......@@ -41,7 +46,7 @@ else:
setup(
name='Acquisition',
version='4.2.2',
version='2.13.9',
url='https://github.com/zopefoundation/Acquisition',
license='ZPL 2.1',
description="Acquisition is a mechanism that allows objects to obtain "
......@@ -69,8 +74,10 @@ setup(
"Programming Language :: Python :: Implementation :: PyPy",
],
ext_modules=ext_modules,
# Pyston change: due to we switched to pure Python implementation.
# The version of ExtensionClass is not important any more.
install_requires=[
'ExtensionClass >= 4.1.1',
'ExtensionClass<4.0.dev',
'zope.interface',
],
include_package_data=True,
......
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