1
Fork 0

Install libpythonX.Y.a in /usr/lib instead of /usr/lib/pythonX.Y/config.

https://bugs.gentoo.org/show_bug.cgi?id=252372
https://bugs.python.org/issue6103
This commit is contained in:
Mike Gilbert 2018-06-17 11:14:43 -04:00 committed by Nedko Arnaudov
parent 6a01d52879
commit 10879e3900
3 changed files with 14 additions and 17 deletions

View File

@ -1018,6 +1018,19 @@ altbininstall: $(BUILDPYTHON)
fi; \
else true; \
fi
@if test -f $(LIBRARY) && test $(LIBRARY) != $(LDLIBRARY); then \
if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
if test "$(SO)" = .dll; then \
$(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR); \
else \
$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR); \
$(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY); \
fi; \
else \
echo "Skipped install of $(LIBRARY) - use make frameworkinstall"; \
fi; \
else true; \
fi
# Install the versioned manual page
altmaninstall:
@ -1216,18 +1229,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

View File

@ -47,11 +47,7 @@ for opt in opt_flags:
libs = ['-lpython' + pyver]
libs += getvar('LIBS').split()
libs += getvar('SYSLIBS').split()
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
# shared library in prefix/lib/.
if opt == '--ldflags':
if not getvar('Py_ENABLE_SHARED'):
libs.insert(0, '-L' + getvar('LIBPL'))
if not getvar('PYTHONFRAMEWORK'):
libs.extend(getvar('LINKFORSHARED').split())
print ' '.join(libs)

View File

@ -89,7 +89,7 @@ CYGWIN*) if test $libdir = .
then
ExtraLibDir=.
else
ExtraLibDir='$(LIBPL)'
ExtraLibDir='$(LIBDIR)'
fi
ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
esac