%global pypi_name jpype1 Name: python-%{pypi_name} Version: 1.5.2 Release: %autorelease Summary: jpype package License: MIT URL: https://example.com Source: https://files.pythonhosted.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel # For tests BuildRequires: gcc %description jpype package %global python_wheel_name jpype-%{version}.py3-none-any.whl %package -n %{python_wheel_pkg_prefix}-%{pypi_name}-wheel Summary: jpype wheel %description -n %{python_wheel_pkg_prefix}-%{pypi_name}-wheel jpype package wheel %prep %autosetup -p1 -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires -x test %build %pyproject_wheel %install mkdir -p %{buildroot}%{python_wheel_dir} install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} %{?python_wheel_inject_sbom:%python_wheel_inject_sbom %{buildroot}%{python_wheel_dir}/%{python_wheel_name}} %check # We will use this wheel in virtualenv with Python 3.6, # so running the tests with the current Python version is not exactly what we need # but it is the best we can do here. export PYTHONPATH=%{buildroot}%{python_wheel_dir}/%{python_wheel_name} %pytest %files -n %{python_wheel_pkg_prefix}-%{pypi_name}-wheel %license LICENSE.txt # we own the dir for simplicity %dir %{python_wheel_dir}/ %{python_wheel_dir}/%{python_wheel_name} %changelog %autochangelog