Skip to content

Commit aa1f873

Browse files
authored
Refactor rpm packaging (#125)
1 parent 3e0fa69 commit aa1f873

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

.packit.yaml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
specfile_path: dist/subprocess-tee.spec
77
actions:
88
create-archive:
9+
- sh -c "rm dist/*.tar.gz >/dev/null || true"
910
- python3 -m build --sdist --outdir dist
10-
- sh -c "ls dist/subprocess-tee-*.tar.gz"
11+
- sh -c "ls dist/subprocess_tee-*.tar.gz"
1112
get-current-version:
1213
- python3 -m setuptools_scm --strip-dev
1314
post-upstream-clone:
@@ -17,21 +18,29 @@ actions:
1718
srpm_build_deps:
1819
- python3-build
1920
- python3-setuptools_scm
21+
- python3-pytest
2022
jobs:
2123
- job: copr_build
24+
trigger: pull_request
25+
branch: main
2226
targets:
23-
# See https://packit.dev/docs/configuration/#aliases
24-
# API to get available targets: https://api.dev.testing-farm.io/v0.1/composes/public
25-
# Fedora 37 is the first version having a setuptools(-scm) that supports our PEP-621 metadata
26-
- fedora-37
27-
- fedora-rawhide
27+
- fedora-rawhide-x86_64
28+
- fedora-rawhide-aarch64
29+
- fedora-latest-x86_64
30+
- fedora-latest-aarch64
31+
# Missing python3-build see https://bugzilla.redhat.com/show_bug.cgi?id=2129071
32+
# - centos-stream-9-aarch64
33+
# - centos-stream-9-x86_64
34+
- job: tests
2835
trigger: pull_request
29-
# - job: tests
30-
# trigger: pull_request
31-
# metadata:
32-
# targets:
33-
# - fedora-all
36+
branch: main
37+
targets:
38+
- fedora-latest
39+
- fedora-rawhide
3440
# - job: propose_downstream
3541
# trigger: release
3642
# metadata:
3743
# dist-git-branch: master
44+
notifications:
45+
pull_request:
46+
successful_build: false

tox.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,12 @@ commands =
8989
{toxinidir}
9090
# metadata validation
9191
python -m twine check --strict {toxinidir}/dist/*
92+
93+
[testenv:rpm]
94+
description = Use packit to build RPM (requires RPM based Linux distro)
95+
deps =
96+
build
97+
packitos
98+
setuptools-scm
99+
commands =
100+
sh -c "packit build in-mock --root=fedora-40-$(arch)"

0 commit comments

Comments
 (0)