mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-08 07:56:16 -05:00
8ce96d8447
This is something Fedora already does since 2010, so it should be safe, and saves a lot of space. * gnu/packages/patches/python-2.7-no-static-lib.patch: New file. * gnu/packages/patches/python-3-no-static-lib.patch: New file. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/python.scm (python-2.7, python-3): Use them.
70 lines
2.5 KiB
Diff
70 lines
2.5 KiB
Diff
From 92e2dcace7a3c02289b314238c5f18caec659ff1 Mon Sep 17 00:00:00 2001
|
|
From: Julien Lepiller <julien@lepiller.eu>
|
|
Date: Sat, 5 Jun 2021 12:41:47 +0200
|
|
Subject: [PATCH] No static lib.
|
|
|
|
This patch is adapted from Fedora. The original patch did not apply
|
|
because of whitespace changes.
|
|
|
|
00111 #
|
|
Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
|
|
a libpythonMAJOR.MINOR.a (bug 550692):
|
|
Downstream only: not appropriate for upstream
|
|
---
|
|
Makefile.pre.in | 26 +-------------------------
|
|
1 file changed, 1 insertion(+), 25 deletions(-)
|
|
|
|
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
|
index 6239fc3..948f196 100644
|
|
--- a/Makefile.pre.in
|
|
+++ b/Makefile.pre.in
|
|
@@ -486,7 +486,7 @@ coverage-report: regen-grammar
|
|
|
|
|
|
# Build the interpreter
|
|
-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
|
|
+$(BUILDPYTHON): Modules/python.o $(LDLIBRARY)
|
|
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
|
|
Modules/python.o \
|
|
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
|
@@ -527,18 +527,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
|
|
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
|
|
$(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
|
|
|
|
-# Build static library
|
|
-# avoid long command lines, same as LIBRARY_OBJS
|
|
-$(LIBRARY): $(LIBRARY_OBJS)
|
|
- -rm -f $@
|
|
- $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
|
|
- $(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
|
|
- $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
|
|
- $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS)
|
|
- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
|
|
- $(AR) $(ARFLAGS) $@ $(MODOBJS)
|
|
- $(RANLIB) $@
|
|
-
|
|
libpython$(VERSION).so: $(LIBRARY_OBJS)
|
|
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
|
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
|
|
@@ -1216,18 +1204,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
|
|
else true; \
|
|
fi; \
|
|
done
|
|
- @if test -d $(LIBRARY); then :; else \
|
|
- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
|
|
- if test "$(SO)" = .dll; then \
|
|
- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
|
|
- else \
|
|
- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
|
|
- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
|
|
- fi; \
|
|
- else \
|
|
- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
|
|
- fi; \
|
|
- fi
|
|
$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
|
|
$(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
|
|
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
|
|
--
|
|
2.31.1
|
|
|