From 0ceae3c986413cf1e2df03e7c95fe455888f3227 Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 12 Jun 2021 19:55:01 +0100 Subject: [PATCH] pypi fix --- README.md | 11 +++++++---- raylib/static/build_multi_linux.sh | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) create mode 100755 raylib/static/build_multi_linux.sh diff --git a/README.md b/README.md index ef55ee5..af65aa4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ New CFFI API static bindings. Faster, fewer bugs and easier to maintain than ct We distribute a statically linked binary Raylib library, install from Pypi. - pip3 install raylib + pip3 install raylib==3.5.0 Some platforms that should be available: @@ -20,11 +20,11 @@ Some platforms that should be available: **MacOS: Python 3.6 - 3.8** -**Linux (Ubuntu 16.04+): Python 3.6 - 3.8** +**Linux (Ubuntu 16.04+): Python 3.6 - 3.9** -If yours isn't available then pip should attempt to build from source, but this has not been tested. +If yours isn't available then pip should attempt to build from source, so you will need to have raylib development libs installed. -## Option 2: Build from source (Raylib 3.5, all platforms) +## Option 2: Build from source If you're using a platform we don't have binary builds for yet then you can either *use the dynamic binding with your own dll* or else you will have to build from source. @@ -79,6 +79,9 @@ To build a complete set of libs for Python 3.6, 3.7, 3.8 and 3.9: ./raylib/static/build_multi.sh +(NOTE pypi wont accept Linux packages unless they are built `--plat-name manylinux2014_x86_64` so on linux +please run `./raylib/static/build_multi_linux.sh` ) + (TODO move the dynamic libs into a separate package rather than include them with every one.) ### Raspberry Pi diff --git a/raylib/static/build_multi_linux.sh b/raylib/static/build_multi_linux.sh new file mode 100755 index 0000000..8c5c3e5 --- /dev/null +++ b/raylib/static/build_multi_linux.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +if ! command -v pyenv &> /dev/null +then + echo "Pyenv required: https://github.com/pyenv/pyenv-installer" + exit +fi + +pyenv update + +function build() { + echo "Building for Python $1" + pyenv install -s $1 + pyenv global $1 + pip3 install cffi + pip3 install wheel + rm -rf raylib/static/_raylib_cffi.* build + python setup.py bdist_wheel --plat-name manylinux2014_x86_64 +} + +build 3.9.5 +build 3.8.10 +build 3.7.10 +build 3.6.13 +