Skip to main content

A simple and easy-to-use library to enjoy videogames programming (written in C)

Project description

Raylib Package Template

This package template allows you to build wheel files for local installation.

Getting your package build-ready

As a template this package is missing the important stuff, like path configurations, the generated binding code and the binary files.

To get this done, please, follow the steps below.

1. Generate the binding code with your options and the right paths.

The first thing we need to set right is the path for the lib binaries.

The package is configured to allow 32 and 64 bit binaries to be loaded according to the system's architecture.

Looking to the package folder structure, you see the following disposition:

package/
    src/
        raylibpy/
            bin/
                32bit/
                64bit/
            __init__.py
    LICENCE
    pyproject.toml
    README.md

To set the path, make sure your Python binding is generated via CLI with the following congif:

--libBase "os.path.dirname(__file__), 'bin'"

Alternatively, you can change the input/raylib_api.bind.json file to set this value directly:

{
  "CONFIG": {
    "libBasedir": "os.path.dirname(__file__), 'bin'",
    // other options..
  }
  // other stuff...
}

This will ensure the correct library to be loaded regardless of the platform and architecture.

Having the binding code generated, put a copy of the file in the package/src folder and rename it to __init__.py

2. Copying the binary files

This repository does not hold any raylib binary, so you're expected to grab them in the C Raylib's reposity.

With the binaries in hand, just put them in the package/src/bin/* folder respective to the system architecture.

3. Building the python wheel file

To be able to build without troubles, is might be necessary to get Pip up to date.

First, let's upgrade Pip:

py -m pip install --upgrade pip

then:

py -m pip install --upgrade build

then, in the terminal, change to the package/ where pyproject.toml is located and:

py -m build

When the build in done, you see a new foder, dist/, under package/src.

Inside this folder there are 2 files, a *.tar.gz and a *.whl.

4. Installing the package

With the wheel package in hands, you're ready to install it with Pip:

py -m pip install path/to/the/wheel-file.whl

That's it! I hope you enjoy making games and whatnot with raylibpy!

You can learn more on creating python packages in the Python Packaging site.

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

raylib-py-4.2.0.post1.tar.gz (4.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

raylib_py-4.2.0.post1-py3-none-any.whl (4.5 MB view details)

Uploaded Python 3

File details

Details for the file raylib-py-4.2.0.post1.tar.gz.

File metadata

  • Download URL: raylib-py-4.2.0.post1.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for raylib-py-4.2.0.post1.tar.gz
Algorithm Hash digest
SHA256 6af62c70321239444af099166e926a6fdf605823d9ea7285cbb4aa819cd73811
MD5 b40155f0d1646418594cbd78d2e9c5f2
BLAKE2b-256 620fd5c9d92261ecfcb33ee5ba20bbf47c81f669a2870eeb7f45bd3b958facb4

See more details on using hashes here.

File details

Details for the file raylib_py-4.2.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for raylib_py-4.2.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7ec52caae8630b4472aeb2cc6a67d5f2c75926c2047b844deabeb0fbda16d28
MD5 244e2497cbb66a6ee3543fec1ae26c9f
BLAKE2b-256 e23227c7b9e1db16b84e0a628e82ae4d55fe19def2c2cdbc73c750b89a921857

See more details on using hashes here.

Supported by

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