Skip to main content

Pre-built SDL2 binaries for PySDL2

Project description

pysdl2-dll

Build Status Build Status

pysdl2-dll is a Python package that bundles the SDL2 binaries in pip-installable form for macOS and Windows, making it easier to create and run scripts/packages that use the PySDL2 library.

It uses the official SDL2, SDL2_mixer, SDL2_ttf, and SDL2_image binaries for macOS and Windows, as well as unofficial SDL2_gfx binaries for the same platforms. For Linux, the SDL2 binaries and their dependencies are all built from source using the official Python manylinux images for maximum compatibility.

The latest release includes the following versions of the SDL2 binaries:

SDL2 SDL2_ttf SDL2_mixer SDL2_image SDL2_gfx
2.0.22 2.20.0 2.6.0 2.6.0 1.0.4

Installation

You can install the latest version of pysdl2-dll via pip:

pip install pysdl2-dll # install latest release version

Requirements

At present, the following platforms are supported:

  • macOS (10.7+, 64-bit x86)
  • macOS (11.0+, 64-bit ARM)
  • Windows (32-bit x86)
  • Windows (64-bit x86)
  • Linux (32-bit x86)
  • Linux (64-bit x86)
  • Linux (64-bit ARM)

The pysdl2-dll package can be installed on platforms other than the ones listed above, but it won't have any effect.

pysdl2-dll requires PySDL2 0.9.7 or later in order to work correctly on macOS, and for PySDL2 to load the binaries automatically when available. To update to the latest PySDL2, you can run:

pip install -U pysdl2

Because the wheels are not built against any specfic version of Python, pysdl2-dll supports all versions and implementations of Python that are supported by PySDL2.

Note: As of pysdl2-dll 2.0.22.post1, the macOS binaries no longer have built-in support for the WebP image format in SDL_image or the Modplug, Opus, or native MIDI backends in SDL_mixer. This is due to changes in the official macOS binaries from the libSDL team, which will hopefully be brought back to full feature parity with the official Windows binaries in a future release.

Linux Requirements

There are currently two versions the Linux wheels: "legacy" wheels based on the manylinux2014 standard (for 32-bit and 64-bit x86), and "modern" wheels based on the manylinux_2_24 standard (for 64-bit x86 and 64-bit ARM only). The manylinux_2_24 SDL2 binaries require a more recent version of Linux, but offer dynamic support for additional features such as Wayland windowing, Pipewire/sndio/JACK audio, and OpenGL ES v1 rendering.

You must have pip 19.3 or newer to install the manylinux2014 wheels, and pip 20.3 or newer to install the manylinux_2_24 wheels. Distributions that use musl C instead of glibc (e.g. Alpine Linux) are not supported.

Note: pysdl2-dll is currently not built with libdecor support, meaning that native Wayland (non-XWayland) window decorations will be unavailable when using these binaries (see issue #9 for details). Given that SDL2 defaults to using XWayland this shouldn't be an issue for most users, but suggestions and/or PRs to fix the issue are welcome!

Usage

If you are using PySDL2 0.9.7 or later, you don't need to do anything special to use the pysdl2-dll binaries in your project: PySDL2 will load them automatically (and print a message indicating such) if they are available. For older versions of PySDL2, you will need to import this module manually in your scripts (import sdl2dll) before PySDL2 is imported.

To override pysdl2-dll and use a different set of binaries, you can set the PYSDL2_DLL_PATH environment variable to the path of the folder containing the binaries you want to use instead, or alternatively set it to "system" to force PySDL2 to use the system install of SDL2 if available (e.g. SDL2 installed with brew on macOS).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysdl2-dll-2.0.22.post1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distributions

pysdl2_dll-2.0.22.post1-py2.py3-none-win_amd64.whl (2.5 MB view details)

Uploaded Python 2 Python 3 Windows x86-64

pysdl2_dll-2.0.22.post1-py2.py3-none-win32.whl (2.4 MB view details)

Uploaded Python 2 Python 3 Windows x86

pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_x86_64.whl (3.2 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.24+ x86-64

pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_aarch64.whl (2.8 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.24+ ARM64

pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_x86_64.whl (3.1 MB view details)

Uploaded Python 2 Python 3

pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_i686.whl (3.3 MB view details)

Uploaded Python 2 Python 3

pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_x86_64.whl (4.8 MB view details)

Uploaded Python 2 Python 3 macOS 10.7+ x86-64

pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_universal2.whl (4.8 MB view details)

Uploaded Python 2 Python 3 macOS 10.7+ universal2 (ARM64, x86-64)

File details

Details for the file pysdl2-dll-2.0.22.post1.tar.gz.

File metadata

  • Download URL: pysdl2-dll-2.0.22.post1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pysdl2-dll-2.0.22.post1.tar.gz
Algorithm Hash digest
SHA256 13502124b050403c62a00dcefec4178490ee98a9923d15aa52607d3ee033c50b
MD5 8f2b2ecdb42bc8a5eb955563e44394be
BLAKE2b-256 01c0461fb92c01a683bf142a7653a90fc9543e978c674b789158ea02f4155567

See more details on using hashes here.

File details

Details for the file pysdl2_dll-2.0.22.post1-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for pysdl2_dll-2.0.22.post1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e20071326d2c45e4868d82e6d7919425ea0e87a6496866df049a6556629a71c0
MD5 1afbb79a13be69629d7b5d48ff349041
BLAKE2b-256 df6f7ac2620add21658d2fdfb6035bd05c390f4555391fa80137bfe0d81a20f3

See more details on using hashes here.

File details

Details for the file pysdl2_dll-2.0.22.post1-py2.py3-none-win32.whl.

File metadata

File hashes

Hashes for pysdl2_dll-2.0.22.post1-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 6f44449a3c6d1103beb9766e1e54de7575dc4b2bf7dd15690543dc1c09662274
MD5 5d41838e41a66d7a163d838a55369323
BLAKE2b-256 adbb3d210e38aa025752b5b262dc389a845f54ab55c7078ffa0ee6bff724f725

See more details on using hashes here.

File details

Details for the file pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_x86_64.whl.

File metadata

  • Download URL: pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_x86_64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: Python 2, Python 3, manylinux: glibc 2.24+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 d80592eb4c9e067ad5b386c8d43bf46fdfb8c78c002001073c92d17499bb0827
MD5 956618f34d8fcf0ea685008169b4e214
BLAKE2b-256 c379fa76b7d5c84a3adb55f43f388e413c0805f8a9a33368647e0ebaeb619ef5

See more details on using hashes here.

File details

Details for the file pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_aarch64.whl.

File metadata

  • Download URL: pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_aarch64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 2, Python 3, manylinux: glibc 2.24+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 da4c764690b17d78cf7687ae07faa80a6bfc855727ff80e34156e8915de50b9f
MD5 76dbfc27f9066e24952a5f4cbe713b2e
BLAKE2b-256 8acf06f5f53671cb81852c98a1cf9150f0c9aeedef4a527c76a240385764a13b

See more details on using hashes here.

File details

Details for the file pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d767875309beeac2b1c9d3edfc0dd0d3c0a4f59944d9c50b1324c2d55f8d388b
MD5 f9ee84c12b030273ceb52e33ec1256b9
BLAKE2b-256 f45dff8e33870585121bf5b5bb94feda1b32cfc012d6dd418b6fef939b75d740

See more details on using hashes here.

File details

Details for the file pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_i686.whl.

File metadata

  • Download URL: pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_i686.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pysdl2_dll-2.0.22.post1-py2.py3-none-manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e484d9285f7ffad3666df1f73bf0083146ae23d6dc941bb7b49536ddcb1cdb8d
MD5 b659a706583d64d20d9fb3bc49241027
BLAKE2b-256 50c13ca10687c8ad1d9dd4842595d1e8b6bee27504921ad00f1ada2d7bc05a18

See more details on using hashes here.

File details

Details for the file pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: Python 2, Python 3, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e35d1700cbeaf65faa8d32ca088f33751f463bf4a0f917a470f84619a95018b7
MD5 45893cdf61c2e1a5d7709cc880386f23
BLAKE2b-256 f5d136493edf20724f5ce9552ff27f0e11f1f5b967301ed8509a5f3191337d7c

See more details on using hashes here.

File details

Details for the file pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_universal2.whl.

File metadata

  • Download URL: pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_universal2.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: Python 2, Python 3, macOS 10.7+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pysdl2_dll-2.0.22.post1-py2.py3-none-macosx_10_7_universal2.whl
Algorithm Hash digest
SHA256 764a3fb8fae5679f4773461430f85906e2d1c100c4fb5c16b9bbc9ae575d3d0f
MD5 1608799bdf905f4beb1f2361ddf555bc
BLAKE2b-256 94726d0959acc576902be04c02509b107a89965f5d5284f8497d43d34a7743b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page