diff --git a/.circleci/config.yml b/.circleci/config.yml index 77d8b03d69..93fe096ed1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ jobs: - CIBW_SKIP: '*-musllinux_*' - CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014_base_aarch64 - CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: manylinux2014_base_aarch64 - - CIBW_BEFORE_BUILD: pip install Sphinx"<7.2.0" && python setup.py docs + - CIBW_BEFORE_BUILD: pip install -r requirements-dev.txt && python setup.py docs - CIBW_TEST_COMMAND: python -m pygame.tests -v --exclude opengl,music,timing --time_out 300 - CIBW_BUILD_VERBOSITY: 2 diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 94b299610f..23ea200a25 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -1,7 +1,7 @@ name: macOS -# Run CI only when a release is created, on changes to main branch, or any PR -# to main. Do not run CI on any other branch. Also, skip any non-source changes +# Run CI only when a release is created, on changes to main branch, or any PR +# to main. Do not run CI on any other branch. Also, skip any non-source changes # from running on CI on: push: @@ -27,7 +27,7 @@ on: - '.github/workflows/*.yml' # re-include current file to not be excluded - '!.github/workflows/build-macos.yml' - + # the github release drafter can call this workflow workflow_call: @@ -54,7 +54,7 @@ jobs: uses: actions/cache@v4.0.2 with: path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} - # The hash of all files in buildconfig manylinux-build and macdependencies is + # The hash of all files in buildconfig manylinux-build and macdependencies is # the key to the cache. If anything changes here, the deps are built again key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}-${{ matrix.os }} lookup-only: true @@ -86,14 +86,14 @@ jobs: # builds on macOS. This needs to be manually kept updated so that each # of these builds take roughly the same time include: - - { + - { name: "x86_64 (CPython 3.9 - 3.12)", macarch: x86_64, os: macos-13, pyversions: "cp3{9,10,11,12}-*", } - - { + - { name: "x86_64 (Python 3.8)", macarch: x86_64, os: macos-13, @@ -101,21 +101,21 @@ jobs: pyversions: "?p38-*", } - - { + - { name: "x86_64 (PyPy 3.9 and 3.10)", macarch: x86_64, os: macos-13, pyversions: "pp39-* pp310-*", } - - { + - { name: "arm64 (CPython 3.8 - 3.10)", macarch: arm64, os: macos-14, pyversions: "cp3{8,9,10}-*", } - - { + - { name: "arm64 (CPython 3.11 - 3.12)", macarch: arm64, os: macos-14, @@ -152,7 +152,7 @@ jobs: bash ./install_mac_deps.sh CIBW_BEFORE_BUILD: | - pip install numpy Sphinx"<7.2.0" + pip install -r requirements-dev.txt python setup.py docs cp -r ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} ${{ github.workspace }}/pygame_mac_deps diff --git a/.github/workflows/build-manylinux.yml b/.github/workflows/build-manylinux.yml index 12d1094bdd..ba5417c24f 100644 --- a/.github/workflows/build-manylinux.yml +++ b/.github/workflows/build-manylinux.yml @@ -1,7 +1,7 @@ name: ManyLinux -# Run CI only when a release is created, on changes to main branch, or any PR -# to main. Do not run CI on any other branch. Also, skip any non-source changes +# Run CI only when a release is created, on changes to main branch, or any PR +# to main. Do not run CI on any other branch. Also, skip any non-source changes # from running on CI on: push: @@ -27,7 +27,7 @@ on: - '.github/workflows/*.yml' # re-include current file to not be excluded - '!.github/workflows/build-manylinux.yml' - + # the github release drafter can call this workflow workflow_call: @@ -42,12 +42,12 @@ jobs: permissions: contents: read packages: write - + strategy: fail-fast: false # if a particular matrix build fails, don't skip the rest matrix: arch: [x86_64, i686] - + env: # load pip config from this file. Define this in 'CIBW_ENVIRONMENT' # because this should not affect cibuildwheel machinery @@ -62,7 +62,7 @@ jobs: # command that runs before every build CIBW_BEFORE_BUILD: | - pip install Sphinx"<7.2.0" + pip install -r requirements-dev.txt python setup.py docs CIBW_TEST_COMMAND: python -m pygame.tests -v --exclude opengl,music,timing --time_out 300 @@ -87,7 +87,7 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: Inspect image, skip build if image exists id: inspect continue-on-error: true diff --git a/.github/workflows/build-ubuntu-sdist.yml b/.github/workflows/build-ubuntu-sdist.yml index dd4300c697..8ad6c7edb6 100644 --- a/.github/workflows/build-ubuntu-sdist.yml +++ b/.github/workflows/build-ubuntu-sdist.yml @@ -7,8 +7,8 @@ name: Ubuntu sdist -# Run CI only when a release is created, on changes to main branch, or any PR -# to main. Do not run CI on any other branch. Also, skip any non-source changes +# Run CI only when a release is created, on changes to main branch, or any PR +# to main. Do not run CI on any other branch. Also, skip any non-source changes # from running on CI on: push: @@ -34,7 +34,7 @@ on: - '.github/workflows/*.yml' # re-include current file to not be excluded - '!.github/workflows/build-ubuntu-sdist.yml' - + # the github release drafter can call this workflow workflow_call: @@ -44,7 +44,7 @@ concurrency: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os }} strategy: fail-fast: false # if a particular matrix build fails, don't skip the rest matrix: @@ -61,8 +61,8 @@ jobs: run: | sudo apt-get update --fix-missing sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev python3-setuptools python3-dev - pip3 install --upgrade pip pip3 install sphinx"<7.2.0" numpy>=1.21.0 + pip3 install -r requirements-dev.txt - name: Make sdist and install it run: | @@ -75,7 +75,7 @@ jobs: SDL_VIDEODRIVER: "dummy" SDL_AUDIODRIVER: "disk" run: python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300 - + - name: Test typestubs if: matrix.os == 'ubuntu-22.04' # run stubtest only once run: | diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 578e627c87..24bc47572e 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -1,4 +1,3 @@ -name: Windows # Run CI only when a release is created, on changes to main branch, or any PR # to main. Do not run CI on any other branch. Also, skip any non-source changes @@ -27,7 +26,7 @@ on: - '.github/workflows/*.yml' # re-include current file to not be excluded - '!.github/workflows/build-windows.yml' - + # the github release drafter can call this workflow workflow_call: diff --git a/.github/workflows/format-lint.yml b/.github/workflows/format-lint.yml index 2b95feaf30..870b5e6aa7 100644 --- a/.github/workflows/format-lint.yml +++ b/.github/workflows/format-lint.yml @@ -43,7 +43,7 @@ jobs: - uses: actions/checkout@v4.1.6 - name: Install deps - run: python3 -m pip install pylint sphinx"<7.2.0" + run: python3 -m pip install -r requirements-dev.txt - name: Check code linting run: pylint src_py docs diff --git a/buildconfig/manylinux-build/build-wheels.sh b/buildconfig/manylinux-build/build-wheels.sh index bd29eed03a..01ff3ecf6f 100755 --- a/buildconfig/manylinux-build/build-wheels.sh +++ b/buildconfig/manylinux-build/build-wheels.sh @@ -40,7 +40,7 @@ for PYVER in $SUPPORTED_PYTHONS; do PYTHON="/opt/python/${PYVER}/bin/pypy" fi - ${PYTHON} -m pip install Sphinx + ${PYTHON} -m pip install -r requirements-dev.txt cd io ${PYTHON} setup.py docs cd .. diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000000..68cf44c391 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,3 @@ +numpy +pylint<=3.1.0 +meson \ No newline at end of file