termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.96k stars 2.98k forks source link

[Package]: Pygame #10074

Closed T-Dynamos closed 2 years ago

T-Dynamos commented 2 years ago

Package description

pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL

Home page URL

https://github.com/pygame/pygame

Source code URL

https://github.com/pygame/pygame/archive/refs/tags/2.1.3.dev4.tar.gz

Packaging policy acknowledgement

Additional information

Yes works Screenshot_2022-04-12-07-18-16-506_com realvnc viewer android

We have to apply a patch https://github.com/pygame/pygame/blob/ac4ee56522bef7a1947287c5d4626ea0ec8174c8/buildconfig/config_unix.py#L237

            if "-auto" not in sys.argv:

To

            if "-auto"  in sys.argv:

Beacuse -auto option is not working I built with -config -auto -sdl2

captain0xff commented 2 years ago

This PR fixes the -auto problem https://github.com/pygame/pygame/pull/3119.

xtkoba commented 2 years ago

Now pip3 install pygame should work. Thanks.

xX7912Xx commented 1 year ago

try this: pkg update -y && \ pkg install -y x11-repo && \ pkg install -y python sdl2 sdl2-mixer sdl2-mixer-static sdl2-ttf sdl2-image sdl2-image-static freetype portmidi xorgproto fluidsynth && \ pip install pygame

ravener commented 1 year ago

Pygame is available in the termux-user-repository (tur)

$ pkg install tur-repo
$ pkg install python-pygame
RobertNissan commented 1 year ago

En termux

Traceback (most recent call last): File "/data/data/com.termux/files/home/downloads/python/game_misil/juego-python-ia-misiles/game.py", line 1, in import pygame ModuleNotFoundError: No module named 'pygame' …host ~/d/p/g/juego-python-ia-misiles (main) [1] pip3 install pygame Collecting pygame Using cached pygame-2.3.0.tar.gz (12.9 MB) Preparing metadata (setup.py) ... done Building wheels for collected packages: pygame Building wheel for pygame (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [16 lines of output] src_c/pypm.c:4767:81: error: incompatible function pointer types passing 'PtTimestamp ()(void)' (aka 'int ()(void)') to parameter of type 'PmTimeProcPtr' (aka 'int ()(void )') [-Wincompatible-function-pointer-types] __pyx_v_err = Pm_OpenInput((&pyx_v_self->midi), pyx_t_2, NULL, __pyx_t_3, (&Pt_Time), NULL); ^~~~~~ /data/data/com.termux/files/usr/include/portmidi.h:399:31: note: passing argument to parameter 'time_proc' here PmTimeProcPtr time_proc, ^ 1 error generated. --- For help with compilation see: https://www.pygame.org/wiki/Compilation To contribute to pygame development see: https://www.pygame.org/contribute.html --- error: command '/data/data/com.termux/files/usr/bin/aarch64-linux-android-clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pygame Running setup.py clean for pygame Failed to build pygame ERROR: Could not build wheels for pygame, which is required to install pyproject.toml-based projects

2096779623 commented 1 year ago

En termux

Try export CFLAGS+=" -Wno-incompatible-function-pointer-types" .