mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-28 08:02:00 +00:00
Add packit packaging
This commit is contained in:
parent
f33f6afb66
commit
e1833cafe1
1
.distro/.fmf/version
Normal file
1
.distro/.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
4
.distro/plans/main.fmf.dist-git
Normal file
4
.distro/plans/main.fmf.dist-git
Normal file
@ -0,0 +1,4 @@
|
||||
discover:
|
||||
how: fmf
|
||||
dist-git-source: true
|
||||
dist-git-extract: scikit_build_core-*/
|
7
.distro/plans/rpminspect.fmf
Normal file
7
.distro/plans/rpminspect.fmf
Normal file
@ -0,0 +1,7 @@
|
||||
plan:
|
||||
import:
|
||||
url: https://github.com/packit/tmt-plans
|
||||
ref: main
|
||||
name: /plans/rpminspect
|
||||
environment:
|
||||
RPMINSPECT_EXCLUDE: metadata,upstream
|
10
.distro/plans/rpmlint.fmf
Normal file
10
.distro/plans/rpmlint.fmf
Normal file
@ -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
|
0
.distro/pybind11.rpmlintrc
Normal file
0
.distro/pybind11.rpmlintrc
Normal file
73
.distro/pybind11.spec
Normal file
73
.distro/pybind11.spec
Normal file
@ -0,0 +1,73 @@
|
||||
Name: pybind11
|
||||
Version: 0.0.0
|
||||
Release: %autorelease
|
||||
Summary: Seamless operability between C++11 and Python
|
||||
|
||||
# TODO: https://github.com/pybind/pybind11/issues/5093
|
||||
License: BSD
|
||||
URL: https://github.com/pybind/pybind11
|
||||
BuildArch: noarch
|
||||
Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
|
||||
%global _description %{expand:
|
||||
pybind11 is a lightweight header-only library that exposes C++ types
|
||||
in Python and vice versa, mainly to create Python bindings of existing
|
||||
C++ code.
|
||||
}
|
||||
|
||||
%description %_description
|
||||
|
||||
%package devel
|
||||
Summary: Development files for pybind11
|
||||
BuildRequires: pybind11-devel
|
||||
Provides: pybind11-static = %{version}-%{release}
|
||||
%description devel %_description
|
||||
|
||||
Development files.
|
||||
|
||||
%package -n python3-pybind11
|
||||
Summary: %{summary}
|
||||
BuildRequires: pybind11-devel
|
||||
%description -n python3-pybind11 %_description
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n pybind11-%{version}
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%pyproject_save_files pybind11
|
||||
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
|
||||
%files devel
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{_includedir}/pybind11/
|
||||
%{_datadir}/cmake/pybind11/
|
||||
%{_bindir}/pybind11-config
|
||||
%{_datadir}/pkgconfig/pybind11.pc
|
||||
|
||||
%files -n python3-pybind11 -f %{pyproject_files}
|
||||
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
70
.packit.yaml
Normal file
70
.packit.yaml
Normal file
@ -0,0 +1,70 @@
|
||||
packages:
|
||||
pybind11:
|
||||
# Use `path` when upstream issue is clarified
|
||||
# https://github.com/packit/packit/issues/2272#issuecomment-2033712303
|
||||
specfile_path: .distro/pybind11.spec
|
||||
downstream_package_name: pybind11
|
||||
files_to_sync:
|
||||
- src: .distro/pybind11.spec
|
||||
dest: pybind11.spec
|
||||
- .packit.yaml
|
||||
- src: .distro/pybind11.rpmlintrc
|
||||
dest: pybind11.rpmlintrc
|
||||
# tmt setup
|
||||
- src: .distro/.fmf/
|
||||
dest: .fmf/
|
||||
- src: .distro/plans/
|
||||
dest: plans/
|
||||
filters:
|
||||
- "- main.fmf.dist-git"
|
||||
- "- rpminspect.fmf"
|
||||
- "- rpmlint.fmf"
|
||||
- src: .distro/tests/
|
||||
dest: tests/
|
||||
- src: .distro/plans/main.fmf.dist-git
|
||||
dest: plans/main.fmf
|
||||
|
||||
update_release: false
|
||||
upstream_tag_template: v{version}
|
||||
|
||||
jobs:
|
||||
- &copr
|
||||
job: copr_build
|
||||
trigger: release
|
||||
owner: "@scikit-build"
|
||||
project: release
|
||||
targets:
|
||||
- fedora-all-x86_64
|
||||
- fedora-all-aarch64
|
||||
- &tests
|
||||
job: tests
|
||||
trigger: release
|
||||
targets:
|
||||
- fedora-all-x86_64
|
||||
- fedora-all-aarch64
|
||||
fmf_path: .distro
|
||||
- <<: *copr
|
||||
trigger: commit
|
||||
project: nightly
|
||||
branch: main
|
||||
- <<: *tests
|
||||
trigger: commit
|
||||
- <<: *copr
|
||||
trigger: pull_request
|
||||
project: pybind11
|
||||
update_release: true
|
||||
release_suffix: "{PACKIT_RPMSPEC_RELEASE}"
|
||||
- <<: *tests
|
||||
trigger: pull_request
|
||||
- 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
|
Loading…
Reference in New Issue
Block a user