[packages/python3-fastimport] Up to 0.9.16
arekm
arekm at pld-linux.org
Thu Nov 12 08:58:05 CET 2026
commit 0d7d81e32739fcd243fbd1b6fdb857a3cc88e2bf
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 12 01:54:11 2026 +0100
Up to 0.9.16
python3-fastimport-query-all-fields.patch | 13 +++++++
python3-fastimport-scripts-bytes-params.patch | 54 +++++++++++++++++++++++++++
python3-fastimport.spec | 29 ++++++++------
3 files changed, 85 insertions(+), 11 deletions(-)
---
diff --git a/python3-fastimport.spec b/python3-fastimport.spec
index b65f67c..75e7deb 100644
--- a/python3-fastimport.spec
+++ b/python3-fastimport.spec
@@ -6,18 +6,25 @@
Summary: Python parser for fastimport (VCS interchange format)
Summary(pl.UTF-8): Pythonowy parser formatu fastimport (do wymiany VCS)
Name: python3-%{module}
-Version: 0.9.14
-Release: 6
+Version: 0.9.16
+Release: 1
License: GPL v2+
Group: Libraries/Python
#Source0Download: https://pypi.org/project/simple/
Source0: https://files.pythonhosted.org/packages/source/f/fastimport/%{module}-%{version}.tar.gz
-# Source0-md5: be8e2780fadd9e4047c7b37b91e20751
+# Source0-md5: c5cc05ba12f6ed9ce7e1057816162d2e
+Patch0: %{name}-scripts-bytes-params.patch
+Patch1: %{name}-query-all-fields.patch
URL: https://pypi.org/project/fastimport/
-BuildRequires: python3-modules >= 1:3.6
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.9
+BuildRequires: python3-setuptools >= 1:61.2
%if %{with tests}
%endif
-BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+Requires: python3-modules >= 1:3.9
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -32,9 +39,11 @@ przez inne projekty.
%prep
%setup -q -n %{module}-%{version}
+%patch -P0 -p1
+%patch -P1 -p1
%build
-%py3_build
+%py3_build_pyproject
%if %{with tests}
%{__python3} -m unittest fastimport.tests.test_suite
@@ -43,18 +52,16 @@ przez inne projekty.
%install
rm -rf $RPM_BUILD_ROOT
-%py3_install
-
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/tests
+%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS NEWS README.md
+%doc AUTHORS README.md
%attr(755,root,root) %{_bindir}/fast-import-filter
%attr(755,root,root) %{_bindir}/fast-import-info
%attr(755,root,root) %{_bindir}/fast-import-query
%{py3_sitescriptdir}/fastimport
-%{py3_sitescriptdir}/fastimport-%{version}-py*.egg-info
+%{py3_sitescriptdir}/fastimport-%{version}.dist-info
diff --git a/python3-fastimport-query-all-fields.patch b/python3-fastimport-query-all-fields.patch
new file mode 100644
index 0000000..5809dc4
--- /dev/null
+++ b/python3-fastimport-query-all-fields.patch
@@ -0,0 +1,13 @@
+# helpers.defines_to_dict() returns "" (was 1) for -Cname, so query showed no fields instead of all
+diff -urN qa/fastimport/processors/query_processor.py qb/fastimport/processors/query_processor.py
+--- fastimport-0.9.16.orig/fastimport/processors/query_processor.py 2026-11-12 01:53:09.513333333 +0100
++++ fastimport-0.9.16/fastimport/processors/query_processor.py 2026-11-12 01:53:15.575550463 +0100
+@@ -51,7 +51,7 @@
+ )
+ del params[b"commit-mark"]
+ for name, value in params.items():
+- if value == 1:
++ if value == 1 or value == "":
+ # All fields
+ fields = None
+ else:
diff --git a/python3-fastimport-scripts-bytes-params.patch b/python3-fastimport-scripts-bytes-params.patch
new file mode 100644
index 0000000..a43591d
--- /dev/null
+++ b/python3-fastimport-scripts-bytes-params.patch
@@ -0,0 +1,54 @@
+# fast-import-filter/-query pass str params and a single -x/-C string; the processors want bytes keys and lists
+diff -urN a/bin/fast-import-filter b/bin/fast-import-filter
+--- fastimport-0.9.16.orig/bin/fast-import-filter 2025-09-30 15:08:19.000000000 +0200
++++ fastimport-0.9.16/bin/fast-import-filter 2026-11-12 01:52:47.521470941 +0100
+@@ -65,7 +65,8 @@
+ help="Only include commits affecting these paths."
+ " Directories should have a trailing /.")
+ parser.add_option('-x', '--exclude-paths', dest="exclude_paths",
+- type=str, help="Exclude these paths from commits.")
++ action="append", type=str,
++ help="Exclude these paths from commits.")
+ parser.add_option('--dont-squash-empty-commits',
+ dest="dont_squash_empty_commits", action="store_true",
+ help="Preserve all commits and links between them",
+@@ -81,11 +82,12 @@
+ parser.print_usage()
+
+ from fastimport.processors import filter_processor
++import os
+ params = {
+- 'include_paths': opts.include_paths,
+- 'exclude_paths': opts.exclude_paths,
++ b'include_paths': opts.include_paths and [os.fsencode(p) for p in opts.include_paths],
++ b'exclude_paths': opts.exclude_paths and [os.fsencode(p) for p in opts.exclude_paths],
+ }
+-params['squash_empty_commits'] = (not opts.dont_squash_empty_commits)
++params[b'squash_empty_commits'] = (not opts.dont_squash_empty_commits)
+
+ from fastimport.errors import ParsingError
+ from fastimport import parser
+diff -urN a/bin/fast-import-query b/bin/fast-import-query
+--- fastimport-0.9.16.orig/bin/fast-import-query 2025-09-30 15:08:19.000000000 +0200
++++ fastimport-0.9.16/bin/fast-import-query 2026-11-12 01:53:09.499591698 +0100
+@@ -46,7 +46,7 @@
+ action="store_true", help="Be verbose")
+ parser.add_option('-m', '--commit-mark', dest="commit_mark",
+ type=str, help="Mark of the commit to display.")
+-parser.add_option('-C', '--commands', type=str,
++parser.add_option('-C', '--commands', action="append", type=str,
+ help="Display fields for these commands.")
+
+ (opts, args) = parser.parse_args()
+@@ -63,9 +63,9 @@
+ from fastimport.errors import ParsingError
+ from fastimport import parser
+
+-params = defines_to_dict(opts.commands) or {}
++params = {k.encode('utf-8'): v for k, v in (defines_to_dict(opts.commands) or {}).items()}
+ if opts.commit_mark:
+- params['commit-mark'] = opts.commit_mark
++ params[b'commit-mark'] = opts.commit_mark
+
+ stream = get_source_stream(source_path)
+ proc = query_processor.QueryProcessor(verbose=opts.verbose, params=params)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-fastimport.git/commitdiff/0d7d81e32739fcd243fbd1b6fdb857a3cc88e2bf
More information about the pld-cvs-commit
mailing list