diff --git a/pyuno/Module_pyuno.mk b/pyuno/Module_pyuno.mk index fac159e2ced3..3a12fc68efac 100644 --- a/pyuno/Module_pyuno.mk +++ b/pyuno/Module_pyuno.mk @@ -51,6 +51,12 @@ $(eval $(call gb_Module_add_check_targets,pyuno, \ PythonTest_pyuno_pytests_testbz2 \ )) +ifeq ($(OS),MACOSX) +$(eval $(call gb_Module_add_check_targets,pyuno, \ + PythonTest_pyuno_pytests_testsetuptools \ +)) +endif + $(eval $(call gb_Module_add_subsequentcheck_targets,pyuno, \ PythonTest_pyuno_pytests_testcollections \ PythonTest_pyuno_pytests_insertremovecells \ diff --git a/pyuno/PythonTest_pyuno_pytests_testsetuptools.mk b/pyuno/PythonTest_pyuno_pytests_testsetuptools.mk new file mode 100644 index 000000000000..797aef2dac6c --- /dev/null +++ b/pyuno/PythonTest_pyuno_pytests_testsetuptools.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_testsetuptools)) + +$(eval $(call gb_PythonTest_add_modules,pyuno_pytests_testsetuptools,$(SRCDIR)/pyuno/qa/pytests,\ + testsetuptools \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/pyuno/qa/pytests/testsetuptools.py b/pyuno/qa/pytests/testsetuptools.py new file mode 100644 index 000000000000..9439a1216120 --- /dev/null +++ b/pyuno/qa/pytests/testsetuptools.py @@ -0,0 +1,14 @@ +import os +import unittest + +# tdf#161947: make sure importing setuptools works on all platforms +class SetupToolsTest(unittest.TestCase): + def test_setuptools_import(self): + import setuptools + + # use imported setuptools module for pyflakes + with open(os.devnull, "w") as devnull: + print(str(setuptools), file=devnull) + +if __name__ == '__main__': + unittest.main()