From 1173e599cea5c61cf61128e3470eb6e673d3d899 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Mon, 20 Jan 2020 05:38:37 -0600 Subject: Drop the use of the deprecated setuptools Features --- setup.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/setup.py b/setup.py index 5a1be61..9c14571 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ from distutils.errors import DistutilsPlatformError from setuptools import Extension from setuptools.command.build_ext import build_ext from setuptools import setup -from setuptools import Feature + class optional_build_ext(build_ext): @@ -64,24 +64,19 @@ def read(*rnames): return f.read() -Cwrapper = Feature( - "C wrapper", - standard=True, - 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")], - ), - ], -) +codeoptimization = [ + Extension( + "zope.proxy._zope_proxy_proxy", + [os.path.join('src', 'zope', 'proxy', "_zope_proxy_proxy.c")], + ), +] # PyPy won't build the extension. is_pypy = platform.python_implementation() == 'PyPy' if is_pypy: - features = {} + ext_modules = [] else: - features = {'Cwrapper': Cwrapper} + ext_modules = codeoptimization setup(name='zope.proxy', version='4.3.4.dev0', @@ -120,7 +115,7 @@ setup(name='zope.proxy', cmdclass={ 'build_ext': optional_build_ext, }, - features=features, + ext_modules=ext_modules, install_requires=[ 'zope.interface', 'setuptools', -- cgit v1.2.1 From 1c3670350243fd643ef45543489f801790c43940 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Mon, 20 Jan 2020 07:01:35 -0600 Subject: Restore installation of the proxy.h header. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 9c14571..1d3eea9 100644 --- a/setup.py +++ b/setup.py @@ -115,6 +115,7 @@ setup(name='zope.proxy', cmdclass={ 'build_ext': optional_build_ext, }, + headers=[os.path.join('src', 'zope', 'proxy', 'proxy.h')], ext_modules=ext_modules, install_requires=[ 'zope.interface', -- cgit v1.2.1