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()