lxml: try to remove some quirky PYPATH stuff

In RepositoryExternal.mk, a system python automatically gets $PYPATH
added to $PYTHONPATH, but the internal one does not - this doesn't make
sense.

Try to remove it for system-case by fixing the one case that relies on
it and for which it was introduced in commit
84ef6d8254 to directly extend $PYTHONPATH
instead, which ought to work as long as it's not evaluated at global
scope and thereby avoids affecting all python invocations.

Change-Id: I4534f2be92b850dc01193cb1bb2e0a299a5152be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91748
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
This commit is contained in:
Michael Stahl
2020-04-06 14:33:15 +02:00
committed by Michael Stahl
parent fec598900f
commit d3a136dfb7
3 changed files with 2 additions and 3 deletions

View File

@@ -4023,7 +4023,6 @@ else
define gb_ExternalExecutable__register_python
$(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
$(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
endef

View File

@@ -24,7 +24,7 @@ $(call gb_ExternalProject_get_state_target,lxml,build): \
$(call gb_ExternalExecutable_get_dependencies,python)
$(call gb_Trace_StartRange,lxml,EXTERNAL)
$(call gb_ExternalProject_run,build,\
PYPATH=$${PYPATH:+$$PYPATH:}$(call gb_UnpackedTarball_get_dir,lxml)/install && \
export PYTHONPATH=$${PYTHONPATH:+$$PYTHONPATH:}$(call gb_UnpackedTarball_get_dir,lxml)/install && \
$(if $(PYTHON_FOR_BUILD), \
unset MACOSX_DEPLOYMENT_TARGET && , \
CFLAGS="$$CFLAGS -I$(call gb_UnpackedTarball_get_dir,python3)" && \

View File

@@ -98,7 +98,7 @@ endef
gb_UIConfig_INSTDIR := $(LIBO_SHARE_FOLDER)/config/soffice.cfg
ifneq ($(filter LXML,$(BUILD_TYPE)),)
gb_UIConfig_LXML_PATH := PYPATH=$${PYPATH:+$$PYPATH:}$(call gb_UnpackedTarball_get_dir,lxml)/install ;
gb_UIConfig_LXML_PATH := PYTHONPATH=$${PYTHONPATH:+$$PYTHONPATH:}$(call gb_UnpackedTarball_get_dir,lxml)/install ;
gb_UIConfig_LXML_TARGET := $(call gb_ExternalProject_get_target,lxml)
endif
gb_UIConfig_gla11y_SCRIPT := $(SRCDIR)/bin/gla11y