Skip to content

Commit 75307bf

Browse files
authored
Updates to the Python module build (#1387)
1 parent 26fde5c commit 75307bf

4 files changed

Lines changed: 28 additions & 28 deletions

File tree

.github/workflows/cpp-python-build.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ jobs:
106106
path: |
107107
~/.cache/pip
108108
build/Testing/Temporary/CTestCostData.txt
109-
key: ${{ runner.os }}-3.9-${{ hashFiles('tests/CMakeLists.txt', 'python/requirements.txt') }}
110-
- name: Set up Python 3.9
109+
key: ${{ runner.os }}-3.10-${{ hashFiles('tests/CMakeLists.txt', 'python/requirements.txt') }}
110+
- name: Set up Python 3.10
111111
uses: actions/setup-python@v6
112112
with:
113-
python-version: '3.9'
113+
python-version: '3.10'
114114
- name: Install Python packages
115115
run: |
116116
pip install -r python/requirements.txt
@@ -312,11 +312,11 @@ jobs:
312312
path: |
313313
~\AppData\Local\pip\Cache
314314
build\Testing\Temporary\CTestCostData.txt
315-
key: ${{ runner.os }}-3.9-${{ hashFiles('tests\CMakeLists.txt', 'python\requirements.txt') }}
316-
- name: Set up Python 3.9
315+
key: ${{ runner.os }}-3.10-${{ hashFiles('tests\CMakeLists.txt', 'python\requirements.txt') }}
316+
- name: Set up Python 3.10
317317
uses: actions/setup-python@v6
318318
with:
319-
python-version: '3.9'
319+
python-version: '3.10'
320320
- name: Install Python packages
321321
run: pip install -r python/requirements.txt
322322
- name: Checkout CxxTest
@@ -550,10 +550,10 @@ jobs:
550550
os: [ubuntu-latest, macos-latest, windows-latest]
551551
runs-on: ${{ matrix.os }}
552552
steps:
553-
- name: Set up Python 3.9
553+
- name: Set up Python 3.10
554554
uses: actions/setup-python@v6
555555
with:
556-
python-version: '3.9'
556+
python-version: '3.10'
557557
- name: Install Python packages
558558
run: pip install -U cython 'numpy>=1.20' mypy
559559
- name: Download source package
@@ -596,10 +596,10 @@ jobs:
596596
steps:
597597
- name: Checkout JSBSim
598598
uses: actions/checkout@v6
599-
- name: Set up Python 3.9
599+
- name: Set up Python 3.10
600600
uses: actions/setup-python@v6
601601
with:
602-
python-version: '3.9'
602+
python-version: '3.10'
603603
- name: Install Python packages
604604
run: pip install -U cython 'numpy>=1.20' mypy
605605
- name: Install Doxygen (Linux)
@@ -655,7 +655,7 @@ jobs:
655655
Copy-Item -Path .\JSBSim-*\jsbsim\*.pyi -Destination ..\..\build\python\jsbsim
656656
echo "::endgroup::"
657657
- name: Build wheels
658-
uses: pypa/cibuildwheel@v2.23
658+
uses: pypa/cibuildwheel@v3.3
659659
env:
660660
CIBW_BEFORE_ALL_LINUX: |
661661
cd build
@@ -774,10 +774,10 @@ jobs:
774774
find . -type f -name *.deb -exec cp {} GH_release/. \;
775775
776776
# PyPI deployment
777-
- name: Set up Python 3.9
777+
- name: Set up Python 3.10
778778
uses: actions/setup-python@v6
779779
with:
780-
python-version: '3.9'
780+
python-version: '3.10'
781781
- name: PyPI deployment
782782
uses: pypa/gh-action-pypi-publish@release/v1
783783

@@ -889,10 +889,10 @@ jobs:
889889
run: |
890890
sudo apt-get update
891891
sudo apt-get install doxygen graphviz
892-
- name: Set up Python 3.9
892+
- name: Set up Python 3.10
893893
uses: actions/setup-python@v6
894894
with:
895-
python-version: '3.9'
895+
python-version: '3.10'
896896
- name: Install Python packages
897897
run: pip install -U 'numpy>=1.20' sphinx cython
898898
- name: Checkout JSBSim

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Debian packages for Ubuntu Linux "Jammy" 22.04 LTS and "Noble" 24.04 LTS for 64
7777

7878
### Python module
7979

80-
JSBSim provides binary wheel packages for its Python module on Windows, Mac OSX and Linux platforms for several Python versions (3.9, 3.10, 3.11, 3.12 and 3.13). These can be installed using either `pip` or `conda`.
80+
JSBSim provides binary wheel packages for its Python module on Windows, Mac OSX and Linux platforms for several Python versions (3.10, 3.11, 3.12, 3.13 and 3.14). These can be installed using either `pip` or `conda`.
8181

8282
#### Installation with `pip`
8383

python/pyproject.toml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
[build-system]
22
# Exclude Cython version 0.29.26 as it fails building wheels for PyPy38
3-
#
4-
# Require setuptools >= 60.0.0 to be able to access its local copy of distutils
5-
# as distutils is deprecated for Python 3.10+ and will no longer be distributed
6-
# with Python 3.12+.
7-
requires = ["setuptools>=60.0.0,<72.0.0", "cython!=0.29.26"]
3+
# Require setuptools 72.1.0 for PyPy (see issue #2676 on pypa/cibuildwheel
4+
# GitHub project page)
5+
requires = [
6+
"setuptools==72.1.0; platform_python_implementation == 'PyPy' and python_version < '3.11'",
7+
"setuptools", "cython!=0.29.26"
8+
]
89
build-backend = "setuptools.build_meta"
910

1011
[tool.cibuildwheel]
1112
manylinux-x86_64-image = "manylinux2014"
1213
manylinux-i686-image = "manylinux2014"
14+
enable = ["pypy", "pypy-eol"]
1315
# Skip building against musl libc images as JSBSim is not compatible with them.
1416
skip = "cp*-musllinux_*"
15-
16-
[[tool.cibuildwheel.overrides]]
17-
select = "pp38-* cp38*"
18-
manylinux-x86_64-image = "manylinux2010"
19-
manylinux-i686-image = "manylinux2010"

python/setup.py.in

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ setup(
179179
long_description="JSBSim is a multi-platform, general purpose object-oriented Flight Dynamics Model (FDM) written in C++. The FDM is essentially the physics & math model that defines the movement of an aircraft, rocket, etc., under the forces and moments applied to it using the various control mechanisms and from the forces of nature. JSBSim can be run in a standalone batch mode flight simulator (no graphical displays) for testing and study, or integrated with [FlightGear](http://home.flightgear.org/) or other flight simulator.",
180180
long_description_content_type="text/markdown",
181181
classifiers=[
182-
"Development Status :: 4 - Beta",
182+
"Development Status :: 5 - Production/Stable",
183183
"Environment :: Console",
184184
"Intended Audience :: Science/Research",
185185
"Intended Audience :: Other Audience",
@@ -189,6 +189,9 @@ setup(
189189
"Operating System :: MacOS :: MacOS X",
190190
"Programming Language :: C++",
191191
"Programming Language :: Python :: 3",
192+
"Programming Language :: Python :: Implementation :: CPython",
193+
"Programming Language :: Python :: Implementation :: PyPy",
194+
"Programming Language :: Cython",
192195
"Topic :: Education",
193196
"Topic :: Games/Entertainment :: Simulation",
194197
"Topic :: Scientific/Engineering",
@@ -198,7 +201,7 @@ setup(
198201
scripts=['JSBSim.py'],
199202
install_requires=['numpy>=1.20'],
200203
ext_modules=[Extension('jsbsim._jsbsim', language='c++', **ext_kwargs)],
201-
python_requires=">=3.9",
204+
python_requires=">=3.10",
202205
packages=['jsbsim'],
203206
package_data={'jsbsim': package_data_files},
204207
zip_safe=False, # needed for mypy to find the type hints stubs

0 commit comments

Comments
 (0)