summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2020-01-20 05:35:01 -0600
committerJason Madden <jamadden@gmail.com>2020-01-20 06:46:24 -0600
commit599821b61724e285d205a1abd84b091300c62e67 (patch)
tree2f6c51f6c78da30ca3e605c6719fea310827cf3c
parent944e79ae6ec5214323372e518b8198d9540ed992 (diff)
downloadzope-security-deprecated-setuptools-features.tar.gz
Drop the use of the deprecated setuptools Featuresdeprecated-setuptools-features
-rw-r--r--setup.py39
1 files changed, 17 insertions, 22 deletions
diff --git a/setup.py b/setup.py
index 91b59c6..7cc5f70 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,6 @@ from setuptools import Extension
from setuptools.command.build_ext import build_ext
from setuptools import find_packages
from setuptools import setup
-from setuptools import Feature
class optional_build_ext(build_ext):
"""This class subclasses build_ext and allows
@@ -87,22 +86,19 @@ class ModuleHeaderDir(object):
include = [ModuleHeaderDir('zope.proxy')]
-codeoptimization = Feature(
- "Optional code optimizations",
- standard=True,
- ext_modules=[
- Extension(
- "zope.security._proxy",
- [os.path.join('src', 'zope', 'security', "_proxy.c")],
- include_dirs=include,
- ),
- Extension(
- "zope.security._zope_security_checker",
- [os.path.join('src', 'zope', 'security',
- "_zope_security_checker.c")]
- ),
- ]
-)
+codeoptimization = [
+ Extension(
+ "zope.security._proxy",
+ [os.path.join('src', 'zope', 'security', "_proxy.c")],
+ include_dirs=include,
+ ),
+ Extension(
+ "zope.security._zope_security_checker",
+ [os.path.join('src', 'zope', 'security',
+ "_zope_security_checker.c")]
+ ),
+]
+
# Jython cannot build the C optimizations, while on PyPy they are
# anti-optimizations (the C extension compatibility layer is known-slow,
@@ -114,12 +110,11 @@ is_jython = 'java' in sys.platform
if is_pypy or is_jython:
setup_requires = []
- features = {}
+ ext_modules = []
else:
setup_requires = ['zope.proxy >= 4.3.0']
- features = {
- 'codeoptimization': codeoptimization,
- }
+ ext_modules = codeoptimization
+
TESTS_REQUIRE = [
'BTrees',
@@ -171,7 +166,7 @@ setup(name='zope.security',
cmdclass={
'build_ext': optional_build_ext,
},
- features=features,
+ ext_modules=ext_modules,
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
install_requires=[
'setuptools',