Skip to content

Commit b393890

Browse files
committed
Add packit packaging
1 parent f33f6af commit b393890

File tree

7 files changed

+162
-0
lines changed

7 files changed

+162
-0
lines changed

.distro/.fmf/version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

.distro/plans/main.fmf.dist-git

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
discover:
2+
how: fmf
3+
dist-git-source: true
4+
dist-git-extract: scikit_build_core-*/

.distro/plans/rpminspect.fmf

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
plan:
2+
import:
3+
url: https://github.com/packit/tmt-plans
4+
ref: main
5+
name: /plans/rpminspect
6+
environment:
7+
RPMINSPECT_EXCLUDE: metadata,upstream

.distro/plans/rpmlint.fmf

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
prepare:
2+
- how: shell
3+
script: cp ./*.rpmlintrc $TMT_PLAN_DATA/
4+
discover:
5+
how: fmf
6+
filter: "tag: rpmlint"
7+
url: https://github.com/packit/tmt-plans
8+
ref: main
9+
execute:
10+
how: tmt

.distro/pybind11.rpmlintrc

Whitespace-only changes.

.distro/pybind11.spec

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
Name: pybind11
2+
Version: 0.0.0
3+
Release: %autorelease
4+
Summary: Seamless operability between C++11 and Python
5+
6+
# TODO: https://github.com/pybind/pybind11/issues/5093
7+
License: BSD
8+
URL: https://github.com/pybind/pybind11
9+
Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz
10+
11+
BuildRequires: python3-devel
12+
# Testing dependences
13+
BuildRequires: cmake
14+
BuildRequires: ninja-build
15+
BuildRequires: gcc
16+
BuildRequires: gcc-c++
17+
18+
%global _description %{expand:
19+
pybind11 is a lightweight header-only library that exposes C++ types
20+
in Python and vice versa, mainly to create Python bindings of existing
21+
C++ code.
22+
}
23+
24+
%description %_description
25+
26+
%package devel
27+
Summary: Development files for pybind11
28+
BuildRequires: pybind11-devel
29+
Provides: pybind11-static = %{version}-%{release}
30+
31+
%package -n python3-scikit-build-core
32+
Summary: %{summary}
33+
BuildRequires: pybind11-devel
34+
%description -n python3-scikit-build-core %_description
35+
36+
37+
%prep
38+
%autosetup -n pybind11-%{version}
39+
40+
41+
%generate_buildrequires
42+
%pyproject_buildrequires
43+
44+
45+
%build
46+
%pyproject_wheel
47+
48+
49+
%install
50+
%pyproject_install
51+
%pyproject_save_files pybind11
52+
53+
54+
%check
55+
%pytest
56+
57+
58+
%files devel
59+
%license LICENSE
60+
%doc README.rst
61+
%{_includedir}/pybind11/
62+
%{_datadir}/cmake/pybind11/
63+
%{_bindir}/pybind11-config
64+
%{_datadir}/pkgconfig/pybind11.pc
65+
66+
%files -n python3-pybind11 -f %{pyproject_files}
67+
68+
69+
%changelog
70+
%autochangelog

.packit.yaml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
packages:
2+
pybind11:
3+
# Use `path` when upstream issue is clarified
4+
# https://github.com/packit/packit/issues/2272#issuecomment-2033712303
5+
specfile_path: .distro/pybind11.spec
6+
downstream_package_name: pybind11
7+
files_to_sync:
8+
- src: .distro/pybind11.spec
9+
dest: pybind11.spec
10+
- .packit.yaml
11+
- src: .distro/pybind11.rpmlintrc
12+
dest: pybind11.rpmlintrc
13+
# tmt setup
14+
- src: .distro/.fmf/
15+
dest: .fmf/
16+
- src: .distro/plans/
17+
dest: plans/
18+
filters:
19+
- "- main.fmf.dist-git"
20+
- "- rpminspect.fmf"
21+
- "- rpmlint.fmf"
22+
- src: .distro/tests/
23+
dest: tests/
24+
- src: .distro/plans/main.fmf.dist-git
25+
dest: plans/main.fmf
26+
27+
update_release: false
28+
upstream_tag_template: v{version}
29+
30+
jobs:
31+
- &copr
32+
job: copr_build
33+
trigger: release
34+
owner: "@scikit-build"
35+
project: release
36+
targets:
37+
- fedora-all-x86_64
38+
- fedora-all-aarch64
39+
- &tests
40+
job: tests
41+
trigger: release
42+
targets:
43+
- fedora-all-x86_64
44+
- fedora-all-aarch64
45+
fmf_path: .distro
46+
- <<: *copr
47+
trigger: commit
48+
project: nightly
49+
branch: main
50+
- <<: *tests
51+
trigger: commit
52+
- <<: *copr
53+
trigger: pull_request
54+
project: pybind11
55+
update_release: true
56+
release_suffix: "{PACKIT_RPMSPEC_RELEASE}"
57+
- <<: *tests
58+
trigger: pull_request
59+
- job: propose_downstream
60+
trigger: release
61+
dist_git_branches:
62+
- fedora-rawhide
63+
- job: koji_build
64+
trigger: commit
65+
dist_git_branches:
66+
- fedora-all
67+
- job: bodhi_update
68+
trigger: commit
69+
dist_git_branches:
70+
- fedora-branched

0 commit comments

Comments
 (0)