Skip to content

Commit

Permalink
python: Fix distutils DeprecationWarning
Browse files Browse the repository at this point in the history
*** NOTE *** After reading through the PEP 632 writeup more
closely I don't think this is the right answer

The python distutils package is deprecated.  Utilize
cythonize instead.

	./setup.py:26: DeprecationWarning: The distutils
	package is deprecated and slated for removal in
	Python 3.12. Use setuptools or check PEP 632 [1] for
	potential alternatives

[1] https://peps.python.org/pep-0632/

Fixes: seccomp#372
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
  • Loading branch information
drakenclimber committed Mar 21, 2022
1 parent 5731dd9 commit 358c715
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize

setup(
name = "seccomp",
Expand All @@ -37,12 +37,9 @@
maintainer_email = "paul@paul-moore.com",
license = "LGPLv2.1",
platforms = "Linux",
cmdclass = {'build_ext': build_ext},
ext_modules = [
ext_modules = cythonize([
Extension("seccomp", ["seccomp.pyx"],
# unable to handle libtool libraries directly
extra_objects=["../.libs/libseccomp.a"],
# fix build warnings, see PEP 3123
extra_compile_args=["-fno-strict-aliasing"])
]
extra_objects=['../.libs/libseccomp.a']),
])
)

0 comments on commit 358c715

Please sign in to comment.