From f66594f36b9a7c91afddabec107a20aa42de4ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 11 Jun 2019 11:43:18 +0200 Subject: [PATCH] python: setuptools why are you so flimsy. --- src/python/setup.py.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/python/setup.py.cmake b/src/python/setup.py.cmake index f6992d9..994f373 100644 --- a/src/python/setup.py.cmake +++ b/src/python/setup.py.cmake @@ -68,8 +68,11 @@ setup( package_dir={ # Explicitly supply package_dir so importing this file from another # setup.py (i.e., when this is a bundled dependency of another project) - # does the right thing - '.': os.path.dirname(__file__) + # does the right thing. Can't use '': because that doesn't work when + # executing setup.py directly, can't use '.': because that doesn't work + # when executing setup.py from another setup, so need to list all + # packages explicitly. + i: os.path.join(os.path.dirname(__file__), i.replace('.', '/')) for i in packages }, cmdclass={ 'build_ext': TheExtensionIsAlreadyBuiltWhyThisHasToBeSoDamnComplicated