Skip to content

Commit c6d2971

Browse files
committed
Auto generate cython .c files in CI.
1 parent a775a50 commit c6d2971

File tree

14 files changed

+22
-136103
lines changed

14 files changed

+22
-136103
lines changed

.github/workflows/build-debian-multiarch.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@ jobs:
8181
apt-get update --fix-missing
8282
apt-get upgrade -y
8383
apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev libjpeg-dev fontconfig -y
84-
apt-get install python3-setuptools python3-dev python3-pip python3-wheel python3-sphinx -y
84+
apt-get install python3-setuptools python3-dev python3-pip python3-wheel python3-sphinx python3-cython -y
8585
8686
# Build a wheel, install it for running unit tests
8787
run: |
8888
export PIP_CONFIG_FILE=buildconfig/pip_config.ini
8989
echo "\nBuilding pygame wheel\n"
9090
python3 setup.py docs
91+
python3 setup.py cython_only
9192
pip3 wheel . --wheel-dir /artifacts -vvv
9293
echo "\nInstalling wheel\n"
9394
pip3 install --no-index --pre --find-links /artifacts pygame-ce

.github/workflows/build-macos.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ jobs:
133133
bash ./install_mac_deps.sh
134134
135135
CIBW_BEFORE_BUILD: |
136-
pip install requests numpy Sphinx
137-
python setup.py docs
136+
pip install requests numpy Sphinx cython
137+
python3 setup.py docs
138+
python3 setup.py cython_only
138139
139140
CIBW_TEST_COMMAND: python -m pygame.tests -v --exclude opengl,timing --time_out 300
140141

.github/workflows/build-manylinux.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ jobs:
8080

8181
# command that runs before every build
8282
CIBW_BEFORE_BUILD: |
83-
pip install Sphinx
84-
python setup.py docs
83+
pip install Sphinx cython
84+
python3 setup.py docs
85+
python3 setup.py cython_only
8586
8687
CIBW_TEST_COMMAND: python -m pygame.tests -v --exclude opengl,music,timing --time_out 300
8788

.github/workflows/build-ubuntu-sdist.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ jobs:
5959
sudo apt-get update --fix-missing
6060
sudo apt-get upgrade
6161
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev libjpeg-dev python3-setuptools python3-dev
62-
pip3 install sphinx numpy>=1.21.0
62+
pip3 install sphinx numpy>=1.21.0 cython
6363
6464
- name: Make sdist and install it
6565
env:
6666
PIP_CONFIG_FILE: "buildconfig/pip_config.ini"
6767
run: |
6868
python3 setup.py docs
69+
python3 setup.py cython_only
6970
python3 setup.py sdist
7071
pip3 install dist/pygame-*.tar.gz -vv
7172

.github/workflows/build-windows.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ jobs:
155155
run: |
156156
set DISTUTILS_USE_SDK=1
157157
set MSSdk=1
158-
python -m pip install setuptools wheel requests numpy Sphinx
159-
python setup.py docs
158+
python -m pip install setuptools wheel requests numpy Sphinx cython
159+
python3 setup.py docs
160+
python3 setup.py cython_only
160161
python -m pip --disable-pip-version-check install cibuildwheel
161162
python -m cibuildwheel --output-dir wheelhouse
162163

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@
3232
# mypy
3333
.mypy_cache/
3434

35+
#cython generateed files
36+
/src_c/_sdl2/audio.c
37+
/src_c/_sdl2/controller.c
38+
/src_c/_sdl2/mixer.c
39+
/src_c/_sdl2/sdl2.c
40+
/src_c/_sdl2/video.c
41+
src_c/_sprite.c
42+
src_c/pypm.c
43+
3544
# Other
3645
envdev*
3746
.virtualenv*

0 commit comments

Comments
 (0)