bpo-45847: Port fcntl to Py_STDLIB_MOD (GH-29696)

Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
Erlend Egeberg Aasland 2021-11-22 14:02:27 +01:00 committed by GitHub
parent 29699a2a2a
commit 5b946cadaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 28 deletions

View file

@ -1030,12 +1030,7 @@ class PyBuildExt(build_ext):
# supported...)
# fcntl(2) and ioctl(2)
libs = []
if (self.config_h_vars.get('FLOCK_NEEDS_LIBBSD', False)):
# May be necessary on AIX for flock function
libs = ['bsd']
self.add(Extension('fcntl', ['fcntlmodule.c'],
libraries=libs))
self.addext(Extension('fcntl', ['fcntlmodule.c']))
# grp(3)
self.addext(Extension('grp', ['grpmodule.c']))
self.addext(Extension('spwd', ['spwdmodule.c']))