Setup.py install deprecated, must use pip

Hello, while trying to update a flatpak for Gramps using Github Actions, I noticed that my workflow stopped working and found the following error:

========================================================================

Building module PILLOWDependency in /home/runner/work/flatpak/flatpak/.flatpak-builder/build/PILLOWDependency-1

========================================================================

Running: python3 setup.py install --prefix=/app

running install

/usr/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.

warnings.warn(

/usr/lib/python3.9/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.

I am using Gnome Platform 41 which has python 3.9. I do not want to use submodules since I have trouble getting them to work with Github Actions.

  1. Is pip going to be allowed in the flathub manifests?
  2. If not, what alternative is there for pip since the command “python3 setup.py install” no longer works with python 3.9?
  3. It looks like I need to go back to Gnome Platform 40 for now since it has an earlier version of python that still allows setup.py install?
  4. When is Gnome 40 going to be end of life?

The use of pip is allowed. Just use
pip3 install --no-deps --no-use-pep517 --prefix=$FLATPAK_DEST .
instead of calling the setup.py directly.

Thank you, that got me further along in adapting this flatpak with Gnome 41 and python 3.9 changes.