public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-jupyter-kernel-test] epel10: Backport patch to replace flit.ini with pyproject.toml
@ 2026-07-11 15:45 Tomas Hrnciar
  0 siblings, 0 replies; only message in thread
From: Tomas Hrnciar @ 2026-07-11 15:45 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-jupyter-kernel-test
            Branch : epel10
            Commit : 01c7727586adf886ca4be00dc8f684a73139c495
            Author : Tomas Hrnciar <thrnciar@redhat.com>
            Date   : 2020-10-02T14:02:53+02:00
            Stats  : +72/-14 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-jupyter-kernel-test/c/01c7727586adf886ca4be00dc8f684a73139c495?branch=epel10

            Log:
            Backport patch to replace flit.ini with pyproject.toml

flit 3.0.0 requires pyproject.toml instead of flit.ini file.
Spec was also rewritten to use pyproject-rpm-macros.

---
diff --git a/0001-Replace-flit.ini-file-with-pyproject.toml.patch b/0001-Replace-flit.ini-file-with-pyproject.toml.patch
new file mode 100644
index 0000000..9235612
--- /dev/null
+++ b/0001-Replace-flit.ini-file-with-pyproject.toml.patch
@@ -0,0 +1,55 @@
+From 85d2e7a4572d8932162088139a702ae545cb3d8b Mon Sep 17 00:00:00 2001
+From: Tomas Hrnciar <thrnciar@redhat.com>
+Date: Fri, 2 Oct 2020 09:47:58 +0200
+Subject: [PATCH] Replace flit.ini file with pyproject.toml
+
+---
+ flit.ini       | 14 --------------
+ pyproject.toml | 14 ++++++++++++++
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+ delete mode 100644 flit.ini
+ create mode 100644 pyproject.toml
+
+diff --git a/flit.ini b/flit.ini
+deleted file mode 100644
+index 5c96d24..0000000
+--- a/flit.ini
++++ /dev/null
+@@ -1,14 +0,0 @@
+-[metadata]
+-module = jupyter_kernel_test
+-author = Jupyter Development Team
+-author-email = jupyter@googlegroups.com
+-home-page = https://github.com/jupyter/jupyter_kernel_test
+-description-file = README.rst
+-classifiers = License :: OSI Approved :: BSD License
+-    Intended Audience :: Developers
+-    Programming Language :: Python :: 3
+-    Topic :: Software Development :: Testing
+-requires-python = >=3.4
+-requires = traitlets
+-           jupyter_client
+-           nose
+diff --git a/pyproject.toml b/pyproject.toml
+new file mode 100644
+index 0000000..7b82de5
+--- /dev/null
++++ b/pyproject.toml
+@@ -0,0 +1,14 @@
++[build-system]
++requires = ["flit_core >=2,<4"]
++build-backend = "flit_core.buildapi"
++
++[tool.flit.metadata]
++module = "jupyter_kernel_test"
++author = "Jupyter Development Team"
++author-email = "jupyter@googlegroups.com"
++home-page = "https://github.com/jupyter/jupyter_kernel_test"
++description-file = "README.rst"
++classifiers = ["License :: OSI Approved :: BSD License", "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Topic :: Software Development :: Testing"]
++requires-python = ">=3.4"
++requires = ["traitlets", "jupyter_client", "nose"]
++
+--
+2.26.2
+

diff --git a/python-jupyter-kernel-test.spec b/python-jupyter-kernel-test.spec
index bc660dd..d0757ac 100644
--- a/python-jupyter-kernel-test.spec
+++ b/python-jupyter-kernel-test.spec
@@ -3,7 +3,7 @@
 
 Name:           python-%{srcname}
 Version:        0.3
-Release:        15%{?dist}
+Release:        16%{?dist}
 Summary:        Machinery for testing Jupyter kernels via the messaging protocol
 
 License:        BSD
@@ -12,16 +12,16 @@ Source0:        https://github.com/jupyter/%{srcname_}/archive/%{version}/%{srcn
 
 # https://github.com/jupyter/jupyter_kernel_test/issues/42
 Patch0:         https://github.com/jupyter/jupyter_kernel_test/commit/0b78c2835fad5df3be182ddd5013a73a63c4f81e.patch
+# flit 3.0.0 expects pyproject.toml file instead of flit.ini.
+# When a new version of jupyter_kernel_test is released
+# this patch can be removed.
+Patch1:         0001-Replace-flit.ini-file-with-pyproject.toml.patch
 
 BuildArch:      noarch
 
 # No support for Python 2.
 BuildRequires:  python3-devel
-BuildRequires:  python3-pip
-BuildRequires:  python3-flit
-BuildRequires:  python3-traitlets
-BuildRequires:  python3-jupyter-client
-BuildRequires:  python3-nose
+BuildRequires:  pyproject-rpm-macros
 
 BuildRequires:  python3-ipykernel
 
@@ -44,19 +44,20 @@ jupyter_kernel_test is a tool for testing Jupyter kernels. It tests kernels for
 successful code execution and conformance with the Jupyter Messaging Protocol
 (currently 5.0).
 
+%generate_buildrequires
+%pyproject_buildrequires -r
+
 
 %prep
 %autosetup -n %{srcname_}-%{version} -p1
 
 
 %build
-export FLIT_NO_NETWORK=1
-XDG_CACHE_HOME=$PWD/.cache flit build --format wheel
-
+%pyproject_wheel
 
 %install
-%py3_install_wheel %{srcname_}-%{version}-py3-none-any.whl
-
+%pyproject_install
+%pyproject_save_files %{srcname_}
 
 %check
 PYTHONPATH="%{buildroot}%{python3_sitelib}" \
@@ -65,14 +66,16 @@ PYTHONPATH="%{buildroot}%{python3_sitelib}" \
 
 # Note that there is no %%files section for the unversioned python module if we
 # are building for several python runtimes
-%files -n python3-%{srcname}
+%files -n python3-%{srcname} -f %{pyproject_files}
 %license COPYING.md
 %doc README.rst
-%{python3_sitelib}/%{srcname_}
-%{python3_sitelib}/%{srcname_}-%{version}.dist-info
 
 
 %changelog
+* Fri Oct 02 2020 Tomas Hrnciar <thrnciar@redhat.com> - 0.3-16
+- Backport patch to replace flit.ini with pyproject.toml needed by flit 3.0.0
+- Convert spec to use pyproject-rpm-macros
+
 * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-15
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-11 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-11 15:45 [rpms/python-jupyter-kernel-test] epel10: Backport patch to replace flit.ini with pyproject.toml Tomas Hrnciar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox