try
This commit is contained in:
parent
cbdba24ff2
commit
4c4c17d0de
2 changed files with 91 additions and 85 deletions
154
.github/workflows/build.yml
vendored
154
.github/workflows/build.yml
vendored
|
@ -342,81 +342,81 @@ jobs:
|
||||||
name: wheel
|
name: wheel
|
||||||
path: dist/*
|
path: dist/*
|
||||||
|
|
||||||
source-distro:
|
# source-distro:
|
||||||
runs-on: ubuntu-20.04
|
# runs-on: ubuntu-20.04
|
||||||
|
#
|
||||||
|
# steps:
|
||||||
|
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
|
# - uses: actions/checkout@v2
|
||||||
|
# with:
|
||||||
|
# submodules: recursive
|
||||||
|
#
|
||||||
|
# - name: Setup Python
|
||||||
|
# uses: actions/setup-python@v2.2.2
|
||||||
|
# with:
|
||||||
|
# # Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
||||||
|
# python-version: '3.12'
|
||||||
|
# # The target architecture (x86, x64) of the Python interpreter.
|
||||||
|
# architecture: x64
|
||||||
|
#
|
||||||
|
# - name: Build raylib
|
||||||
|
# run: |
|
||||||
|
# sudo apt update
|
||||||
|
# sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
|
||||||
|
# cd raylib-c
|
||||||
|
# mkdir build
|
||||||
|
# cd build
|
||||||
|
# cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
# make -j2
|
||||||
|
# sudo make install
|
||||||
|
# - name: Copy extras
|
||||||
|
# run: |
|
||||||
|
# sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||||
|
# sudo cp physac/src/physac.h /usr/local/include/
|
||||||
|
# sudo cp raygui/src/raygui.h /usr/local/include/
|
||||||
|
#
|
||||||
|
# - name: Build raylib-python-cffi
|
||||||
|
# run: |
|
||||||
|
# python -m pip install --upgrade pip
|
||||||
|
# pip3 install "cffi>=1.17.1"
|
||||||
|
# pip3 install wheel
|
||||||
|
# pip3 install setuptools
|
||||||
|
# python setup.py sdist
|
||||||
|
#
|
||||||
|
# - name: Upload build Artifact wheel
|
||||||
|
# uses: actions/upload-artifact@v3.2.1
|
||||||
|
# with:
|
||||||
|
# name: wheel
|
||||||
|
# path: dist/*
|
||||||
|
|
||||||
steps:
|
# dynamic-distro:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# runs-on: ubuntu-20.04
|
||||||
- uses: actions/checkout@v2
|
#
|
||||||
with:
|
# steps:
|
||||||
submodules: recursive
|
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
|
# - uses: actions/checkout@v2
|
||||||
- name: Setup Python
|
# with:
|
||||||
uses: actions/setup-python@v2.2.2
|
# submodules: recursive
|
||||||
with:
|
#
|
||||||
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
# - name: Setup Python
|
||||||
python-version: '3.12'
|
# uses: actions/setup-python@v2.2.2
|
||||||
# The target architecture (x86, x64) of the Python interpreter.
|
# with:
|
||||||
architecture: x64
|
# # Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
||||||
|
# python-version: '3.12'
|
||||||
- name: Build raylib
|
# # The target architecture (x86, x64) of the Python interpreter.
|
||||||
run: |
|
# architecture: x64
|
||||||
sudo apt update
|
#
|
||||||
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
|
# - name: Build raylib-python-cffi-dynamic
|
||||||
cd raylib-c
|
# run: |
|
||||||
mkdir build
|
# python -m pip install --upgrade pip
|
||||||
cd build
|
# pip3 install "cffi>=1.17.1"
|
||||||
cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
|
# pip3 install wheel
|
||||||
make -j2
|
# pip3 install setuptools
|
||||||
sudo make install
|
# cd dynamic
|
||||||
- name: Copy extras
|
# python setup.py sdist
|
||||||
run: |
|
#
|
||||||
sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
# - name: Upload build Artifact wheel
|
||||||
sudo cp physac/src/physac.h /usr/local/include/
|
# uses: actions/upload-artifact@v3.2.1
|
||||||
sudo cp raygui/src/raygui.h /usr/local/include/
|
# with:
|
||||||
|
# name: wheel
|
||||||
- name: Build raylib-python-cffi
|
# path: dynamic/dist/*
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip3 install "cffi>=1.17.1"
|
|
||||||
pip3 install wheel
|
|
||||||
pip3 install setuptools
|
|
||||||
python setup.py sdist
|
|
||||||
|
|
||||||
- name: Upload build Artifact wheel
|
|
||||||
uses: actions/upload-artifact@v3.2.1
|
|
||||||
with:
|
|
||||||
name: wheel
|
|
||||||
path: dist/*
|
|
||||||
|
|
||||||
dynamic-distro:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v2.2.2
|
|
||||||
with:
|
|
||||||
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
|
||||||
python-version: '3.12'
|
|
||||||
# The target architecture (x86, x64) of the Python interpreter.
|
|
||||||
architecture: x64
|
|
||||||
|
|
||||||
- name: Build raylib-python-cffi-dynamic
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip3 install "cffi>=1.17.1"
|
|
||||||
pip3 install wheel
|
|
||||||
pip3 install setuptools
|
|
||||||
cd dynamic
|
|
||||||
python setup.py sdist
|
|
||||||
|
|
||||||
- name: Upload build Artifact wheel
|
|
||||||
uses: actions/upload-artifact@v3.2.1
|
|
||||||
with:
|
|
||||||
name: wheel
|
|
||||||
path: dynamic/dist/*
|
|
||||||
|
|
|
@ -196,21 +196,27 @@ def build_windows():
|
||||||
ffibuilder.cdef(open("raylib/raygui.h.modified").read())
|
ffibuilder.cdef(open("raylib/raygui.h.modified").read())
|
||||||
ffibuilder.cdef(open("raylib/physac.h.modified").read())
|
ffibuilder.cdef(open("raylib/physac.h.modified").read())
|
||||||
ffibuilder.cdef(open("raylib/raymath.h.modified").read())
|
ffibuilder.cdef(open("raylib/raymath.h.modified").read())
|
||||||
ffibuilder.set_source("raylib._raylib_cffi", """
|
|
||||||
|
ffi_includes = """
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
#include "rlgl.h"
|
#include "rlgl.h"
|
||||||
#include "raymath.h"
|
#include "raymath.h"
|
||||||
""" +
|
"""
|
||||||
|
|
||||||
|
if not USE_SDL2:
|
||||||
|
ffi_includes +=
|
||||||
"""
|
"""
|
||||||
#include "GLFW/glfw3.h"
|
#include "GLFW/glfw3.h"
|
||||||
""" if not USE_SDL2 else ""
|
"""
|
||||||
+ """
|
|
||||||
|
ffi_includes += """
|
||||||
#define RAYGUI_IMPLEMENTATION
|
#define RAYGUI_IMPLEMENTATION
|
||||||
#define RAYGUI_SUPPORT_RICONS
|
#define RAYGUI_SUPPORT_RICONS
|
||||||
#include "raygui.h"
|
#include "raygui.h"
|
||||||
#define PHYSAC_IMPLEMENTATION
|
#define PHYSAC_IMPLEMENTATION
|
||||||
#include "physac.h"
|
#include "physac.h"
|
||||||
""",
|
"""
|
||||||
|
ffibuilder.set_source("raylib._raylib_cffi", ffi_includes,
|
||||||
extra_link_args=['/NODEFAULTLIB:MSVCRTD'],
|
extra_link_args=['/NODEFAULTLIB:MSVCRTD'],
|
||||||
extra_compile_args=["/D_CFFI_NO_LIMITED_API"],
|
extra_compile_args=["/D_CFFI_NO_LIMITED_API"],
|
||||||
py_limited_api=False,
|
py_limited_api=False,
|
||||||
|
|
Reference in a new issue