Note: This procedure has been tested with Fedora 39.

1. Make sure the ``rpmfusion-free-release`` repository has been added (so we can add RPM Sphere repository)


sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

See the RPM Fusion docs for additional information.


2. Install the ``rpmsphere-release`` package to add the RPM Sphere repository (so we can install "smpeg-devel")


sudo dnf install https://github.com/rpmsphere/noarch/raw/master/r/rpmsphere-release-38-1.noarch.rpm


See pkgs.org and RPM Sphere for more information.

3. Install pygame dependencies

sudo yum install python-devel python3-cython numpy gcc dpkg-dev SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel SDL2-devel freetype-devel libjpeg-turbo-devel smpeg-devel portmidi-devel

4. Clone and build pygame

     git clone https://github.com/pygame/pygame.git
     cd pygame
     python3 setup.py -config -auto
     python3 setup.py build install --user