Using flatpak-pip-generator for pip dependencies

I am using a third party library that my application is building from source. This library uses pip install --upgrade libcland swing to get libclang and swing. While its easy to use the flatpak-pip-generator result for libclang, doing the same for swig gives me multiple ModuleNotFoundErrors which I tried resolving by using flatpak-pip-generator on those not found modules.
Now after 2 modules (seemingly dependencies of swig), namely scikit-build and setuptools_scm, I get this output:

-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/pip-install-ul0u5_8j/swig_22c38520f49f456eb23dd9a01eafe6d8/_skbuild/linux-x86_64-3.10/cmake-build
[1/25] Creating directories for 'BISON-bin'
[2/25] Creating directories for 'PCRE2'
[3/25] No download step for 'BISON-bin'
[4/25] No update step for 'BISON-bin'
[5/25] No patch step for 'BISON-bin'
[6/25] No configure step for 'BISON-bin'
[7/25] No build step for 'BISON-bin'
[8/25] No install step for 'BISON-bin'
[9/25] Completed 'BISON-bin'
[10/25] Performing download step (download, verify and extract) for 'PCRE2'
FAILED: PCRE2-prefix/src/PCRE2-stamp/PCRE2-download /tmp/pip-install-ul0u5_8j/swig_22c38520f49f456eb23dd9a01eafe6d8/_skbuild/linux-x86_64-3.10/cmake-build/PCRE2-prefix/src/PCRE2-stamp/PCRE2-download
cd /tmp/pip-install-ul0u5_8j/swig_22c38520f49f456eb23dd9a01eafe6d8/_skbuild/linux-x86_64-3.10/cmake-build && /usr/bin/cmake -P /tmp/pip-install-ul0u5_8j/swig_22c38520f49f456eb23dd9a01eafe6d8/_skbuild/linux-x86_64-3.10/cmake-build/PCRE2-prefix/src/PCRE2-stamp/download-PCRE2.cmake && /usr/bin/cmake -P /tmp/pip-install-ul0u5_8j/swig_22c38520f49f456eb23dd9a01eafe6d8/_skbuild/linux-x86_64-3.10/cmake-build/PCRE2-prefix/src/PCRE2-stamp/verify-PCRE2.cmake && /usr/bin/cmake -P /tmp/pip-install-ul0u5_8j/swig_22c38520f49f456eb23dd9a01eafe6d8/_skbuild/linux-x86_64-3.10/cmake-build/PCRE2-prefix/src/PCRE2-stamp/extract-PCRE2.cmake && /usr/bin/cmake -E touch /tmp/pip-install-ul0u5_8j/swig_22c38520f49f456eb23dd9a01eafe6d8/_skbuild/linux-x86_64-3.10/cmake-build/PCRE2-prefix/src/PCRE2-stamp/PCRE2-download
-- Downloading...
dst='/tmp/pip-install-ul0u5_8j/swig_22c38520f49f456eb23dd9a01eafe6d8/_skbuild/linux-x86_64-3.10/cmake-build/PCRE2-prefix/src/pcre2-10.40.zip'
timeout='none'
inactivity timeout='none'
-- Using src='https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip'
-- Retrying...
-- Using src='https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip'
-- Retry after 5 seconds (attempt #2) ...
-- Using src='https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip'
-- Retry after 5 seconds (attempt #3) ...
-- Using src='https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip'
-- Retry after 15 seconds (attempt #4) ...
-- Using src='https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip'
-- Retry after 60 seconds (attempt #5) ...
-- Using src='https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip'
CMake Error at PCRE2-prefix/src/PCRE2-stamp/download-PCRE2.cmake:170 (message):
Each download failed!

error: downloading 'https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
getaddrinfo(3) failed for github.com:443

Could not resolve host: github.com

Closing connection 0



--- LOG END ---
error: downloading 'https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
getaddrinfo(3) failed for github.com:443

Could not resolve host: github.com

Closing connection 0



--- LOG END ---
error: downloading 'https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
getaddrinfo(3) failed for github.com:443

Could not resolve host: github.com

Closing connection 0



--- LOG END ---
error: downloading 'https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
getaddrinfo(3) failed for github.com:443

Could not resolve host: github.com

Closing connection 0



--- LOG END ---
error: downloading 'https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:
--- LOG BEGIN ---
getaddrinfo(3) failed for github.com:443

Could not resolve host: github.com

Closing connection 0



--- LOG END ---
error: downloading 'https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip' failed
status_code: 6
status_string: "Couldn't resolve host name"
log:

Which (to me) looks like one of the dependencies of swig tries to download something, which fails since its (from what I know) not possible to download stuff from the internet from within the manifest.

My manifest file currently looks like this:

app-id: com.librumreader.librum
runtime: org.kde.Platform
runtime-version: '6.5'
sdk: org.kde.Sdk
command: librum
finish-args:
- --share=ipc
- --share=network
- --socket=x11
- --socket=wayland
- --filesystem=host
- --device=dri
modules:
- python3-setuptools_scm.yaml
- python3-scikit-build.yaml
- python3-swig.yaml
- python3-libclang.yaml
- name: librum-bin
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_TESTS=Off
sources:
- type: git
branch: main
url: https://github.com/Librum-Reader/Librum.git
- name: file-install
buildsystem: simple
build-commands:
- install -Dm644 librum.desktop -t /app/share/applications
# - install -Dm644 data/com.librumreader.librum.metainfo.xml -t /app/share/metainfo
- install -Dm644 src/logo.svg -t /app/share/icons/hicolor/scalable/apps
- mv /app/share/icons/hicolor/scalable/apps/logo.svg /app/share/icons/hicolor/scalable/apps/librum.svg

(The formatting got a little messed up while copy-pasting it).

What exactly did I do wrong, and how can I achieve what I want?