From d0c647e54b05046adb68c62ee19e4b19584965a3 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Mon, 19 Aug 2024 10:35:34 +0200
Subject: [PATCH] [ci] Fix publish wheels job.

---
 Applications/Python/ogs/__init__.py | 1 +
 scripts/ci/jobs/build-wheels.yml    | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Applications/Python/ogs/__init__.py b/Applications/Python/ogs/__init__.py
index d01cbecd5bf..9cc66c4af5b 100644
--- a/Applications/Python/ogs/__init__.py
+++ b/Applications/Python/ogs/__init__.py
@@ -10,4 +10,5 @@ if "PEP517_BUILD_BACKEND" in os.environ:
     if config_spec is not None:
         from .config import *  # noqa: F403
 else:
+    print(os.environ)
     from .config import *  # noqa: F403
diff --git a/scripts/ci/jobs/build-wheels.yml b/scripts/ci/jobs/build-wheels.yml
index c8c1199ab09..b414318c1d2 100644
--- a/scripts/ci/jobs/build-wheels.yml
+++ b/scripts/ci/jobs/build-wheels.yml
@@ -77,7 +77,7 @@ publish wheels:
     - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
     - when: never
   script:
-    - pipx run build --sdist --outdir wheelhouse
+    - PEP517_BUILD_BACKEND=1 pipx run build --sdist --outdir wheelhouse
     - >
       pipx run twine upload
       ${PYPI_REPO}
@@ -92,7 +92,7 @@ publish wheels to pypi (dev):
     - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
       when: manual
   script:
-    - pipx run build --sdist --outdir wheelhouse
+    - PEP517_BUILD_BACKEND=1 pipx run build --sdist --outdir wheelhouse
     - >
       pipx run twine upload --repository pypi
       --username __token__ --password ${PYPI_TOKEN}
-- 
GitLab