]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: Separate python for apidocfiles and the BIND DNSSEC schema
authorFred Morcos <fred.morcos@open-xchange.com>
Wed, 30 Aug 2023 21:29:20 +0000 (23:29 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:49 +0000 (13:28 +0100)
meson.build
meson/python/meson.build [deleted file]
pdns/meson.build

index 7f04c9136b12a51fe7a4015a4b5a0de6105f5b97..80f926c65a8dab8e5d6410fc759db41c3b11ba5a 100644 (file)
@@ -64,7 +64,6 @@ 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')                  # Python
 subdir('meson' / 'dlopen')                  # dlopen
 subdir('meson' / 'verbose-logging')         # Verbose Logging
 subdir('meson' / 'pkcs11')                  # PKCS11
diff --git a/meson/python/meson.build b/meson/python/meson.build
deleted file mode 100644 (file)
index ae1f72a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-py = import('python')
-python_prog = py.find_installation(
-  'python3',
-  modules: from_git ? ['yaml'] : [],
-  required: from_git,
-)
-
-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')
index 2e9213c144446072a319f8117000e7fcbeeeb917..5633f6b46417178c4a7cb2fc6564edf30a64426a 100644 (file)
@@ -305,12 +305,19 @@ libpdns = declare_dependency(
   )
 )
 
-libpdns_auth_api_swagger = 'apidocfiles.h'
-if not fs.is_file('apidocfiles.h')
-  libpdns_auth_api_swagger = custom_target(
-    'pdns-auth-api-swagger',
+libpdns_auth_apidocfiles_h = 'apidocfiles.h'
+if not fs.is_file(libpdns_auth_apidocfiles_h)
+  py = import('python')
+  python = py.find_installation('python3', modules: 'yaml', required: true)
+
+  summary('Python', python.found(), bool_yn: true, section: 'Swagger API')
+  summary('Path', python.full_path(), section: 'Swagger API')
+  summary('Version', python.version(), section: 'Swagger API')
+
+  libpdns_auth_apidocfiles_h = custom_target(
+    'pdns-auth-apidocfiles-h',
     command: [
-      python_prog,
+      python,
       '@INPUT0@',
       '@INPUT1@',
     ],
@@ -322,8 +329,8 @@ if not fs.is_file('apidocfiles.h')
     capture: true,
   )
 endif
-libpdns_auth_api_swagger = declare_dependency(
-  sources: [libpdns_auth_api_swagger],
+libpdns_auth_apidocfiles_h = declare_dependency(
+  sources: [libpdns_auth_apidocfiles_h],
 )
 
 libpdns_auth_main = declare_dependency(
@@ -387,18 +394,25 @@ libpdns_auth = declare_dependency(
     ],
     dependencies: [
       deps,
-      libpdns_auth_api_swagger,
+      libpdns_auth_apidocfiles_h,
       libpdns_auth_lua,
     ],
   )
 )
 
-libpdns_bind_dnssec_schema = 'bind-dnssec.schema.sqlite3.sql.h'
-if not fs.is_file('bind-dnssec.schema.sqlite3.sql.h')
-  libpdns_bind_dnssec_schema = custom_target(
+libpdns_bind_dnssec_schema_h = 'bind-dnssec.schema.sqlite3.sql.h'
+if not fs.is_file(libpdns_bind_dnssec_schema_h)
+  py = import('python')
+  python = py.find_installation('python3', required: true)
+
+  summary('Python', python.found(), bool_yn: true, section: 'BIND DNSSEC Schema')
+  summary('Path', python.full_path(), section: 'BIND DNSSEC Schema')
+  summary('Version', python.version(), section: 'BIND DNSSEC Schema')
+
+  libpdns_bind_dnssec_schema_h = custom_target(
     'pdns-bind-dnssec-schema',
     command: [
-      python_prog,
+      python,
       '@INPUT0@',
       '@INPUT1@',
     ],
@@ -410,8 +424,8 @@ if not fs.is_file('bind-dnssec.schema.sqlite3.sql.h')
     capture: true,
   )
 endif
-libpdns_bind_dnssec_schema = declare_dependency(
-  sources: [libpdns_bind_dnssec_schema],
+libpdns_bind_dnssec_schema_h = declare_dependency(
+  sources: [libpdns_bind_dnssec_schema_h],
 )
 
 libpdns_ipcipher = dependency('', required: false)
@@ -435,7 +449,7 @@ libpdns_util = declare_dependency(
     ],
     dependencies: [
       deps,
-      libpdns_bind_dnssec_schema,
+      libpdns_bind_dnssec_schema_h,
       libpdns_ipcipher,
     ],
   )