Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-93939: Build most shared extensions without setup.py #93940

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ LIBEXPAT_HEADERS= \
# Default target
all: @DEF_MAKE_ALL_RULE@
build_all: check-clean-src $(BUILDPYTHON) platform oldsharedmods sharedmods \
gdbhooks Programs/_testembed scripts
build_wasm: check-clean-src $(BUILDPYTHON) platform oldsharedmods python-config
gdbhooks Programs/_testembed scripts checkoldsharedmods
build_wasm: check-clean-src $(BUILDPYTHON) platform oldsharedmods python-config checkoldsharedmods

# Check that the source is clean when building out of source.
check-clean-src:
Expand Down Expand Up @@ -909,7 +909,7 @@ $(LIBEXPAT_A): $(LIBEXPAT_OBJS)
# create relative links from build/lib.platform/egg.so to Modules/egg.so
# pybuilddir.txt is created too late. We cannot use it in Makefile
# targets. ln --relative is not portable.
oldsharedmods: $(SHAREDMODS) pybuilddir.txt
oldsharedmods: $(SHAREDMODS) $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt
@target=`cat pybuilddir.txt`; \
$(MKDIR_P) $$target; \
for mod in X $(SHAREDMODS); do \
Expand All @@ -918,6 +918,9 @@ oldsharedmods: $(SHAREDMODS) pybuilddir.txt
fi; \
done

checkoldsharedmods: oldsharedmods $(BUILDPYTHON)
@$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/check_modules.py

Modules/Setup.local:
@# Create empty Setup.local when file was deleted by user
echo "# Edit this file for local setup changes" > $@
Expand All @@ -938,7 +941,7 @@ Makefile Modules/config.c: Makefile.pre \
$(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
-s Modules \
Modules/Setup.local \
@MODULES_SETUP_STDLIB@ \
Modules/Setup.stdlib \
Modules/Setup.bootstrap \
$(srcdir)/Modules/Setup
@mv config.c Modules
Expand Down Expand Up @@ -2531,7 +2534,8 @@ update-config:
Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h

# Declare targets that aren't real files
.PHONY: all build_all build_wasm sharedmods check-clean-src oldsharedmods test quicktest
.PHONY: all build_all build_wasm sharedmods check-clean-src oldsharedmods
.PHONY: checkoldsharedmods test quicktest
.PHONY: install altinstall oldsharedinstall bininstall altbininstall
.PHONY: maninstall libinstall inclinstall libainstall sharedinstall
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Most stdlib extension modules are now built by ``configure`` and ``make``
instead of :mod:`distutils` and ``setup.py``.
2 changes: 1 addition & 1 deletion Modules/Setup.stdlib.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

# multiprocessing
@MODULE__POSIXSHMEM_TRUE@_posixshmem _multiprocessing/posixshmem.c
@MODULE__MULTIPROCESSING_TRUE@_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
@MODULE__MULTIPROCESSING_TRUE@_multiprocessing _multiprocessing/multiprocessing.c @MODULE__MULTIPROCESSING_SEMAPHORE_C@


############################################################################
Expand Down
Loading