Skip to content

Commit

Permalink
Drop the use of the deprecated setuptools Features
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Jan 20, 2020
1 parent 9d8b17c commit 1173e59
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
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):
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -120,7 +115,7 @@ def read(*rnames):
cmdclass={
'build_ext': optional_build_ext,
},
features=features,
ext_modules=ext_modules,
install_requires=[
'zope.interface',
'setuptools',
Expand Down

0 comments on commit 1173e59

Please sign in to comment.