[jhbuild/wip/hadess/auto-distutils] make: Add distutils detection for unknown modules
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/wip/hadess/auto-distutils] make: Add distutils detection for unknown modules
- Date: Thu, 4 Nov 2021 14:00:44 +0000 (UTC)
commit 4c9f3a5aae8b01c4d9fe83f695bd46a24f714071
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 4 14:59:43 2021 +0100
make: Add distutils detection for unknown modules
As a follow-up to 1aa92aed2e7431b247e09fe63e43fa85931f26c5, assume that
unknown modules with a "setup.py" file are Python3 distutils modules.
jhbuild/commands/make.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/commands/make.py b/jhbuild/commands/make.py
index 29e823ac..d44fa5be 100644
--- a/jhbuild/commands/make.py
+++ b/jhbuild/commands/make.py
@@ -88,8 +88,12 @@ class cmd_make(Command):
logging.error(_('No module matching current directory %r in the moduleset') % (modname, ))
return False
- # Try meson first, then autotools
- if os.path.exists(os.path.join(self.get_cwd(), 'meson.build')):
+ # Try distutils, then meson, then autotools
+ if os.path.exists(os.path.join(self.get_cwd(), 'setup.py')):
+ from jhbuild.modtypes.distutils import DistutilsModule
+ module = DistutilsModule(modname, default_repo.branch(modname))
+ module.python = os.environ.get('PYTHON3', 'python3')
+ elif os.path.exists(os.path.join(self.get_cwd(), 'meson.build')):
from jhbuild.modtypes.meson import MesonModule
module = MesonModule(modname, default_repo.branch(modname))
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]