]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Don't lookup the venv module for Python anymore
authorFred Morcos <fred.morcos@open-xchange.com>
Fri, 18 Aug 2023 19:09:53 +0000 (21:09 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:43 +0000 (13:28 +0100)
meson-archive/python-venv/meson.build [moved from meson/python-venv/meson.build with 100% similarity]
meson.build
meson/python/meson.build [new file with mode: 0644]

index 9f9ad309ef760f9183428da38eedb4d171e69816..0a771669cc104d632ba5a60c6bef542d18bc7986 100644 (file)
@@ -63,7 +63,7 @@ subdir('meson' / 'unit-tests')              # Unit Tests
 subdir('meson' / 'auth-backend-unit-tests') # Auth Backend Unit Tests
 subdir('meson' / 'reproducible')            # Reproducible Builds
 subdir('meson' / 'fuzz-targets')            # Fuzzing Targets
-subdir('meson' / 'python-venv')             # Python Venv
+subdir('meson' / 'python')                  # Python
 subdir('meson' / 'from-git')                # From Git
 subdir('meson' / 'dlopen')                  # dlopen
 subdir('meson' / 'verbose-logging')         # Verbose Logging
@@ -87,19 +87,19 @@ if not ragel.found() and not fs.exists('pdns' / 'dnslabeltext.cc')
 endif
 
 # Swagger
-if not fs.exists('pdns' / 'api-swagger.json') and not python_have_venv
-  error('Python3 and/or its venv module is not available and ' +
-        '`pdns/api-swagger.json` cannot be found. ' +
-        'The Authoritative Server cannot be built.')
-endif
+if not fs.exists('pdns' / 'api-swagger.json') and not python_have_venv
+  error('Python3 and/or its venv module is not available and ' +
+        '`pdns/api-swagger.json` cannot be found. ' +
+        'The Authoritative Server cannot be built.')
+endif
 # TODO Generate api-swagger.json
 
 # Manpages
-if not fs.exists('docs' / 'pdns_server.1') and not python_have_venv
-  warning('Python3 and/or its venv module is not available and ' +
-          '`docs/pdns_server.1` cannot be found. ' +
-          'Documentation will not be built.')
-endif
+if not fs.exists('docs' / 'pdns_server.1') and not python_have_venv
+  warning('Python3 and/or its venv module is not available and ' +
+          '`docs/pdns_server.1` cannot be found. ' +
+          'Documentation will not be built.')
+endif
 # TODO Generate pdns_server.1 manpage
 
 # Modules
diff --git a/meson/python/meson.build b/meson/python/meson.build
new file mode 100644 (file)
index 0000000..8655bee
--- /dev/null
@@ -0,0 +1,6 @@
+py = import('python')
+python_prog = py.find_installation('python3', required: false)
+
+summary('Python', python_prog.found(), bool_yn: true, section: 'Python')
+summary('Path', python_prog.full_path(), section: 'Python')
+summary('Version', python_prog.version(), section: 'Python')