summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-11-22 16:58:43 +0200
committerGitHub <noreply@github.com>2021-11-22 15:58:43 +0100
commit0e1c2f3ef84572b79fa7d8498a69bc5a56ff0d8d (patch)
tree1e6388cb547337a73ce3050d4d21fdaca7d32aaa /setup.py
parent4fad314246399b69ef0c57ba8527d9efade99069 (diff)
downloadcpython-git-0e1c2f3ef84572b79fa7d8498a69bc5a56ff0d8d.tar.gz
bpo-45847: port _struct to PY_STDLIB_MOD (GH-29706)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 139847c87e..a3aa787a1b 100644
--- a/setup.py
+++ b/setup.py
@@ -1023,6 +1023,7 @@ class PyBuildExt(build_ext):
self.addext(Extension("_queue", ["_queuemodule.c"]))
self.addext(Extension("_statistics", ["_statisticsmodule.c"]))
+ self.addext(Extension("_struct", ["_struct.c"]))
self.addext(Extension("_typing", ["_typingmodule.c"]))
# Modules with some UNIX dependencies -- on by default:
@@ -1446,6 +1447,9 @@ class PyBuildExt(build_ext):
self.missing.append('_uuid')
def detect_modules(self):
+ # remove dummy extension
+ self.extensions = []
+
self.configure_compiler()
self.init_inc_lib_dirs()
@@ -2100,9 +2104,9 @@ def main():
'build_scripts': PyBuildScripts,
'install': PyBuildInstall,
'install_lib': PyBuildInstallLib},
- # The struct module is defined here, because build_ext won't be
+ # A dummy module is defined here, because build_ext won't be
# called unless there's at least one extension module defined.
- ext_modules=[Extension('_struct', ['_struct.c'])],
+ ext_modules=[Extension('_dummy', ['_dummy.c'])],
# If you change the scripts installed here, you also need to
# check the PyBuildScripts command above, and change the links