Skip to content

Commit

Permalink
Split the rpm package
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Oct 2, 2024
1 parent 3f5d367 commit e706149
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
File renamed without changes.
27 changes: 19 additions & 8 deletions .distro/python-f2py-cmake.spec → .distro/f2py-cmake.spec
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# 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

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:
Expand All @@ -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}
Expand All @@ -47,16 +50,24 @@ 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
%pyproject_check_import
%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
Expand Down
4 changes: 2 additions & 2 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e706149

Please sign in to comment.