public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/khal] rawhide: spec cleanup + enable completions for bash, zsh and fish shell
Date: Tue, 09 Jun 2026 02:10:59 GMT [thread overview]
Message-ID: <178097105959.1.16602292023263577043.rpms-khal-38c376b19273@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/khal
Branch : rawhide
Commit : 38c376b192732c92a6334df5feda02c8db751a6d
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date : 2026-06-08T23:10:43-03:00
Stats : +42/-15 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/khal/c/38c376b192732c92a6334df5feda02c8db751a6d?branch=rawhide
Log:
spec cleanup + enable completions for bash, zsh and fish shell
---
diff --git a/khal.spec b/khal.spec
index 0cec692..907614d 100644
--- a/khal.spec
+++ b/khal.spec
@@ -9,17 +9,17 @@ Summary: CLI calendar application
License: MIT
URL: https://github.com/pimutils/%{name}
-Source0: https://files.pythonhosted.org/packages/source/k/%{name}/%{name}-%{version}.tar.gz
+Source: https://files.pythonhosted.org/packages/source/k/%{name}/%{name}-%{version}.tar.gz
# In theory documentation requires sphinxcontrib.newsfeed to generate
# a blog of the changelog. We only need the manpage. We also fix a Makefile error
# which happens when using .tar.gz
-Patch0: khal-0.8.2-sphinx-docfix.patch
+Patch: khal-0.8.2-sphinx-docfix.patch
# Support Python 3.14.
# https://github.com/pimutils/khal/pull/1417
-Patch1: khal-0.13.0-support-py3.14.patch
+Patch: khal-0.13.0-support-py3.14.patch
# Reduce setuptools requirement. Fedora 42 lacks setuptools 77+.
-Patch2: khal-0.13.0-reduce-setuptools-req.patch
+Patch: khal-0.13.0-reduce-setuptools-req.patch
BuildArch: noarch
BuildRequires: make
@@ -27,15 +27,6 @@ BuildRequires: python3-devel
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx_rtd_theme
-Requires: python3-click >= 3.2
-Requires: python3-click-log >= 0.2.0
-Requires: python3-configobj
-Requires: python3-dateutil
-Requires: python3-icalendar
-Requires: python3-urwid
-Requires: python3-tzlocal
-Requires: python3-pytz
-Requires: python3-pyxdg
Requires: vdirsyncer >= 0.8.1-2
%description
@@ -51,7 +42,11 @@ calendars with a variety of other programs on a host of different platforms.
sed -i 's/^\(requires-python *= *">=[^"]*\),<3\.15"/\1"/' pyproject.toml
%generate_buildrequires
+%if %{with tests}
%pyproject_buildrequires -t
+%else
+%pyproject_buildrequires
+%endif
%build
%pyproject_wheel
@@ -64,12 +59,38 @@ cd ..
%pyproject_install
%pyproject_save_files khal
# separately install man pages
-install -d "$RPM_BUILD_ROOT%{_mandir}/man1"
-cp -r doc/build/man/%{name}.1 "$RPM_BUILD_ROOT%{_mandir}/man1"
+install -d "%{buildroot}%{_mandir}/man1"
+cp -r doc/build/man/%{name}.1 "%{buildroot}%{_mandir}/man1"
# Remove extra copy of text docs
rm -vrf doc/build/html/_sources
rm -fv doc/build/html/{.buildinfo,objects.inv}
+# Generate and install shell completions
+install -d %{buildroot}%{bash_completions_dir}
+install -d %{buildroot}%{fish_completions_dir}
+install -d %{buildroot}%{zsh_completions_dir}
+
+PYTHONPATH=%{buildroot}%{python3_sitelib} \
+ _KHAL_COMPLETE=bash_source \
+ %{buildroot}%{_bindir}/khal > %{buildroot}%{bash_completions_dir}/khal
+PYTHONPATH=%{buildroot}%{python3_sitelib} \
+ _IKHAL_COMPLETE=bash_source \
+ %{buildroot}%{_bindir}/ikhal > %{buildroot}%{bash_completions_dir}/ikhal
+
+PYTHONPATH=%{buildroot}%{python3_sitelib} \
+ _KHAL_COMPLETE=fish_source \
+ %{buildroot}%{_bindir}/khal > %{buildroot}%{fish_completions_dir}/khal.fish
+PYTHONPATH=%{buildroot}%{python3_sitelib} \
+ _IKHAL_COMPLETE=fish_source \
+ %{buildroot}%{_bindir}/ikhal > %{buildroot}%{fish_completions_dir}/ikhal.fish
+
+PYTHONPATH=%{buildroot}%{python3_sitelib} \
+ _KHAL_COMPLETE=zsh_source \
+ %{buildroot}%{_bindir}/khal > %{buildroot}%{zsh_completions_dir}/_khal
+PYTHONPATH=%{buildroot}%{python3_sitelib} \
+ _IKHAL_COMPLETE=zsh_source \
+ %{buildroot}%{_bindir}/ikhal > %{buildroot}%{zsh_completions_dir}/_ikhal
+
%check
%pyproject_check_import
@@ -85,6 +106,12 @@ rm -fv doc/build/html/{.buildinfo,objects.inv}
%{_bindir}/ikhal
%{_bindir}/khal
%{_mandir}/man1/%{name}.1.*
+%{bash_completions_dir}/khal
+%{bash_completions_dir}/ikhal
+%{fish_completions_dir}/khal.fish
+%{fish_completions_dir}/ikhal.fish
+%{zsh_completions_dir}/_khal
+%{zsh_completions_dir}/_ikhal
%changelog
%autochangelog
reply other threads:[~2026-06-09 2:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178097105959.1.16602292023263577043.rpms-khal-38c376b19273@fedoraproject.org \
--to=rosset.filipe@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox