external/python3/ExternalProject_python3.mk | 1 - pyuno/Module_pyuno.mk | 1 + pyuno/PythonTest_pyuno_pytests_testvenv.mk | 16 ++++++++++++++++ pyuno/qa/pytests/testvenv.py | 14 ++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-)
New commits: commit dcd517331c8db63fee75b1519608e9ca94a491bb Author: Xisco Fauli <[email protected]> AuthorDate: Tue Sep 23 12:24:46 2025 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Sep 23 14:18:34 2025 +0200 related tdf#168511: bundle venv on mac too + Add test I missed it in commit dd8c42bf4b6eb5f692bb929547f69a9aedcf6c0c Author: Xisco Fauli <[email protected]> Date: Tue Sep 23 10:07:26 2025 +0200 tdf#168511: python3: bundle venv Change-Id: I180df8df27ece92aaa1feca379d280ff3f1ba2de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191392 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index bed5ffe71792..af49f9bdd081 100644 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -209,7 +209,6 @@ $(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : $(c rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/tkinter rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/turtledemo rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test - rm -r $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/venv # Then the binary libraries rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_dbm.$(python3_EXTENSION_MODULE_SUFFIX).so rm $(python3_fw_prefix)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_sqlite3.$(python3_EXTENSION_MODULE_SUFFIX).so diff --git a/pyuno/Module_pyuno.mk b/pyuno/Module_pyuno.mk index 804163ea4db0..7cf679bafdc6 100644 --- a/pyuno/Module_pyuno.mk +++ b/pyuno/Module_pyuno.mk @@ -49,6 +49,7 @@ $(eval $(call gb_Module_add_check_targets,pyuno, \ PythonTest_pyuno_pytests_testbz2 \ PythonTest_pyuno_pytests_testpip \ PythonTest_pyuno_pytests_testsetuptools \ + PythonTest_pyuno_pytests_testvenv \ )) endif # !SYSTEM_PYTHON diff --git a/pyuno/PythonTest_pyuno_pytests_testvenv.mk b/pyuno/PythonTest_pyuno_pytests_testvenv.mk new file mode 100644 index 000000000000..26eaf99aed30 --- /dev/null +++ b/pyuno/PythonTest_pyuno_pytests_testvenv.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_PythonTest_PythonTest,pyuno_pytests_testvenv)) + +$(eval $(call gb_PythonTest_add_modules,pyuno_pytests_testvenv,$(SRCDIR)/pyuno/qa/pytests,\ + testvenv \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/qa/pytests/testvenv.py b/pyuno/qa/pytests/testvenv.py new file mode 100644 index 000000000000..2a72dfd4a9d7 --- /dev/null +++ b/pyuno/qa/pytests/testvenv.py @@ -0,0 +1,14 @@ +import os +import unittest + +# I want to ensure that import venv works on all platforms +class VENVTest(unittest.TestCase): + def test_venv_import(self): + import venv + + # use imported venv module for pyflakes + with open(os.devnull, "w") as devnull: + print(str(venv), file=devnull) + +if __name__ == '__main__': + unittest.main()
