diff --git a/Makefile.pre.in b/Makefile.pre.in --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1142,7 +1142,6 @@ test/test_asyncio \ collections concurrent concurrent/futures encodings \ email email/mime test/test_email test/test_email/data \ - ensurepip ensurepip/_bundled \ html json test/test_json http dbm xmlrpc \ sqlite3 sqlite3/test \ logging csv wsgiref urllib \ @@ -1159,7 +1158,8 @@ multiprocessing multiprocessing/dummy \ unittest unittest/test unittest/test/testmock \ venv venv/scripts venv/scripts/posix \ - curses pydoc_data $(MACHDEPS) + curses pydoc_data $(MACHDEPS) \ + @ENSUREPIP_DIRS@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -4794,6 +4794,12 @@ [AC_MSG_ERROR([--with-ensurepip=upgrade|install|no])]) AC_MSG_RESULT($ENSUREPIP) AC_SUBST(ENSUREPIP) +if test "$with_ensurepip" = no; then + ENSUREPIP_DIRS="" +else + ENSUREPIP_DIRS="ensurepip ensurepip/_bundled" +fi +AC_SUBST(ENSUREPIP_DIRS) # generate output files AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)