%global pypi_name simplejpeg # extension links a static libturbojpeg; debugsource extraction yields an empty # file list, so skip the debug subpackages %global debug_package %{nil} Name: python-%{pypi_name} Version: 1.9.0 Release: 1%{?dist} Summary: Fast JPEG encoding/decoding for Python License: MIT URL: https://gitlab.com/jfolz/simplejpeg Source0: %{pypi_source %{pypi_name}} BuildRequires: python3-devel BuildRequires: gcc gcc-c++ cmake # bundled libjpeg-turbo uses NASM for x86 SIMD (aarch64 uses intrinsics) %ifarch %{ix86} x86_64 BuildRequires: nasm %endif %description simplejpeg provides fast, minimal JPEG encode/decode used by picamera2's MJPEG streaming path. %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} simplejpeg provides fast, minimal JPEG encode/decode used by picamera2's MJPEG streaming path. %prep %autosetup -n %{pypi_name}-%{version} # Fedora 44 ships Cython 3.2.4; relax the ~=3.1.0 build pin (3.2 builds fine) sed -i 's/"cython~=3.1.0"/"cython>=3.1"/' pyproject.toml # setup.py downloads libjpeg-turbo at build time unless the tarball path exists; # the sdist already bundles the extracted lib/libjpeg-turbo-3.1.2/ tree, so a # stub tarball makes the download a no-op (offline build for mock/COPR). touch lib/libjpeg-turbo-3.1.2.tar.gz %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -L simplejpeg %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %changelog * Mon Jun 29 2026 Morgan Hough - 1.9.0-1 - Initial package for the OpenFlexure-on-Fedora (v3/picamera2) stack.