Skip to content

Commit

Permalink
Initial Fedora packaging
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
  • Loading branch information
LecrisUT committed Sep 25, 2024
1 parent 0faad29 commit d646836
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 0 deletions.
1 change: 1 addition & 0 deletions .distro/.fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
7 changes: 7 additions & 0 deletions .distro/plans/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
adjust+:
# Cannot use initiator: fedora-ci reliably yet
when: initiator is not defined or initiator != packit
discover+:
how: fmf
dist-git-source: true
dist-git-extract: f2py_cmake-*/
10 changes: 10 additions & 0 deletions .distro/plans/rpmlint.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prepare:
- how: shell
script: cp ./*.rpmlintrc $TMT_PLAN_DATA/
discover:
how: fmf
filter: "tag: rpmlint"
url: https://github.com/packit/tmt-plans
ref: main
execute:
how: tmt
7 changes: 7 additions & 0 deletions .distro/plans/smoke.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
summary:
Basic smoke tests
discover:
how: fmf
filter: "tag: smoke"
execute:
how: tmt
Empty file.
59 changes: 59 additions & 0 deletions .distro/python-f2py-cmake.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Main package is arched in order to run tests on all arches
%global debug_package %{nil}

Name: python-f2py-cmake
Version: 0.0.0
Release: %autorelease
Summary: CMake helpers for building Cython modules

License: Apache-2.0
URL: https://github.com/scikit-build/f2py-cmake
Source: %{pypi_source cython_cmake}

BuildRequires: python3-devel
# Testing dependences
BuildRequires: cmake

%global _description %{expand:
This provides helpers for using F2Py. Use:

include(UseF2Py)
}

%description %_description

%package -n python3-f2py-cmake
Summary: %{summary}
Requires: cmake
BuildArch: noarch
%description -n python3-f2py-cmake %_description


%prep
%autosetup -n f2py_cmake-%{version}


%generate_buildrequires
%pyproject_buildrequires -x test


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files -l f2py_cmake


%check
%pyproject_check_import
%pytest


%files -n python3-f2py-cmake -f %{pyproject_files}
%doc README.md


%changelog
%autochangelog
7 changes: 7 additions & 0 deletions .distro/tests/smoke.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tag: [ smoke ]
tier: 0
path: /

/version:
test: |
python3 -c "import cython_cmake; print(cython_cmake.__version__)"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,8 @@ Thumbs.db
# Common editor files
*~
*.swp

# Fedora packaging
*.rpm
*.tar.gz
!.distro/*.spec
59 changes: 59 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
files_to_sync:
- src: .distro/
dest: ./
delete: true
filters:
- "protect .git*"
- "protect sources"
- "protect changelog"
- "- plans/rpmlint.fmf"
- .packit.yaml

upstream_package_name: f2py-cmake
specfile_path: .distro/python-f2py-cmake.spec
downstream_package_name: python-f2py-cmake
upstream_tag_template: v{version}

targets: &targets
- fedora-all-x86_64
- fedora-all-aarch64
- epel-10-x86_64
- epel-10-aarch64

jobs:
- &copr_build
job: copr_build
trigger: pull_request
- &tests
job: tests
trigger: pull_request
fmf_path: .distro
targets:
- fedora-all-x86_64
- fedora-all-aarch64
- <<: *copr_build
trigger: release
owner: "@scikit-build"
project: release
- <<: *tests
trigger: release
- <<: *copr_build
trigger: commit
branch: main
owner: "@scikit-build"
project: nightly
- <<: *tests
trigger: commit
branch: main
- job: propose_downstream
trigger: release
dist_git_branches:
- fedora-rawhide
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-all
- job: bodhi_update
trigger: commit
dist_git_branches:
- fedora-branched

0 comments on commit d646836

Please sign in to comment.