diff --git a/.distro/python-f2py-cmake.rpmlintrc b/.distro/f2py-cmake.rpmlintrc similarity index 100% rename from .distro/python-f2py-cmake.rpmlintrc rename to .distro/f2py-cmake.rpmlintrc diff --git a/.distro/python-f2py-cmake.spec b/.distro/f2py-cmake.spec similarity index 66% rename from .distro/python-f2py-cmake.spec rename to .distro/f2py-cmake.spec index f6aee18..2bd3269 100644 --- a/.distro/python-f2py-cmake.spec +++ b/.distro/f2py-cmake.spec @@ -1,7 +1,4 @@ -# Main package is arched in order to run tests on all arches -%global debug_package %{nil} - -Name: python-f2py-cmake +Name: f2py-cmake Version: 0.0.0 Release: %autorelease Summary: F2Py helpers for CMake @@ -9,12 +6,16 @@ Summary: F2Py helpers for CMake License: Apache-2.0 URL: https://github.com/scikit-build/f2py-cmake Source: %{pypi_source f2py_cmake} +BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-numpy-f2py # Testing dependences BuildRequires: cmake BuildRequires: gfortran +Requires: cmake +Requires: python3-devel +Requires: python3-numpy-f2py %global _description %{expand: This provides helpers for using F2Py. Use: @@ -24,13 +25,15 @@ include(UseF2Py) %description %_description +CMake module files. + %package -n python3-f2py-cmake Summary: %{summary} -Requires: cmake -Requires: python3-numpy-f2py -BuildArch: noarch +Requires: f2py-cmake = %{version}-%{release} %description -n python3-f2py-cmake %_description +Python package. + %prep %autosetup -n f2py_cmake-%{version} @@ -47,6 +50,10 @@ BuildArch: noarch %install %pyproject_install %pyproject_save_files -l f2py_cmake +# Move the actual CMake modules to /usr/share/cmake +mkdir -p %{buildroot}%{_datadir}/cmake/Modules +mv %{buildroot}%{python3_sitelib}/f2py_cmake/cmake/*.cmake %{buildroot}%{_datadir}/cmake/Modules/ +ln -rs %{buildroot}%{_datadir}/cmake/Modules/*.cmake %{buildroot}%{python3_sitelib}/f2py_cmake/cmake/ %check @@ -54,9 +61,13 @@ BuildArch: noarch %pytest +%files +%{_datadir}/cmake/Modules/*.cmake +%license LICENSE +%doc README.md + %files -n python3-f2py-cmake -f %{pyproject_files} %{_bindir}/f2py-cmake -%doc README.md %changelog diff --git a/.packit.yaml b/.packit.yaml index 096da63..e1c5a26 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -10,8 +10,8 @@ files_to_sync: - .packit.yaml upstream_package_name: f2py-cmake -specfile_path: .distro/python-f2py-cmake.spec -downstream_package_name: python-f2py-cmake +specfile_path: .distro/f2py-cmake.spec +downstream_package_name: f2py-cmake upstream_tag_template: v{version} targets: &targets