From aafb0914822024bfd927ab73a70c43ebe623998c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 14 Feb 2020 22:07:43 -0500 Subject: [PATCH 01/46] Re-enable build on armv7hl and ppc64le. --- xeus.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xeus.spec b/xeus.spec index 1462711..a20f6ba 100644 --- a/xeus.spec +++ b/xeus.spec @@ -7,11 +7,6 @@ License: BSD URL: https://github.com/QuantStack/xeus Source0: https://github.com/QuantStack/xeus/archive/%{version}/%{name}-%{version}.tar.gz -# xtl is broken on some arches. -# https://bugzilla.redhat.com/show_bug.cgi?id=1745840 -# https://bugzilla.redhat.com/show_bug.cgi?id=1745841 -ExcludeArch: armv7hl ppc64le - BuildRequires: cmake >= 3.8 BuildRequires: cmake(cppzmq) >= 4.3.0 BuildRequires: cmake(nlohmann_json) >= 3.2.0 @@ -78,6 +73,7 @@ ctest -V %changelog * Fri Feb 14 2020 Elliott Sales de Andrade - 0.23.5-1 - Update to latest version +- Re-enable build on armv7hl and ppc64le * Fri Jan 31 2020 Fedora Release Engineering - 0.23.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From ac5311daea337a2fe7b2a070b8627cd22cfb73c4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 13 Jun 2020 01:39:30 -0400 Subject: [PATCH 02/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4a8234a..8e46d26 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /xeus-0.23.8.tar.gz /xeus-0.23.9.tar.gz /xeus-0.23.14.tar.gz +/xeus-0.24.0.tar.gz diff --git a/sources b/sources index e70296f..4040fa5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-0.23.14.tar.gz) = 950411e57c52aee0343b8eb28c0ad9b15be49fb87e64cf62d83b4b711e3c08c8da44ed7ba8980df0a8a9c0ae8b00fc8c681f5caa4bb18dc29ffdf33ab663feaf +SHA512 (xeus-0.24.0.tar.gz) = af5b82797dcd1057bd3d669f5c35cc0d29bc43d0743236674ed89076f09a6e79ba4b96df9b5252e7a69665f4c2e7b9370aecf07caa397251e97f97df0a4445af diff --git a/xeus.spec b/xeus.spec index c3e1b4a..3457a58 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 0.23.14 +Version: 0.24.0 Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol @@ -71,6 +71,9 @@ ctest -V %changelog +* Sat Jun 13 2020 Elliott Sales de Andrade - 0.24.0-1 +- Update to latest version + * Mon May 18 2020 Elliott Sales de Andrade - 0.23.14-1 - Update to latest version From 2d847226c9144fc885ff9b365fed64a2081282f9 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 26 Jun 2020 23:27:52 -0400 Subject: [PATCH 03/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8e46d26..804cdd2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /xeus-0.23.9.tar.gz /xeus-0.23.14.tar.gz /xeus-0.24.0.tar.gz +/xeus-0.24.1.tar.gz diff --git a/sources b/sources index 4040fa5..5dabf30 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-0.24.0.tar.gz) = af5b82797dcd1057bd3d669f5c35cc0d29bc43d0743236674ed89076f09a6e79ba4b96df9b5252e7a69665f4c2e7b9370aecf07caa397251e97f97df0a4445af +SHA512 (xeus-0.24.1.tar.gz) = 85985bef9e0feef5d81473c561626d3d5ea658f5718559c454b4008f40ee3bcbac2862e7fb9d5fbcade37edb42681cf9e63b59a11bf3955b05495045c5667173 diff --git a/xeus.spec b/xeus.spec index 3457a58..2676799 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 0.24.0 +Version: 0.24.1 Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol @@ -71,6 +71,9 @@ ctest -V %changelog +* Fri Jun 26 2020 Elliott Sales de Andrade - 0.24.1-1 +- Update to latest version + * Sat Jun 13 2020 Elliott Sales de Andrade - 0.24.0-1 - Update to latest version From 6e921bba143d74bcdf4daba5e513e419ce1f0a38 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 14:36:20 +0000 Subject: [PATCH 04/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xeus.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xeus.spec b/xeus.spec index 2676799..10acf69 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,6 +1,6 @@ Name: xeus Version: 0.24.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ implementation of the Jupyter kernel protocol License: BSD @@ -71,6 +71,9 @@ ctest -V %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 0.24.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jun 26 2020 Elliott Sales de Andrade - 0.24.1-1 - Update to latest version From 5cf0f64667a0537a529abf7dcb48c0ff889aa0e2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 09:41:18 +0000 Subject: [PATCH 05/46] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xeus.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xeus.spec b/xeus.spec index 10acf69..2bc2b2b 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,6 +1,6 @@ Name: xeus Version: 0.24.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: C++ implementation of the Jupyter kernel protocol License: BSD @@ -71,6 +71,10 @@ ctest -V %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 0.24.1-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 0.24.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 5fe9288511af47e96e9803f86f11d2728b9d5a85 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 1 Aug 2020 22:55:01 -0400 Subject: [PATCH 06/46] Fix for cmake change. --- xeus.spec | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/xeus.spec b/xeus.spec index 2bc2b2b..e5cd71f 100644 --- a/xeus.spec +++ b/xeus.spec @@ -42,25 +42,23 @@ Development files for %{name} library. %build -mkdir build && cd build -%cmake -DXEUS_BUILD_STATIC_LIBS=OFF -DXEUS_DISABLE_ARCH_NATIVE=ON .. -%make_build +%cmake -DXEUS_BUILD_STATIC_LIBS=OFF -DXEUS_DISABLE_ARCH_NATIVE=ON +%cmake_build -make -C ../docs SPHINXBUILD=sphinx-build-3 html BUILDDIR=${PWD} -rm html/.buildinfo +make -C docs SPHINXBUILD=sphinx-build-3 html +rm docs/build/html/.buildinfo %install -%make_install -C build +%cmake_install %check -cd build -ctest -V +%ctest %files -%doc README.md build/html +%doc README.md docs/build/html %license LICENSE %{_libdir}/libxeus.so.1* From 8741881598c7cae826555c5add319b1094edd3fd Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 6 Oct 2020 22:37:07 -0400 Subject: [PATCH 07/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 804cdd2..3099b68 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /xeus-0.23.14.tar.gz /xeus-0.24.0.tar.gz /xeus-0.24.1.tar.gz +/xeus-0.24.2.tar.gz diff --git a/sources b/sources index 5dabf30..abc91af 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-0.24.1.tar.gz) = 85985bef9e0feef5d81473c561626d3d5ea658f5718559c454b4008f40ee3bcbac2862e7fb9d5fbcade37edb42681cf9e63b59a11bf3955b05495045c5667173 +SHA512 (xeus-0.24.2.tar.gz) = 565e8d6aef8038958a4a5cdfdf87e6fb14f57545556f95275475d8771633c384e442cb742a1905ecea33dc0751254370a8ec5b7390f703665a95df265d717abf diff --git a/xeus.spec b/xeus.spec index e5cd71f..3281ffb 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,6 +1,6 @@ Name: xeus -Version: 0.24.1 -Release: 3%{?dist} +Version: 0.24.2 +Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol License: BSD @@ -69,6 +69,9 @@ rm docs/build/html/.buildinfo %changelog +* Tue Oct 06 2020 Elliott Sales de Andrade - 0.24.2-1 +- Update to latest version (#1884918) + * Sat Aug 01 2020 Fedora Release Engineering - 0.24.1-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From d5ace9e40c97b2d6a802fe9c52d0de678162fd35 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 8 Nov 2020 04:03:40 -0500 Subject: [PATCH 08/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3099b68..80081ab 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /xeus-0.24.0.tar.gz /xeus-0.24.1.tar.gz /xeus-0.24.2.tar.gz +/xeus-0.24.3.tar.gz diff --git a/sources b/sources index abc91af..8e90b30 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-0.24.2.tar.gz) = 565e8d6aef8038958a4a5cdfdf87e6fb14f57545556f95275475d8771633c384e442cb742a1905ecea33dc0751254370a8ec5b7390f703665a95df265d717abf +SHA512 (xeus-0.24.3.tar.gz) = 7da96c405eb9471f189b579e78a522c0aa1cc73a3ce7f901f115f2db5e67d8afb91e4342fdb16b04ce10e6ea38521b23d497a4e5828baf2630117940d8f94daf diff --git a/xeus.spec b/xeus.spec index 3281ffb..cdf695b 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 0.24.2 +Version: 0.24.3 Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol @@ -69,6 +69,9 @@ rm docs/build/html/.buildinfo %changelog +* Sun Nov 08 2020 Elliott Sales de Andrade - 0.24.3-1 +- Update to latest version (#1895579) + * Tue Oct 06 2020 Elliott Sales de Andrade - 0.24.2-1 - Update to latest version (#1884918) From 6c4287e111c3cc2f66934617a3d6e93466b73db6 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 9 Nov 2020 22:25:04 -0500 Subject: [PATCH 09/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 80081ab..85ea91b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /xeus-0.24.1.tar.gz /xeus-0.24.2.tar.gz /xeus-0.24.3.tar.gz +/xeus-0.24.4.tar.gz diff --git a/sources b/sources index 8e90b30..7f35e4c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-0.24.3.tar.gz) = 7da96c405eb9471f189b579e78a522c0aa1cc73a3ce7f901f115f2db5e67d8afb91e4342fdb16b04ce10e6ea38521b23d497a4e5828baf2630117940d8f94daf +SHA512 (xeus-0.24.4.tar.gz) = 58ea771880ad98d44e8528bfb79a11b675178a786b7e8686394a9c5dc82d2c1abc7f6cf4be226030d7175af97fbc89b5ba373c8028f17e0eb08a03e136b480fb diff --git a/xeus.spec b/xeus.spec index cdf695b..d32de0f 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 0.24.3 +Version: 0.24.4 Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol @@ -69,6 +69,9 @@ rm docs/build/html/.buildinfo %changelog +* Mon Nov 09 2020 Elliott Sales de Andrade - 0.24.4-1 +- Update to latest version (#1896206) + * Sun Nov 08 2020 Elliott Sales de Andrade - 0.24.3-1 - Update to latest version (#1895579) From c47d50233761587cdf4a672468efdeea2918fb46 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 19 Nov 2020 01:30:33 -0500 Subject: [PATCH 10/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 85ea91b..30fb419 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /xeus-0.24.2.tar.gz /xeus-0.24.3.tar.gz /xeus-0.24.4.tar.gz +/xeus-0.25.0.tar.gz diff --git a/sources b/sources index 7f35e4c..4c902e8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-0.24.4.tar.gz) = 58ea771880ad98d44e8528bfb79a11b675178a786b7e8686394a9c5dc82d2c1abc7f6cf4be226030d7175af97fbc89b5ba373c8028f17e0eb08a03e136b480fb +SHA512 (xeus-0.25.0.tar.gz) = 025d9fde54ae17f1a3ef3f1d1b48174eb46608b200dc37882b7c633e410571cabe6fa70d24adafa880e269f86a71bc11e5e0e4f076f3084816d8a0c2ea997367 diff --git a/xeus.spec b/xeus.spec index d32de0f..42c7904 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 0.24.4 +Version: 0.25.0 Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol @@ -69,6 +69,9 @@ rm docs/build/html/.buildinfo %changelog +* Thu Nov 19 2020 Elliott Sales de Andrade - 0.25.0-1 +- Update to latest version (#1898255) + * Mon Nov 09 2020 Elliott Sales de Andrade - 0.24.4-1 - Update to latest version (#1896206) From db3d07b08bb1fff655fe6622c07c2111eb98a212 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 28 Nov 2020 02:43:36 -0500 Subject: [PATCH 11/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 30fb419..07bfcee 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /xeus-0.24.3.tar.gz /xeus-0.24.4.tar.gz /xeus-0.25.0.tar.gz +/xeus-0.25.1.tar.gz diff --git a/sources b/sources index 4c902e8..4b7812e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-0.25.0.tar.gz) = 025d9fde54ae17f1a3ef3f1d1b48174eb46608b200dc37882b7c633e410571cabe6fa70d24adafa880e269f86a71bc11e5e0e4f076f3084816d8a0c2ea997367 +SHA512 (xeus-0.25.1.tar.gz) = 7724f2b192068d1a6ea95c451cf94ce755845d7991eb02e8136f487f28368fbe12164979d4cdb617f458e28053b0adde697a9822fc2babdb325911c850b3f7a2 diff --git a/xeus.spec b/xeus.spec index 42c7904..a738a16 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 0.25.0 +Version: 0.25.1 Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol @@ -69,6 +69,9 @@ rm docs/build/html/.buildinfo %changelog +* Sat Nov 28 2020 Elliott Sales de Andrade - 0.25.1-1 +- Update to latest version (#1900027) + * Thu Nov 19 2020 Elliott Sales de Andrade - 0.25.0-1 - Update to latest version (#1898255) From 592df094d83cd72df519aec32691d2c6bf9a6b9c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 12 Dec 2020 04:40:19 -0500 Subject: [PATCH 12/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 07bfcee..e36b795 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /xeus-0.24.4.tar.gz /xeus-0.25.0.tar.gz /xeus-0.25.1.tar.gz +/xeus-0.25.3.tar.gz diff --git a/sources b/sources index 4b7812e..ef157df 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-0.25.1.tar.gz) = 7724f2b192068d1a6ea95c451cf94ce755845d7991eb02e8136f487f28368fbe12164979d4cdb617f458e28053b0adde697a9822fc2babdb325911c850b3f7a2 +SHA512 (xeus-0.25.3.tar.gz) = 78fd02821f366806abfb02697cbbab0d0c214362d76b6549d19afeee87f2c1d93e871e4b9ba8fef1d96a950ce47b3fbbff3a025825e894915cad0c625195c011 diff --git a/xeus.spec b/xeus.spec index a738a16..b726a49 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 0.25.1 +Version: 0.25.3 Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol @@ -69,6 +69,9 @@ rm docs/build/html/.buildinfo %changelog +* Sat Dec 12 2020 Elliott Sales de Andrade - 0.25.3-1 +- Update to latest version (#1906253) + * Sat Nov 28 2020 Elliott Sales de Andrade - 0.25.1-1 - Update to latest version (#1900027) From 5b7998ea14413704fbf99b35f2078068ef5ae1c0 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 01:16:40 +0000 Subject: [PATCH 13/46] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- xeus.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xeus.spec b/xeus.spec index b726a49..20d5e06 100644 --- a/xeus.spec +++ b/xeus.spec @@ -7,6 +7,7 @@ License: BSD URL: https://github.com/jupyter-xeus/xeus Source0: https://github.com/jupyter-xeus/xeus/archive/%{version}/%{name}-%{version}.tar.gz +BuildRequires: make BuildRequires: cmake >= 3.8 BuildRequires: cmake(cppzmq) >= 4.3.0 BuildRequires: cmake(nlohmann_json) >= 3.2.0 From 5c54f89059bba0952549e9eb70bfbe0c3fbe56da Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 23:56:09 +0000 Subject: [PATCH 14/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xeus.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xeus.spec b/xeus.spec index 20d5e06..73f7d87 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,6 +1,6 @@ Name: xeus Version: 0.25.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ implementation of the Jupyter kernel protocol License: BSD @@ -70,6 +70,9 @@ rm docs/build/html/.buildinfo %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 0.25.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sat Dec 12 2020 Elliott Sales de Andrade - 0.25.3-1 - Update to latest version (#1906253) From 6b46ea4ee1924a8ec0e60b6b6c3b07154a9829de Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 7 Feb 2021 18:29:32 -0500 Subject: [PATCH 15/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e36b795..559f8e2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /xeus-0.25.0.tar.gz /xeus-0.25.1.tar.gz /xeus-0.25.3.tar.gz +/xeus-1.0.0.tar.gz diff --git a/sources b/sources index ef157df..f2446ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-0.25.3.tar.gz) = 78fd02821f366806abfb02697cbbab0d0c214362d76b6549d19afeee87f2c1d93e871e4b9ba8fef1d96a950ce47b3fbbff3a025825e894915cad0c625195c011 +SHA512 (xeus-1.0.0.tar.gz) = 345587c42786bae1e2191b33aac8416dcbb35400c2d869da354f5c79697546a585a3a9405d606a0c6386aa3e16d623dd0d0b0edcfc0c03395af91f6c72befc8b diff --git a/xeus.spec b/xeus.spec index 73f7d87..5fc44c0 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,6 +1,6 @@ Name: xeus -Version: 0.25.3 -Release: 2%{?dist} +Version: 1.0.0 +Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol License: BSD @@ -11,7 +11,7 @@ BuildRequires: make BuildRequires: cmake >= 3.8 BuildRequires: cmake(cppzmq) >= 4.3.0 BuildRequires: cmake(nlohmann_json) >= 3.2.0 -BuildRequires: cmake(xtl) >= 0.5 +BuildRequires: cmake(xtl) >= 0.7 BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: gtest-devel @@ -70,6 +70,9 @@ rm docs/build/html/.buildinfo %changelog +* Sun Feb 07 2021 Elliott Sales de Andrade - 1.0.0-1 +- Update to latest version (#1919068) + * Wed Jan 27 2021 Fedora Release Engineering - 0.25.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 8a83eb1261edd84976847c2521936be7cfcc404f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 24 Feb 2021 05:13:55 -0500 Subject: [PATCH 16/46] Update to latest version. --- .gitignore | 1 + sources | 2 +- xeus.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 559f8e2..4075324 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /xeus-0.25.1.tar.gz /xeus-0.25.3.tar.gz /xeus-1.0.0.tar.gz +/xeus-1.0.1.tar.gz diff --git a/sources b/sources index f2446ee..e6c6e72 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-1.0.0.tar.gz) = 345587c42786bae1e2191b33aac8416dcbb35400c2d869da354f5c79697546a585a3a9405d606a0c6386aa3e16d623dd0d0b0edcfc0c03395af91f6c72befc8b +SHA512 (xeus-1.0.1.tar.gz) = 65eab4d5caf0e742acb2374f7be7705ed977c11a5312709112e378afd129c42da0ff738233e7d2144ce26ad723afe15767e20b1e842586707d766163e5bfa9c8 diff --git a/xeus.spec b/xeus.spec index 5fc44c0..d9387af 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 1.0.0 +Version: 1.0.1 Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol @@ -7,7 +7,6 @@ License: BSD URL: https://github.com/jupyter-xeus/xeus Source0: https://github.com/jupyter-xeus/xeus/archive/%{version}/%{name}-%{version}.tar.gz -BuildRequires: make BuildRequires: cmake >= 3.8 BuildRequires: cmake(cppzmq) >= 4.3.0 BuildRequires: cmake(nlohmann_json) >= 3.2.0 @@ -16,6 +15,7 @@ BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: gtest-devel BuildRequires: libuuid-devel +BuildRequires: make BuildRequires: openssl-devel >= 1.0.1 BuildRequires: pkgconfig(libzmq) >= 4.2.5 BuildRequires: python3dist(breathe) @@ -70,6 +70,9 @@ rm docs/build/html/.buildinfo %changelog +* Wed Feb 24 2021 Elliott Sales de Andrade - 1.0.1-1 +- Update to latest version (#1929422) + * Sun Feb 07 2021 Elliott Sales de Andrade - 1.0.0-1 - Update to latest version (#1919068) From d76d0bbca2ee06af4b88dfeadc2d20d46cac34b4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 11 Jul 2021 20:32:22 -0400 Subject: [PATCH 17/46] Update to latest version. Fix various build issues. --- .gitignore | 1 + 0001-Fix-build-with-Sphinx-4.patch | 40 +++++++++++++++++++++ 0002-Remove-all-RPATH-settings.patch | 52 ++++++++++++++++++++++++++++ sources | 2 +- xeus.spec | 13 +++++-- 5 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 0001-Fix-build-with-Sphinx-4.patch create mode 100644 0002-Remove-all-RPATH-settings.patch diff --git a/.gitignore b/.gitignore index 4075324..b3186f2 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /xeus-0.25.3.tar.gz /xeus-1.0.0.tar.gz /xeus-1.0.1.tar.gz +/xeus-1.0.3.tar.gz diff --git a/0001-Fix-build-with-Sphinx-4.patch b/0001-Fix-build-with-Sphinx-4.patch new file mode 100644 index 0000000..2b111d1 --- /dev/null +++ b/0001-Fix-build-with-Sphinx-4.patch @@ -0,0 +1,40 @@ +From 116e9272965094260e056437ca494fc726ba300a Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Sun, 11 Jul 2021 19:22:19 -0400 +Subject: [PATCH 1/2] Fix build with Sphinx 4. + +`add_stylesheet` was deprecated in 1.8 and removed in 4.0 [1]. The +replacement, `add_css_file` was added in 1.0, which is older than any +version required by `breathe`. + +[1] https://www.sphinx-doc.org/en/master/extdev/deprecated.html?highlight=add_stylesheet + +Signed-off-by: Elliott Sales de Andrade +--- + docs/source/conf.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/docs/source/conf.py b/docs/source/conf.py +index 58386c6..f67e96e 100644 +--- a/docs/source/conf.py ++++ b/docs/source/conf.py +@@ -15,8 +15,10 @@ html_theme = "sphinx_rtd_theme" + + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + ++ + def setup(app): +- app.add_stylesheet("main_stylesheet.css") ++ app.add_css_file("main_stylesheet.css") ++ + + extensions = ['breathe'] + breathe_projects = { 'xeus': '../xml' } +@@ -35,4 +37,3 @@ highlight_language = 'c++' + pygments_style = 'sphinx' + todo_include_todos = False + htmlhelp_basename = 'xeusdoc' +- +-- +2.31.1 + diff --git a/0002-Remove-all-RPATH-settings.patch b/0002-Remove-all-RPATH-settings.patch new file mode 100644 index 0000000..8138350 --- /dev/null +++ b/0002-Remove-all-RPATH-settings.patch @@ -0,0 +1,52 @@ +From d31cf19e37c2e847bef8917fd9cf8ed2fbb27b38 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Sun, 11 Jul 2021 20:14:15 -0400 +Subject: [PATCH 2/2] Remove all RPATH settings. + +If you need to set this, it's an environment-specific thing. + +Signed-off-by: Elliott Sales de Andrade +--- + CMakeLists.txt | 19 ------------------- + 1 file changed, 19 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 903dcf9..6b3a26d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -195,13 +195,6 @@ include(CheckCXXCompilerFlag) + + string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE) + +-if (NOT APPLE) +- set(CMAKE_SKIP_BUILD_RPATH FALSE) +- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +-endif () +- +-set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +- + if (XEUS_STATIC_DEPENDENCIES AND NOT MSVC AND NOT APPLE) + # Explicitly finds and links with libsodium.a + # because it is not exported as a dependency by +@@ -223,18 +216,6 @@ macro(xeus_create_target target_name linkage output_name) + + add_library(${target_name} ${linkage_upper} ${XEUS_SOURCES} ${XEUS_HEADERS}) + +- if (APPLE) +- set_target_properties( +- ${target_name} PROPERTIES +- MACOSX_RPATH ON +- ) +- else () +- set_target_properties( +- ${target_name} PROPERTIES +- BUILD_WITH_INSTALL_RPATH 1 +- ) +- endif () +- + target_include_directories( + ${target_name} + PUBLIC $ +-- +2.31.1 + diff --git a/sources b/sources index e6c6e72..855b118 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-1.0.1.tar.gz) = 65eab4d5caf0e742acb2374f7be7705ed977c11a5312709112e378afd129c42da0ff738233e7d2144ce26ad723afe15767e20b1e842586707d766163e5bfa9c8 +SHA512 (xeus-1.0.3.tar.gz) = e2a8ad892b60989f75eff161ea1a024a012dd46b39ae85604acf8876593c5e46939233002c2fb7e79d45bdd076635bffdf3ada4ae6ae6c9e1fde8339f1c6bce9 diff --git a/xeus.spec b/xeus.spec index d9387af..2e6cf54 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,11 +1,15 @@ Name: xeus -Version: 1.0.1 +Version: 1.0.3 Release: 1%{?dist} Summary: C++ implementation of the Jupyter kernel protocol License: BSD URL: https://github.com/jupyter-xeus/xeus Source0: https://github.com/jupyter-xeus/xeus/archive/%{version}/%{name}-%{version}.tar.gz +# https://github.com/jupyter-xeus/xeus/pull/280 +Patch0001: 0001-Fix-build-with-Sphinx-4.patch +# https://github.com/jupyter-xeus/xeus/pull/281 +Patch0002: 0002-Remove-all-RPATH-settings.patch BuildRequires: cmake >= 3.8 BuildRequires: cmake(cppzmq) >= 4.3.0 @@ -43,7 +47,7 @@ Development files for %{name} library. %build -%cmake -DXEUS_BUILD_STATIC_LIBS=OFF -DXEUS_DISABLE_ARCH_NATIVE=ON +%cmake -DXEUS_BUILD_STATIC_LIBS=OFF -DXEUS_DISABLE_ARCH_NATIVE=ON -DXEUS_BUILD_TESTS=ON %cmake_build make -C docs SPHINXBUILD=sphinx-build-3 html @@ -70,6 +74,11 @@ rm docs/build/html/.buildinfo %changelog +* Sun Jul 11 2021 Elliott Sales de Andrade - 1.0.3-1 +- Update to latest version (#1965198) +- Fix build with Sphinx 4 (#1977665) +- Remove unnecessary RPATH directories + * Wed Feb 24 2021 Elliott Sales de Andrade - 1.0.1-1 - Update to latest version (#1929422) From b8dc771644be3df32196be82f3456b04e455b728 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 21:27:08 +0000 Subject: [PATCH 18/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xeus.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xeus.spec b/xeus.spec index 2e6cf54..96a7369 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,6 +1,6 @@ Name: xeus Version: 1.0.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ implementation of the Jupyter kernel protocol License: BSD @@ -74,6 +74,9 @@ rm docs/build/html/.buildinfo %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Sun Jul 11 2021 Elliott Sales de Andrade - 1.0.3-1 - Update to latest version (#1965198) - Fix build with Sphinx 4 (#1977665) From bc261a2588e47a002f144c0cc3b33ceb910b0d6f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 22 Aug 2021 01:01:36 -0400 Subject: [PATCH 19/46] Convert to rpmautospec. --- changelog | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ xeus.spec | 81 ++----------------------------------------------------- 2 files changed, 80 insertions(+), 79 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..9dbe962 --- /dev/null +++ b/changelog @@ -0,0 +1,78 @@ +* Fri Jul 23 2021 Fedora Release Engineering - 1.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Sun Jul 11 2021 Elliott Sales de Andrade - 1.0.3-1 +- Update to latest version (#1965198) +- Fix build with Sphinx 4 (#1977665) +- Remove unnecessary RPATH directories + +* Wed Feb 24 2021 Elliott Sales de Andrade - 1.0.1-1 +- Update to latest version (#1929422) + +* Sun Feb 07 2021 Elliott Sales de Andrade - 1.0.0-1 +- Update to latest version (#1919068) + +* Wed Jan 27 2021 Fedora Release Engineering - 0.25.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Dec 12 2020 Elliott Sales de Andrade - 0.25.3-1 +- Update to latest version (#1906253) + +* Sat Nov 28 2020 Elliott Sales de Andrade - 0.25.1-1 +- Update to latest version (#1900027) + +* Thu Nov 19 2020 Elliott Sales de Andrade - 0.25.0-1 +- Update to latest version (#1898255) + +* Mon Nov 09 2020 Elliott Sales de Andrade - 0.24.4-1 +- Update to latest version (#1896206) + +* Sun Nov 08 2020 Elliott Sales de Andrade - 0.24.3-1 +- Update to latest version (#1895579) + +* Tue Oct 06 2020 Elliott Sales de Andrade - 0.24.2-1 +- Update to latest version (#1884918) + +* Sat Aug 01 2020 Fedora Release Engineering - 0.24.1-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.24.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jun 26 2020 Elliott Sales de Andrade - 0.24.1-1 +- Update to latest version + +* Sat Jun 13 2020 Elliott Sales de Andrade - 0.24.0-1 +- Update to latest version + +* Mon May 18 2020 Elliott Sales de Andrade - 0.23.14-1 +- Update to latest version + +* Wed Mar 25 2020 Elliott Sales de Andrade - 0.23.9-1 +- Update to latest version + +* Sat Mar 14 2020 Elliott Sales de Andrade - 0.23.8-1 +- Update to latest version + +* Tue Mar 03 2020 Elliott Sales de Andrade - 0.23.6-1 +- Update to latest version + +* Fri Feb 14 2020 Elliott Sales de Andrade - 0.23.5-1 +- Update to latest version +- Re-enable build on armv7hl and ppc64le + +* Fri Jan 31 2020 Fedora Release Engineering - 0.23.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jan 09 2020 Elliott Sales de Andrade - 0.23.3-1 +- Update to latest version + +* Tue Sep 24 2019 Elliott Sales de Andrade - 0.23.2-2 +- rebuilt + +* Mon Sep 23 2019 Elliott Sales de Andrade - 0.23.2-1 +- Update to latest version + +* Sat Sep 07 2019 Elliott Sales de Andrade - 0.23.1-1 +- Initial package release diff --git a/xeus.spec b/xeus.spec index 96a7369..16458ca 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,6 +1,6 @@ Name: xeus Version: 1.0.3 -Release: 2%{?dist} +Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol License: BSD @@ -74,81 +74,4 @@ rm docs/build/html/.buildinfo %changelog -* Fri Jul 23 2021 Fedora Release Engineering - 1.0.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Sun Jul 11 2021 Elliott Sales de Andrade - 1.0.3-1 -- Update to latest version (#1965198) -- Fix build with Sphinx 4 (#1977665) -- Remove unnecessary RPATH directories - -* Wed Feb 24 2021 Elliott Sales de Andrade - 1.0.1-1 -- Update to latest version (#1929422) - -* Sun Feb 07 2021 Elliott Sales de Andrade - 1.0.0-1 -- Update to latest version (#1919068) - -* Wed Jan 27 2021 Fedora Release Engineering - 0.25.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Sat Dec 12 2020 Elliott Sales de Andrade - 0.25.3-1 -- Update to latest version (#1906253) - -* Sat Nov 28 2020 Elliott Sales de Andrade - 0.25.1-1 -- Update to latest version (#1900027) - -* Thu Nov 19 2020 Elliott Sales de Andrade - 0.25.0-1 -- Update to latest version (#1898255) - -* Mon Nov 09 2020 Elliott Sales de Andrade - 0.24.4-1 -- Update to latest version (#1896206) - -* Sun Nov 08 2020 Elliott Sales de Andrade - 0.24.3-1 -- Update to latest version (#1895579) - -* Tue Oct 06 2020 Elliott Sales de Andrade - 0.24.2-1 -- Update to latest version (#1884918) - -* Sat Aug 01 2020 Fedora Release Engineering - 0.24.1-3 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 0.24.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jun 26 2020 Elliott Sales de Andrade - 0.24.1-1 -- Update to latest version - -* Sat Jun 13 2020 Elliott Sales de Andrade - 0.24.0-1 -- Update to latest version - -* Mon May 18 2020 Elliott Sales de Andrade - 0.23.14-1 -- Update to latest version - -* Wed Mar 25 2020 Elliott Sales de Andrade - 0.23.9-1 -- Update to latest version - -* Sat Mar 14 2020 Elliott Sales de Andrade - 0.23.8-1 -- Update to latest version - -* Tue Mar 03 2020 Elliott Sales de Andrade - 0.23.6-1 -- Update to latest version - -* Fri Feb 14 2020 Elliott Sales de Andrade - 0.23.5-1 -- Update to latest version -- Re-enable build on armv7hl and ppc64le - -* Fri Jan 31 2020 Fedora Release Engineering - 0.23.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jan 09 2020 Elliott Sales de Andrade - 0.23.3-1 -- Update to latest version - -* Tue Sep 24 2019 Elliott Sales de Andrade - 0.23.2-2 -- rebuilt - -* Mon Sep 23 2019 Elliott Sales de Andrade - 0.23.2-1 -- Update to latest version - -* Sat Sep 07 2019 Elliott Sales de Andrade - 0.23.1-1 -- Initial package release +%autochangelog From cfff3b29084d57e0acbf49ab7efc46a5c6be2b90 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 22 Aug 2021 01:07:36 -0400 Subject: [PATCH 20/46] Update to latest version (#1981750) --- .gitignore | 1 + sources | 2 +- xeus.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b3186f2..aadba37 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /xeus-1.0.0.tar.gz /xeus-1.0.1.tar.gz /xeus-1.0.3.tar.gz +/xeus-1.0.4.tar.gz diff --git a/sources b/sources index 855b118..5ef635e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-1.0.3.tar.gz) = e2a8ad892b60989f75eff161ea1a024a012dd46b39ae85604acf8876593c5e46939233002c2fb7e79d45bdd076635bffdf3ada4ae6ae6c9e1fde8339f1c6bce9 +SHA512 (xeus-1.0.4.tar.gz) = 3e13dd1d3d26dacd2beae385ac1a76b189fb56f96a33cb2fdd0b373d76e6992a21bafbeaa92e3255352c3b788c6a6b646e44485563bcbd379f53d16a4114e72d diff --git a/xeus.spec b/xeus.spec index 16458ca..42d08e0 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 1.0.3 +Version: 1.0.4 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol From 6a088e6c80207727ad47b6df31a9d4e7dbf15da6 Mon Sep 17 00:00:00 2001 From: Sahana Prasad Date: Tue, 14 Sep 2021 19:18:01 +0200 Subject: [PATCH 21/46] Rebuilt with OpenSSL 3.0.0 From 980d19d9406156d5bf052576c99bfef543cddb62 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 18 Sep 2021 05:35:11 -0400 Subject: [PATCH 22/46] Update to latest version (#2003853) --- .gitignore | 1 + 0001-Fix-build-with-Sphinx-4.patch | 40 --------------------- 0002-Remove-all-RPATH-settings.patch | 52 ---------------------------- sources | 2 +- xeus.spec | 8 ++--- 5 files changed, 4 insertions(+), 99 deletions(-) delete mode 100644 0001-Fix-build-with-Sphinx-4.patch delete mode 100644 0002-Remove-all-RPATH-settings.patch diff --git a/.gitignore b/.gitignore index aadba37..d6f8858 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /xeus-1.0.1.tar.gz /xeus-1.0.3.tar.gz /xeus-1.0.4.tar.gz +/xeus-2.0.0.tar.gz diff --git a/0001-Fix-build-with-Sphinx-4.patch b/0001-Fix-build-with-Sphinx-4.patch deleted file mode 100644 index 2b111d1..0000000 --- a/0001-Fix-build-with-Sphinx-4.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 116e9272965094260e056437ca494fc726ba300a Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Sun, 11 Jul 2021 19:22:19 -0400 -Subject: [PATCH 1/2] Fix build with Sphinx 4. - -`add_stylesheet` was deprecated in 1.8 and removed in 4.0 [1]. The -replacement, `add_css_file` was added in 1.0, which is older than any -version required by `breathe`. - -[1] https://www.sphinx-doc.org/en/master/extdev/deprecated.html?highlight=add_stylesheet - -Signed-off-by: Elliott Sales de Andrade ---- - docs/source/conf.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/docs/source/conf.py b/docs/source/conf.py -index 58386c6..f67e96e 100644 ---- a/docs/source/conf.py -+++ b/docs/source/conf.py -@@ -15,8 +15,10 @@ html_theme = "sphinx_rtd_theme" - - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -+ - def setup(app): -- app.add_stylesheet("main_stylesheet.css") -+ app.add_css_file("main_stylesheet.css") -+ - - extensions = ['breathe'] - breathe_projects = { 'xeus': '../xml' } -@@ -35,4 +37,3 @@ highlight_language = 'c++' - pygments_style = 'sphinx' - todo_include_todos = False - htmlhelp_basename = 'xeusdoc' -- --- -2.31.1 - diff --git a/0002-Remove-all-RPATH-settings.patch b/0002-Remove-all-RPATH-settings.patch deleted file mode 100644 index 8138350..0000000 --- a/0002-Remove-all-RPATH-settings.patch +++ /dev/null @@ -1,52 +0,0 @@ -From d31cf19e37c2e847bef8917fd9cf8ed2fbb27b38 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Sun, 11 Jul 2021 20:14:15 -0400 -Subject: [PATCH 2/2] Remove all RPATH settings. - -If you need to set this, it's an environment-specific thing. - -Signed-off-by: Elliott Sales de Andrade ---- - CMakeLists.txt | 19 ------------------- - 1 file changed, 19 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 903dcf9..6b3a26d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -195,13 +195,6 @@ include(CheckCXXCompilerFlag) - - string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE) - --if (NOT APPLE) -- set(CMAKE_SKIP_BUILD_RPATH FALSE) -- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) --endif () -- --set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib; ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") -- - if (XEUS_STATIC_DEPENDENCIES AND NOT MSVC AND NOT APPLE) - # Explicitly finds and links with libsodium.a - # because it is not exported as a dependency by -@@ -223,18 +216,6 @@ macro(xeus_create_target target_name linkage output_name) - - add_library(${target_name} ${linkage_upper} ${XEUS_SOURCES} ${XEUS_HEADERS}) - -- if (APPLE) -- set_target_properties( -- ${target_name} PROPERTIES -- MACOSX_RPATH ON -- ) -- else () -- set_target_properties( -- ${target_name} PROPERTIES -- BUILD_WITH_INSTALL_RPATH 1 -- ) -- endif () -- - target_include_directories( - ${target_name} - PUBLIC $ --- -2.31.1 - diff --git a/sources b/sources index 5ef635e..15f8694 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-1.0.4.tar.gz) = 3e13dd1d3d26dacd2beae385ac1a76b189fb56f96a33cb2fdd0b373d76e6992a21bafbeaa92e3255352c3b788c6a6b646e44485563bcbd379f53d16a4114e72d +SHA512 (xeus-2.0.0.tar.gz) = a1897dda5416e202351a1afce7e2ebb4427ed06feb9edd8bb526df293999a021726b6214068a92203adbc533439f39a710279bfa4e4e485f168e79e9fca27b3a diff --git a/xeus.spec b/xeus.spec index 42d08e0..5c551c6 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,15 +1,11 @@ Name: xeus -Version: 1.0.4 +Version: 2.0.0 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol License: BSD URL: https://github.com/jupyter-xeus/xeus Source0: https://github.com/jupyter-xeus/xeus/archive/%{version}/%{name}-%{version}.tar.gz -# https://github.com/jupyter-xeus/xeus/pull/280 -Patch0001: 0001-Fix-build-with-Sphinx-4.patch -# https://github.com/jupyter-xeus/xeus/pull/281 -Patch0002: 0002-Remove-all-RPATH-settings.patch BuildRequires: cmake >= 3.8 BuildRequires: cmake(cppzmq) >= 4.3.0 @@ -65,7 +61,7 @@ rm docs/build/html/.buildinfo %files %doc README.md docs/build/html %license LICENSE -%{_libdir}/libxeus.so.1* +%{_libdir}/libxeus.so.5* %files devel %{_includedir}/xeus/ From dd4ff20e049a39bcdf594d75b0c0f1d38ecca392 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 04:58:38 +0000 Subject: [PATCH 23/46] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering From 12b9a35c2a86cf0ed4ae5c939d9fe586cb5855f9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 12:59:25 +0000 Subject: [PATCH 24/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering From bf8ade803c5a8670fdd7817a009bc3071b0d170a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 17 Oct 2022 05:36:22 -0400 Subject: [PATCH 25/46] Backport fixes to messages to match schemas --- 0001-switched-from-gtest-to-doctest-292.patch | 523 +++++++++++++ ...-Never-delete-context-before-sockets.patch | 66 ++ 0003-Fix-non-standard-messages.patch | 707 ++++++++++++++++++ xeus.spec | 13 +- 4 files changed, 1308 insertions(+), 1 deletion(-) create mode 100644 0001-switched-from-gtest-to-doctest-292.patch create mode 100644 0002-Never-delete-context-before-sockets.patch create mode 100644 0003-Fix-non-standard-messages.patch diff --git a/0001-switched-from-gtest-to-doctest-292.patch b/0001-switched-from-gtest-to-doctest-292.patch new file mode 100644 index 0000000..f6aecac --- /dev/null +++ b/0001-switched-from-gtest-to-doctest-292.patch @@ -0,0 +1,523 @@ +From 8964ef30354f59c19ed5f723c579350eb249c0ba Mon Sep 17 00:00:00 2001 +From: Thorsten Beier +Date: Tue, 21 Sep 2021 13:33:39 +0200 +Subject: [PATCH 1/3] switched from gtest to doctest (#292) + +Switchted to doctest + +Signed-off-by: Elliott Sales de Andrade +--- + .appveyor.yml | 4 +- + .azure-pipelines/unix-build.yml | 2 +- + CMakeLists.txt | 3 +- + environment-dev.yml | 1 + + test/CMakeLists.txt | 55 +--------- + test/copyGTest.cmake.in | 23 ---- + test/downloadGTest.cmake.in | 24 ----- + test/test_main.cpp | 2 + + test/test_unit_kernel.cpp | 36 ++++--- + test/test_xin_memory_history_manager.cpp | 130 ++++++++++++----------- + 10 files changed, 98 insertions(+), 182 deletions(-) + delete mode 100644 test/copyGTest.cmake.in + delete mode 100644 test/downloadGTest.cmake.in + create mode 100644 test/test_main.cpp + +diff --git a/.appveyor.yml b/.appveyor.yml +index e6596e8..a4d8393 100644 +--- a/.appveyor.yml ++++ b/.appveyor.yml +@@ -29,12 +29,12 @@ install: + - conda update -q conda + - conda info -a + - conda install mamba -c conda-forge +- - mamba install cmake cppzmq=4.7.1 zeromq=4.3.2 xtl=0.7 nlohmann_json OpenSSL=1 -c conda-forge ++ - mamba install cmake cppzmq=4.7.1 zeromq=4.3.2 xtl=0.7 nlohmann_json OpenSSL=1 doctest -c conda-forge + - mamba install pytest jupyter_kernel_test=0.3.0 -c conda-forge + # Build + - mkdir build + - cd build +- - cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\LIBRARY -D XEUS_DOWNLOAD_GTEST=ON -Dgtest_force_shared_crt=ON .. ++ - cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\LIBRARY -D XEUS_BUILD_TESTS=ON .. + - nmake install + # Build example + - cd ..\example +diff --git a/.azure-pipelines/unix-build.yml b/.azure-pipelines/unix-build.yml +index 733972b..cfe556b 100644 +--- a/.azure-pipelines/unix-build.yml ++++ b/.azure-pipelines/unix-build.yml +@@ -25,7 +25,7 @@ steps: + if [[ $(xeus_build_shared_lib) == '0' ]]; then + CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXEUS_BUILD_SHARED_LIBS=OFF"; + fi +- cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DXEUS_DOWNLOAD_GTEST=ON -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $CMAKE_EXTRA_ARGS $(Build.SourcesDirectory) ++ cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DXEUS_BUILD_TESTS=ON -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $CMAKE_EXTRA_ARGS $(Build.SourcesDirectory) + displayName: Configure xeus + workingDirectory: $(Build.BinariesDirectory) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 41e6692..5cd2aab 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,7 +55,6 @@ option(XEUS_STATIC_DEPENDENCIES "link statically with xeus dependencies" OFF) + + # Test options + option(XEUS_BUILD_TESTS "xeus test suite" OFF) +-option(XEUS_DOWNLOAD_GTEST "build gtest from downloaded sources" OFF) + + # Static build configuration + # ========================== +@@ -352,7 +351,7 @@ endif () + + include(CTest) + +-if(XEUS_DOWNLOAD_GTEST OR GTEST_SRC_DIR OR XEUS_BUILD_TESTS) ++if(XEUS_BUILD_TESTS) + set(BUILD_TESTING ON) + message(STATUS "tests enabled") + else () +diff --git a/environment-dev.yml b/environment-dev.yml +index a6c688a..d109add 100644 +--- a/environment-dev.yml ++++ b/environment-dev.yml +@@ -14,5 +14,6 @@ dependencies: + - libopenssl-static=1 + - nlohmann_json + # Test dependencies ++ - doctest >= 2.4.6 + - pytest + - jupyter_kernel_test=0.3.0 +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 61aaade..b24a3e5 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -48,44 +48,15 @@ if(CMAKE_CXX_COMPILER_ID MATCHES MSVC) + set(CMAKE_EXE_LINKER_FLAGS /MANIFEST:NO) + endif() + +-if(XEUS_DOWNLOAD_GTEST OR GTEST_SRC_DIR) +- if(XEUS_DOWNLOAD_GTEST) +- # Download and unpack googletest at configure time +- configure_file(downloadGTest.cmake.in googletest-download/CMakeLists.txt) +- else() +- # Copy local source of googletest at configure time +- configure_file(copyGTest.cmake.in googletest-download/CMakeLists.txt) +- endif() +- execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) +- if(result) +- message(FATAL_ERROR "CMake step for googletest failed: ${result}") +- endif() +- execute_process(COMMAND ${CMAKE_COMMAND} --build . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) +- if(result) +- message(FATAL_ERROR "Build step for googletest failed: ${result}") +- endif() + +- # Add googletest directly to our build. This defines +- # the gtest and gtest_main targets. +- add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src +- ${CMAKE_CURRENT_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) ++find_package(doctest REQUIRED) + +- set(GTEST_INCLUDE_DIRS "${gtest_SOURCE_DIR}/include") +- set(GTEST_BOTH_LIBRARIES gtest_main gtest) +-else() +- find_package(GTest REQUIRED) +-endif() + + find_package(Threads) + +-find_program(PYTEST +- NAMES pytest-3 pytest py.test-3 py.test) ++find_program(PYTEST ++ NAMES pytest-3 pytest py.test-3 py.test REQUIRED) + +-include_directories(${GTEST_INCLUDE_DIRS}) + + set(XEUS_TESTS + test_xin_memory_history_manager.cpp +@@ -113,27 +84,11 @@ endif () + foreach(filename IN LISTS XEUS_TESTS) + get_filename_component(targetname ${filename} NAME_WE) + +- add_executable(${targetname} ${filename}) +- target_link_libraries(${targetname} PRIVATE ${xeus_TARGET} ${GTEST_BOTH_LIBRARIES} Threads::Threads ${nlohmann_json_TARGET}) +- ++ add_executable(${targetname} test_main.cpp ${filename}) ++ target_link_libraries(${targetname} PRIVATE ${xeus_TARGET} doctest::doctest Threads::Threads ${nlohmann_json_TARGET}) + add_test(NAME ${targetname} COMMAND ${targetname}) + endforeach() + +-if(XEUS_DOWNLOAD_GTEST OR GTEST_SRC_DIR) +- # https://github.com/jupyter-xeus/xeus/pull/126 +- # This should really just be post gtest and gtest_main targets, but CMake +- # won't allow us to do that. So do it after the last test (which depends on +- # those anyway.) +- if (XEUS_BUILD_SHARED_LIBS) +- add_custom_command( +- TARGET ${targetname} POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy "$" "${CMAKE_CURRENT_BINARY_DIR}/") +- +- add_custom_command( +- TARGET ${targetname} POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy "$" "${CMAKE_CURRENT_BINARY_DIR}/") +- endif () +-endif() + + # Test_kernel tests + # ================= +diff --git a/test/copyGTest.cmake.in b/test/copyGTest.cmake.in +deleted file mode 100644 +index 1e5d3ed..0000000 +--- a/test/copyGTest.cmake.in ++++ /dev/null +@@ -1,23 +0,0 @@ +-############################################################################ +-# Copyright (c) 2016, Johan Mabille, Sylvain Corlay and Wolf Vollprecht # +-# # +-# Distributed under the terms of the BSD 3-Clause License. # +-# # +-# The full license is in the file LICENSE, distributed with this software. # +-############################################################################ +- +-cmake_minimum_required(VERSION 2.8.2) +- +-project(googletest-download NONE) +- +-include(ExternalProject) +-ExternalProject_Add(googletest +- URL "${GTEST_SRC_DIR}" +- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" +- BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" +- CONFIGURE_COMMAND "" +- BUILD_COMMAND "" +- INSTALL_COMMAND "" +- TEST_COMMAND "" +-) +- +diff --git a/test/downloadGTest.cmake.in b/test/downloadGTest.cmake.in +deleted file mode 100644 +index 852d43c..0000000 +--- a/test/downloadGTest.cmake.in ++++ /dev/null +@@ -1,24 +0,0 @@ +-############################################################################ +-# Copyright (c) 2016, Johan Mabille, Sylvain Corlay and Wolf Vollprecht # +-# # +-# Distributed under the terms of the BSD 3-Clause License. # +-# # +-# The full license is in the file LICENSE, distributed with this software. # +-############################################################################ +- +-cmake_minimum_required(VERSION 2.8.2) +- +-project(googletest-download NONE) +- +-include(ExternalProject) +-ExternalProject_Add(googletest +- GIT_REPOSITORY https://github.com/google/googletest.git +- GIT_TAG release-1.10.0 +- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" +- BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" +- CONFIGURE_COMMAND "" +- BUILD_COMMAND "" +- INSTALL_COMMAND "" +- TEST_COMMAND "" +-) +- +diff --git a/test/test_main.cpp b/test/test_main.cpp +new file mode 100644 +index 0000000..84684c0 +--- /dev/null ++++ b/test/test_main.cpp +@@ -0,0 +1,2 @@ ++#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN ++#include "doctest/doctest.h" +\ No newline at end of file +diff --git a/test/test_unit_kernel.cpp b/test/test_unit_kernel.cpp +index 74b9f07..ee8709b 100644 +--- a/test/test_unit_kernel.cpp ++++ b/test/test_unit_kernel.cpp +@@ -6,9 +6,10 @@ + * The full license is in the file LICENSE, distributed with this software. * + ****************************************************************************/ + +-#include "gtest/gtest.h" ++#include "doctest/doctest.h" + + #include ++#include + + #include "nlohmann/json.hpp" + +@@ -20,48 +21,51 @@ namespace nl = nlohmann; + + namespace xeus + { +- TEST(kernel, get_username) ++ TEST_SUITE("kernel") { ++ ++ TEST_CASE("get_username") + { + std::string username; + username = get_user_name(); +- EXPECT_NE(username, "unspecified user"); ++ REQUIRE_NE(username, "unspecified user"); + } + +- TEST(kernel, find_free_port) ++ TEST_CASE("find_free_port") + { + std::string port = find_free_port(); +- EXPECT_NE(port, ""); +- EXPECT_EQ(port.length(), std::size_t(5)); ++ REQUIRE_NE(port, ""); ++ REQUIRE_EQ(port.length(), std::size_t(5)); + } + +- TEST(kernel, temp_directory_path) ++ TEST_CASE("temp_directory_path") + { + std::string path = get_temp_directory_path(); + std::cout << "Temporary directory path: " << path << std::endl; +- EXPECT_NE(path, ""); +- EXPECT_NE(path.back(), '/'); +- EXPECT_NE(path.back(), '\\'); ++ REQUIRE_NE(path, ""); ++ REQUIRE_NE(path.back(), '/'); ++ REQUIRE_NE(path.back(), '\\'); + } + +- TEST(kernel, create_directory) ++ TEST_CASE("create_directory") + { + std::string temp_path = get_temp_directory_path(); + std::string path = temp_path + "/intermediate/logs"; + bool res = create_directory(path); +- EXPECT_TRUE(res); ++ REQUIRE_UNARY(res); + } + +- TEST(kernel, get_current_pid) ++ TEST_CASE("get_current_pid") + { + int pid = get_current_pid(); +- EXPECT_NE(pid, -1); ++ REQUIRE_NE(pid, -1); + } + +- TEST(kernel, get_tmp_hash_seed) ++ TEST_CASE("get_tmp_hash_seed") + { + size_t hs = get_tmp_hash_seed(); + size_t expected = static_cast(0xc70f6907UL); +- EXPECT_EQ(hs, expected); ++ REQUIRE_EQ(hs, expected); ++ } + } + } + +diff --git a/test/test_xin_memory_history_manager.cpp b/test/test_xin_memory_history_manager.cpp +index df2275a..a204ca1 100644 +--- a/test/test_xin_memory_history_manager.cpp ++++ b/test/test_xin_memory_history_manager.cpp +@@ -6,7 +6,7 @@ + * The full license is in the file LICENSE, distributed with this software. * + ****************************************************************************/ + +-#include "gtest/gtest.h" ++#include "doctest/doctest.h" + + #include + #include +@@ -23,7 +23,8 @@ namespace xeus + using history_manager_ptr = std::unique_ptr; + using history_type = std::vector>; + +- TEST(xin_memory_history_manager, get_tail) ++ TEST_SUITE("xin_memory_history_manager"){ ++ TEST_CASE("get_tail") + { + history_manager_ptr hist = xeus::make_in_memory_history_manager(); + hist->store_inputs(0, 1, "print(3)"); +@@ -32,29 +33,29 @@ namespace xeus + hist->store_inputs(0, 4, "a"); + + nl::json tail1 = hist->get_tail(1000, true, false); +- ASSERT_EQ(tail1["status"], "ok"); ++ REQUIRE_EQ(tail1["status"], "ok"); + auto history1 = tail1["history"].get(); +- ASSERT_EQ(history1.size(), std::size_t(4)); +- ASSERT_EQ(history1[0][1], "1"); +- ASSERT_EQ(history1[0][2], "print(3)"); +- ASSERT_EQ(history1[1][1], "2"); +- ASSERT_EQ(history1[1][2], "a = 3"); +- ASSERT_EQ(history1[2][1], "3"); +- ASSERT_EQ(history1[2][2], "print(a)"); +- ASSERT_EQ(history1[3][1], "4"); +- ASSERT_EQ(history1[3][2], "a"); ++ REQUIRE_EQ(history1.size(), std::size_t(4)); ++ REQUIRE_EQ(history1[0][1], "1"); ++ REQUIRE_EQ(history1[0][2], "print(3)"); ++ REQUIRE_EQ(history1[1][1], "2"); ++ REQUIRE_EQ(history1[1][2], "a = 3"); ++ REQUIRE_EQ(history1[2][1], "3"); ++ REQUIRE_EQ(history1[2][2], "print(a)"); ++ REQUIRE_EQ(history1[3][1], "4"); ++ REQUIRE_EQ(history1[3][2], "a"); + + nl::json tail2 = hist->get_tail(2, true, false); +- ASSERT_EQ(tail2["status"], "ok"); ++ REQUIRE_EQ(tail2["status"], "ok"); + auto history2 = tail2["history"].get(); +- ASSERT_EQ(history2.size(), std::size_t(2)); +- ASSERT_EQ(history2[0][1], "3"); +- ASSERT_EQ(history2[0][2], "print(a)"); +- ASSERT_EQ(history2[1][1], "4"); +- ASSERT_EQ(history2[1][2], "a"); ++ REQUIRE_EQ(history2.size(), std::size_t(2)); ++ REQUIRE_EQ(history2[0][1], "3"); ++ REQUIRE_EQ(history2[0][2], "print(a)"); ++ REQUIRE_EQ(history2[1][1], "4"); ++ REQUIRE_EQ(history2[1][2], "a"); + } + +- TEST(xin_memory_history_manager, get_range) ++ TEST_CASE("get_range") + { + history_manager_ptr hist = xeus::make_in_memory_history_manager(); + hist->store_inputs(0, 1, "print(3)"); +@@ -63,26 +64,26 @@ namespace xeus + hist->store_inputs(0, 4, "a"); + + nl::json range1 = hist->get_range(0, 1, 2, true, false); +- ASSERT_EQ(range1["status"], "ok"); ++ REQUIRE_EQ(range1["status"], "ok"); + auto history1 = range1["history"].get(); +- ASSERT_EQ(history1.size(), std::size_t(1)); +- ASSERT_EQ(history1[0][1], "2"); +- ASSERT_EQ(history1[0][2], "a = 3"); ++ REQUIRE_EQ(history1.size(), std::size_t(1)); ++ REQUIRE_EQ(history1[0][1], "2"); ++ REQUIRE_EQ(history1[0][2], "a = 3"); + + nl::json range2 = hist->get_range(0, 1, 3, true, false); +- ASSERT_EQ(range2["status"], "ok"); ++ REQUIRE_EQ(range2["status"], "ok"); + auto history2 = range2["history"].get(); +- ASSERT_EQ(history2.size(), std::size_t(2)); +- ASSERT_EQ(history2[0][1], "2"); +- ASSERT_EQ(history2[0][2], "a = 3"); +- ASSERT_EQ(history2[1][1], "3"); +- ASSERT_EQ(history2[1][2], "print(a)"); ++ REQUIRE_EQ(history2.size(), std::size_t(2)); ++ REQUIRE_EQ(history2[0][1], "2"); ++ REQUIRE_EQ(history2[0][2], "a = 3"); ++ REQUIRE_EQ(history2[1][1], "3"); ++ REQUIRE_EQ(history2[1][2], "print(a)"); + + nl::json range3 = hist->get_range(0, 1000, 2, true, false); +- ASSERT_EQ(range3["status"], "error"); ++ REQUIRE_EQ(range3["status"], "error"); + } + +- TEST(xin_memory_history_manager, search) ++ TEST_CASE("search") + { + history_manager_ptr hist = xeus::make_in_memory_history_manager(); + hist->store_inputs(0, 1, "print(36)"); +@@ -91,55 +92,56 @@ namespace xeus + hist->store_inputs(0, 4, "a"); + + nl::json search1 = hist->search("print*", true, false, 10, false); +- ASSERT_EQ(search1["status"], "ok"); ++ REQUIRE_EQ(search1["status"], "ok"); + auto history1 = search1["history"].get(); +- ASSERT_EQ(history1.size(), std::size_t(2)); +- ASSERT_EQ(history1[0][1], "1"); +- ASSERT_EQ(history1[0][2], "print(36)"); +- ASSERT_EQ(history1[1][1], "3"); +- ASSERT_EQ(history1[1][2], "print(a)"); ++ REQUIRE_EQ(history1.size(), std::size_t(2)); ++ REQUIRE_EQ(history1[0][1], "1"); ++ REQUIRE_EQ(history1[0][2], "print(36)"); ++ REQUIRE_EQ(history1[1][1], "3"); ++ REQUIRE_EQ(history1[1][2], "print(a)"); + + nl::json search2 = hist->search("print(*)", true, false, 10, false); +- ASSERT_EQ(search2["status"], "ok"); ++ REQUIRE_EQ(search2["status"], "ok"); + auto history2 = search2["history"].get(); +- ASSERT_EQ(history2.size(), std::size_t(2)); +- ASSERT_EQ(history2[0][1], "1"); +- ASSERT_EQ(history2[0][2], "print(36)"); +- ASSERT_EQ(history2[1][1], "3"); +- ASSERT_EQ(history2[1][2], "print(a)"); ++ REQUIRE_EQ(history2.size(), std::size_t(2)); ++ REQUIRE_EQ(history2[0][1], "1"); ++ REQUIRE_EQ(history2[0][2], "print(36)"); ++ REQUIRE_EQ(history2[1][1], "3"); ++ REQUIRE_EQ(history2[1][2], "print(a)"); + + nl::json search3 = hist->search("print(?)", true, false, 10, false); +- ASSERT_EQ(search3["status"], "ok"); ++ REQUIRE_EQ(search3["status"], "ok"); + auto history3 = search3["history"].get(); +- ASSERT_EQ(history3.size(), std::size_t(1)); +- ASSERT_EQ(history3[0][1], "3"); +- ASSERT_EQ(history3[0][2], "print(a)"); ++ REQUIRE_EQ(history3.size(), std::size_t(1)); ++ REQUIRE_EQ(history3[0][1], "3"); ++ REQUIRE_EQ(history3[0][2], "print(a)"); + + nl::json search4 = hist->search("print*", true, false, 1, false); +- ASSERT_EQ(search4["status"], "ok"); ++ REQUIRE_EQ(search4["status"], "ok"); + auto history4 = search4["history"].get(); +- ASSERT_EQ(history4.size(), std::size_t(1)); +- ASSERT_EQ(history4[0][1], "3"); +- ASSERT_EQ(history4[0][2], "print(a)"); ++ REQUIRE_EQ(history4.size(), std::size_t(1)); ++ REQUIRE_EQ(history4[0][1], "3"); ++ REQUIRE_EQ(history4[0][2], "print(a)"); + + hist->store_inputs(0, 3, "print(a)"); + nl::json search5 = hist->search("print*", true, false, 10, false); +- ASSERT_EQ(search5["status"], "ok"); ++ REQUIRE_EQ(search5["status"], "ok"); + auto history5 = search5["history"].get(); +- ASSERT_EQ(history5.size(), std::size_t(3)); +- ASSERT_EQ(history2[0][1], "1"); +- ASSERT_EQ(history2[0][2], "print(36)"); +- ASSERT_EQ(history5[1][1], "3"); +- ASSERT_EQ(history5[1][2], "print(a)"); +- ASSERT_EQ(history5[2][1], "3"); +- ASSERT_EQ(history5[2][2], "print(a)"); ++ REQUIRE_EQ(history5.size(), std::size_t(3)); ++ REQUIRE_EQ(history2[0][1], "1"); ++ REQUIRE_EQ(history2[0][2], "print(36)"); ++ REQUIRE_EQ(history5[1][1], "3"); ++ REQUIRE_EQ(history5[1][2], "print(a)"); ++ REQUIRE_EQ(history5[2][1], "3"); ++ REQUIRE_EQ(history5[2][2], "print(a)"); + + nl::json search6 = hist->search("print*", true, false, 10, true); +- ASSERT_EQ(search6["status"], "ok"); ++ REQUIRE_EQ(search6["status"], "ok"); + auto history6 = search6["history"].get(); +- ASSERT_EQ(history2[0][1], "1"); +- ASSERT_EQ(history2[0][2], "print(36)"); +- ASSERT_EQ(history5[1][1], "3"); +- ASSERT_EQ(history5[1][2], "print(a)"); ++ REQUIRE_EQ(history2[0][1], "1"); ++ REQUIRE_EQ(history2[0][2], "print(36)"); ++ REQUIRE_EQ(history5[1][1], "3"); ++ REQUIRE_EQ(history5[1][2], "print(a)"); ++ } + } + } +-- +2.36.1 + diff --git a/0002-Never-delete-context-before-sockets.patch b/0002-Never-delete-context-before-sockets.patch new file mode 100644 index 0000000..77551e5 --- /dev/null +++ b/0002-Never-delete-context-before-sockets.patch @@ -0,0 +1,66 @@ +From 206f54ea54c0a5355adb1531e0d523501aa9c2b9 Mon Sep 17 00:00:00 2001 +From: Johan Mabille +Date: Fri, 24 Sep 2021 00:48:26 +0200 +Subject: [PATCH 2/3] Never delete context before sockets + +Signed-off-by: Elliott Sales de Andrade +--- + include/xeus/xkernel.hpp | 5 ++++- + src/xkernel.cpp | 4 ++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/include/xeus/xkernel.hpp b/include/xeus/xkernel.hpp +index 4ef0dd3..d32c07e 100644 +--- a/include/xeus/xkernel.hpp ++++ b/include/xeus/xkernel.hpp +@@ -84,13 +84,16 @@ namespace xeus + std::string m_kernel_id; + std::string m_session_id; + std::string m_user_name; ++ // The context must be declared before any other ++ // middleware component since it must be destroyed ++ // last ++ context_ptr p_context; + interpreter_ptr p_interpreter; + history_manager_ptr p_history_manager; + logger_ptr p_logger; + server_ptr p_server; + debugger_builder m_debugger_builder; + debugger_ptr p_debugger; +- context_ptr p_context; + kernel_core_ptr p_core; + nl::json m_debugger_config; + nl::json::error_handler_t m_error_handler; +diff --git a/src/xkernel.cpp b/src/xkernel.cpp +index 2bda8af..c8e263a 100644 +--- a/src/xkernel.cpp ++++ b/src/xkernel.cpp +@@ -82,11 +82,11 @@ namespace xeus + nl::json::error_handler_t eh) + : m_config(config) + , m_user_name(user_name) ++ , p_context(std::move(context)) + , p_interpreter(std::move(interpreter)) + , p_history_manager(std::move(history_manager)) + , p_logger(std::move(logger)) + , m_debugger_builder(dbuilder) +- , p_context(std::move(context)) + , m_debugger_config(debugger_config) + , m_error_handler(eh) + { +@@ -103,11 +103,11 @@ namespace xeus + nl::json debugger_config, + nl::json::error_handler_t eh) + : m_user_name(user_name) ++ , p_context(std::move(context)) + , p_interpreter(std::move(interpreter)) + , p_history_manager(std::move(history_manager)) + , p_logger(std::move(logger)) + , m_debugger_builder(dbuilder) +- , p_context(std::move(context)) + , m_debugger_config(debugger_config) + , m_error_handler(eh) + { +-- +2.36.1 + diff --git a/0003-Fix-non-standard-messages.patch b/0003-Fix-non-standard-messages.patch new file mode 100644 index 0000000..4c5fc5d --- /dev/null +++ b/0003-Fix-non-standard-messages.patch @@ -0,0 +1,707 @@ +From 271c3e1c4c134336323b979b6b0d5d702e0baa38 Mon Sep 17 00:00:00 2001 +From: Mariana Meireles +Date: Fri, 24 Sep 2021 07:30:56 +0000 +Subject: [PATCH 3/3] Fix non-standard messages + +Signed-off-by: Elliott Sales de Andrade +--- + CMakeLists.txt | 4 +- + example/src/custom_interpreter.cpp | 61 ++++-------- + include/xeus/xhelper.hpp | 72 ++++++++++++++ + src/xhelper.cpp | 155 +++++++++++++++++++++++++++++ + test/CMakeLists.txt | 3 +- + test/test_interpreter.cpp | 78 ++++++--------- + test/test_unit_kernel.cpp | 127 +++++++++++++++-------- + 7 files changed, 367 insertions(+), 133 deletions(-) + create mode 100644 include/xeus/xhelper.hpp + create mode 100644 src/xhelper.cpp + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5cd2aab..b968abb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,6 +133,7 @@ set(XEUS_HEADERS + ${XEUS_INCLUDE_DIR}/xeus/xkernel_configuration.hpp + ${XEUS_INCLUDE_DIR}/xeus/xlogger.hpp + ${XEUS_INCLUDE_DIR}/xeus/xmessage.hpp ++ ${XEUS_INCLUDE_DIR}/xeus/xhelper.hpp + ${XEUS_INCLUDE_DIR}/xeus/xmiddleware.hpp + ${XEUS_INCLUDE_DIR}/xeus/xserver.hpp + ${XEUS_INCLUDE_DIR}/xeus/xserver_control_main.hpp +@@ -168,6 +169,7 @@ set(XEUS_SOURCES + ${XEUS_SOURCE_DIR}/xlogger_impl.hpp + ${XEUS_SOURCE_DIR}/xlogger_impl.cpp + ${XEUS_SOURCE_DIR}/xmessage.cpp ++ ${XEUS_SOURCE_DIR}/xhelper.cpp + ${XEUS_SOURCE_DIR}/xmock_interpreter.cpp + ${XEUS_SOURCE_DIR}/xmock_interpreter.hpp + ${XEUS_SOURCE_DIR}/xmiddleware.cpp +@@ -351,7 +353,7 @@ endif () + + include(CTest) + +-if(XEUS_BUILD_TESTS) ++if(XEUS_DOWNLOAD_GTEST OR GTEST_SRC_DIR OR XEUS_BUILD_TESTS) + set(BUILD_TESTING ON) + message(STATUS "tests enabled") + else () +diff --git a/example/src/custom_interpreter.cpp b/example/src/custom_interpreter.cpp +index caad375..e2dbfca 100644 +--- a/example/src/custom_interpreter.cpp ++++ b/example/src/custom_interpreter.cpp +@@ -10,7 +10,7 @@ + #include + + #include "nlohmann/json.hpp" +- ++#include "xeus/xhelper.hpp" + #include "custom_interpreter.hpp" + + namespace nl = nlohmann; +@@ -44,9 +44,7 @@ namespace custom + // publish_execution_error(error_name, error_value, error_traceback); + publish_execution_error("TypeError", "123", {"!@#$", "*(*"}); + +- nl::json result; +- result["status"] = "ok"; +- return result; ++ return xeus::create_successful_reply(); + } + + void custom_interpreter::configure_impl() +@@ -57,26 +55,16 @@ namespace custom + nl::json custom_interpreter::complete_request_impl(const std::string& code, + int cursor_pos) + { +- nl::json result; +- + // Code starts with 'H', it could be the following completion + if (code[0] == 'H') + { +- result["status"] = "ok"; +- result["matches"] = {"Hello", "Hey", "Howdy"}; +- result["cursor_start"] = 5; +- result["cursor_end"] = cursor_pos; ++ return xeus::create_complete_reply({"Hello", "Hey", "Howdy"}, 5, cursor_pos); + } + // No completion result + else + { +- result["status"] = "ok"; +- result["matches"] = nl::json::array(); +- result["cursor_start"] = cursor_pos; +- result["cursor_end"] = cursor_pos; ++ return xeus::create_complete_reply({}, cursor_pos, cursor_pos); + } +- +- return result; + } + + nl::json custom_interpreter::inspect_request_impl(const std::string& code, +@@ -87,48 +75,33 @@ namespace custom + + if (code.compare("print") == 0) + { +- result["found"] = true; +- result["text/plain"] = "Print objects to the text stream file, [...]"; ++ return xeus::create_inspect_reply(true, ++ {"text/plain", "Print objects to the text stream file, [...]"}); + } + else + { +- result["found"] = false; ++ return xeus::create_inspect_reply(); + } +- +- result["status"] = "ok"; +- return result; + } + + nl::json custom_interpreter::is_complete_request_impl(const std::string& /*code*/) + { +- nl::json result; +- +- // if (is_complete(code)) +- // { +- result["status"] = "complete"; +- // } +- // else +- // { +- // result["status"] = "incomplete"; +- // result["indent"] = 4; +- //} +- +- return result; ++ return xeus::create_is_complete_reply("complete"); + } + + nl::json custom_interpreter::kernel_info_request_impl() + { +- nl::json result; +- result["implementation"] = "my_kernel"; +- result["implementation_version"] = "0.1.0"; +- result["language_info"]["name"] = "python"; +- result["language_info"]["version"] = "3.7"; +- result["language_info"]["mimetype"] = "text/x-python"; +- result["language_info"]["file_extension"] = ".py"; +- return result; ++ return xeus::create_info_reply("", ++ "my_kernel", ++ "0.1.0", ++ "python", ++ "3.7", ++ "text/x-python", ++ ".py"); + } + +- void custom_interpreter::shutdown_request_impl() { ++ void custom_interpreter::shutdown_request_impl() ++ { + std::cout << "Bye!!" << std::endl; + } + +diff --git a/include/xeus/xhelper.hpp b/include/xeus/xhelper.hpp +new file mode 100644 +index 0000000..584c150 +--- /dev/null ++++ b/include/xeus/xhelper.hpp +@@ -0,0 +1,72 @@ ++/*************************************************************************** ++* Copyright (c) 2016, Johan Mabille, Sylvain Corlay, Martin Renou * ++* Copyright (c) 2016, QuantStack * ++* * ++* Distributed under the terms of the BSD 3-Clause License. * ++* * ++* The full license is in the file LICENSE, distributed with this software. * ++****************************************************************************/ ++ ++#ifndef XEUS_HELPER_HPP ++#define XEUS_HELPER_HPP ++ ++#include ++#include ++#include ++ ++#include "xeus/xeus.hpp" ++#include "xeus/xkernel_configuration.hpp" ++ ++#include "nlohmann/json.hpp" ++ ++namespace nl = nlohmann; ++ ++namespace xeus ++{ ++ XEUS_API std::string print_starting_message(const xconfiguration& config); ++ ++ XEUS_API std::string extract_filename(int argc, char* argv[]); ++ ++ XEUS_API bool should_print_version(int argc, char* argv[]); ++ ++ XEUS_API ++ nl::json create_error_reply(const std::string& ename = std::string(), ++ const std::string& evalue = std::string(), ++ const nl::json& trace_back = nl::json::array()); ++ ++ XEUS_API ++ nl::json create_successful_reply(const nl::json& payload = nl::json::array(), ++ const nl::json& user_expressions = nl::json::object()); ++ ++ XEUS_API ++ nl::json create_complete_reply(const nl::json& matches, ++ const int& cursor_start, ++ const int& cursor_end, ++ const nl::json& metadata = nl::json::object()); ++ ++ XEUS_API ++ nl::json create_inspect_reply(const bool found = false, ++ const nl::json& data = nl::json::object(), ++ const nl::json& metadata = nl::json::object()); ++ ++ XEUS_API ++ nl::json create_is_complete_reply(const std::string& status = std::string(), ++ const std::string& indent = std::string("")); ++ ++ XEUS_API ++ nl::json create_info_reply(const std::string& protocol_version = std::string(), ++ const std::string& implementation = std::string(), ++ const std::string& implementation_version = std::string(), ++ const std::string& language_name = std::string(), ++ const std::string& language_version = std::string(), ++ const std::string& language_mimetype = std::string(), ++ const std::string& language_file_extension = std::string(), ++ const std::string& pygments_lexer = std::string(), ++ const std::string& language_codemirror_mode = std::string(), ++ const std::string& language_nbconvert_exporter = std::string(), ++ const std::string& banner = std::string(), ++ const bool debugger = false, ++ const nl::json& help_links = nl::json::array()); ++} ++ ++#endif +diff --git a/src/xhelper.cpp b/src/xhelper.cpp +new file mode 100644 +index 0000000..7526f0d +--- /dev/null ++++ b/src/xhelper.cpp +@@ -0,0 +1,155 @@ ++#include ++#include ++ ++#include "nlohmann/json.hpp" ++ ++#include "xeus/xhelper.hpp" ++ ++namespace nl = nlohmann; ++ ++namespace xeus ++{ ++ std::string print_starting_message(const xconfiguration& config) ++ { ++ std::string kernel_info; ++ kernel_info = "Starting kernel...\n\n" ++ "If you want to connect to this kernel from an other client, just copy" ++ " and paste the following content inside of a `kernel.json` file. And then run for example:\n\n" ++ "# jupyter console --existing kernel.json\n\n" ++ "kernel.json\n```\n{\n" ++ " \"transport\": \"" + config.m_transport + "\",\n" ++ " \"ip\": \"" + config.m_ip + "\",\n" ++ " \"control_port\": " + config.m_control_port + ",\n" ++ " \"shell_port\": " + config.m_shell_port + ",\n" ++ " \"stdin_port\": " + config.m_stdin_port + ",\n" ++ " \"iopub_port\": " + config.m_iopub_port + ",\n" ++ " \"hb_port\": " + config.m_hb_port + ",\n" ++ " \"signature_scheme\": \"" + config.m_signature_scheme + "\",\n" ++ " \"key\": \"" + config.m_key + "\"\n" ++ "}\n```"; ++ return kernel_info; ++ } ++ ++ std::string extract_filename(int argc, char* argv[]) ++ { ++ std::string res = ""; ++ for (int i = 0; i < argc; ++i) ++ { ++ if ((std::string(argv[i]) == "-f") && (i + 1 < argc)) ++ { ++ res = argv[i + 1]; ++ for(int j = i; j < argc - 2; ++j) ++ { ++ argv[j] = argv[j + 2]; ++ } ++ argc -= 2; ++ break; ++ } ++ } ++ return res; ++ } ++ ++ bool should_print_version(int argc, char* argv[]) ++ { ++ for (int i = 0; i < argc; ++i) ++ { ++ if (std::string(argv[i]) == "--version") ++ { ++ return true; ++ } ++ } ++ return false; ++ } ++ ++ // Helpers that create replies to the server ++ nl::json create_error_reply(const std::string& evalue, ++ const std::string& ename, ++ const nl::json& trace_back) ++ { ++ nl::json kernel_res; ++ kernel_res["status"] = "error"; ++ kernel_res["ename"] = ename; ++ kernel_res["evalue"] = evalue; ++ kernel_res["traceback"] = trace_back; ++ return kernel_res; ++ } ++ ++ nl::json create_successful_reply(const nl::json& payload, ++ const nl::json& user_expressions) ++ { ++ nl::json kernel_res; ++ kernel_res["status"] = "ok"; ++ kernel_res["payload"] = payload; ++ kernel_res["user_expressions"] = user_expressions; ++ return kernel_res; ++ } ++ ++ nl::json create_complete_reply(const nl::json& matches, ++ const int& cursor_start, ++ const int& cursor_end, ++ const nl::json& metadata) ++ { ++ nl::json kernel_res; ++ kernel_res["status"] = "ok"; ++ kernel_res["matches"] = matches; ++ kernel_res["cursor_start"] = cursor_start; ++ kernel_res["cursor_end"] = cursor_end; ++ kernel_res["metadata"] = metadata; ++ return kernel_res; ++ } ++ ++ nl::json create_inspect_reply(const bool found, ++ const nl::json& data, ++ const nl::json& metadata) ++ { ++ nl::json kernel_res; ++ kernel_res["status"] = "ok"; ++ kernel_res["found"] = found; ++ kernel_res["data"] = data; ++ kernel_res["metadata"] = metadata; ++ return kernel_res; ++ } ++ ++ nl::json create_is_complete_reply(const std::string& status, ++ const std::string& indent) ++ { ++ nl::json kernel_res; ++ kernel_res["status"] = status; ++ kernel_res["indent"] = indent; ++ return kernel_res; ++ } ++ ++ nl::json create_info_reply(const std::string& protocol_version, ++ const std::string& implementation, ++ const std::string& implementation_version, ++ const std::string& language_name, ++ const std::string& language_version, ++ const std::string& language_mimetype, ++ const std::string& language_file_extension, ++ const std::string& language_pygments_lexer, ++ const std::string& language_codemirror_mode, ++ const std::string& language_nbconvert_exporter, ++ const std::string& banner, ++ const bool debugger, ++ const nl::json& help_links) ++ { ++ nl::json kernel_res; ++ kernel_res["status"] = "ok"; ++ kernel_res["protocol_version"] = protocol_version; ++ kernel_res["implementation"] = implementation; ++ kernel_res["implementation_version"] = implementation_version; ++ kernel_res["language_info"]["name"] = language_name; ++ kernel_res["language_info"]["version"] = language_version; ++ kernel_res["language_info"]["mimetype"] = language_mimetype; ++ kernel_res["language_info"]["file_extension"] = language_file_extension; ++ kernel_res["language_info"]["pygments_lexer"] = language_pygments_lexer; ++ kernel_res["language_info"]["codemirror_mode"] = language_codemirror_mode; ++ kernel_res["language_info"]["nbconvert_exporter"] = language_nbconvert_exporter; ++ kernel_res["banner"] = banner; ++ kernel_res["debugger"] = debugger; ++ kernel_res["help_links"] = help_links; ++ return kernel_res; ++ } ++ ++} ++ +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index b24a3e5..176ef2a 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -84,7 +84,7 @@ endif () + foreach(filename IN LISTS XEUS_TESTS) + get_filename_component(targetname ${filename} NAME_WE) + +- add_executable(${targetname} test_main.cpp ${filename}) ++ add_executable(${targetname} test_main.cpp ${filename} test_interpreter.cpp) + target_link_libraries(${targetname} PRIVATE ${xeus_TARGET} doctest::doctest Threads::Threads ${nlohmann_json_TARGET}) + add_test(NAME ${targetname} COMMAND ${targetname}) + endforeach() +@@ -179,3 +179,4 @@ add_test(NAME test_kernel_shell + set_tests_properties(test_kernel_shell + PROPERTIES + ENVIRONMENT "JUPYTER_PATH=${CMAKE_CURRENT_BINARY_DIR}") ++ +diff --git a/test/test_interpreter.cpp b/test/test_interpreter.cpp +index dd7491e..f01aac9 100644 +--- a/test/test_interpreter.cpp ++++ b/test/test_interpreter.cpp +@@ -11,6 +11,8 @@ + #include "nlohmann/json.hpp" + + #include "test_interpreter.hpp" ++ ++#include "xeus/xhelper.hpp" + #include "xeus/xguid.hpp" + + namespace nl = nlohmann; +@@ -34,8 +36,6 @@ namespace test_kernel + nl::json /* user_expressions */, + bool /* allow_stdin */) + { +- nl::json kernel_res; +- + if (code.compare("hello, world") == 0) + { + publish_stream("stdout", code); +@@ -49,62 +49,44 @@ namespace test_kernel + if (code.compare("?") == 0) + { + std::string html_content = R"()"; +- +- kernel_res["status"] = "ok"; +- kernel_res["payload"] = nl::json::array(); +- kernel_res["payload"][0] = nl::json::object({ +- {"data", { +- {"text/plain", "https://xeus.readthedocs.io"}, +- {"text/html", html_content}} +- }, +- {"source", "page"}, +- {"start", 0} +- }); +- kernel_res["user_expressions"] = nl::json::object(); +- +- return kernel_res; ++ https://xeus.readthedocs.io">)"; ++ ++ auto payload = nl::json::array(); ++ payload[0] = nl::json::object({ ++ {"data", { ++ {"text/plain", "https://xeus.readthedocs.io"}, ++ {"text/html", html_content}} ++ }, ++ {"source", "page"}, ++ {"start", 0} ++ }); ++ ++ return xeus::create_successful_reply(payload); + } + + nl::json pub_data; + pub_data["text/plain"] = code; +- publish_execution_result(execution_counter, std::move(pub_data), nl::json()); ++ publish_execution_result(execution_counter, std::move(pub_data), nl::json::object()); + +- kernel_res["status"] = "ok"; +- kernel_res["payload"] = nl::json::array(); +- kernel_res["user_expressions"] = nl::json::object(); +- +- return kernel_res; ++ return xeus::create_successful_reply(); + } + + nl::json test_interpreter::complete_request_impl(const std::string& /* code */, + int /* cursor_pos */) + { +- nl::json result; +- result["status"] = "ok"; +- result["matches"] = {"a.test1", "a.test2"}; +- result["cursor_start"] = 2; +- result["cursor_end"] = 6; +- +- return result; ++ return xeus::create_complete_reply({"a.test1", "a.test2"}, 2, 6); + } + + nl::json test_interpreter::inspect_request_impl(const std::string& /* code */, + int /* cursor_pos */, + int /* detail_level */) + { +- nl::json result; +- result["status"] = "ok"; +- result["found"] = true; +- result["data"] = {{"text/plain", ""}}; +- result["metadata"] = {{"text/plain", ""}}; +- return result; ++ return xeus::create_inspect_reply(true, {{"text/plain", ""}}, {{"text/plain", ""}}); + } + + nl::json test_interpreter::is_complete_request_impl(const std::string& code) + { +- nl::json result; +- result["status"] = code; ++ nl::json result = xeus::create_is_complete_reply(code); + if (code.compare("incomplete") == 0) + { + result["indent"] = " "; +@@ -114,15 +96,17 @@ namespace test_kernel + + nl::json test_interpreter::kernel_info_request_impl() + { +- nl::json result; +- result["implementation"] = "cpp_test"; +- result["implementation_version"] = "1.0.0"; +- result["banner"] = "test_kernel"; +- result["language_info"]["name"] = "cpp"; +- result["language_info"]["version"] = "14.0.0"; +- result["language_info"]["mimetype"] = "text/x-c++src"; +- result["language_info"]["file_extension"] = ".cpp"; +- return result; ++ return xeus::create_info_reply("", ++ "cpp_test", ++ "1.0.0", ++ "cpp", ++ "14.0.0", ++ "text/x-c++src", ++ ".cpp", ++ "", ++ "", ++ "", ++ "test_kernel"); + } + + void test_interpreter::shutdown_request_impl() +diff --git a/test/test_unit_kernel.cpp b/test/test_unit_kernel.cpp +index ee8709b..789bbc9 100644 +--- a/test/test_unit_kernel.cpp ++++ b/test/test_unit_kernel.cpp +@@ -9,63 +9,110 @@ + #include "doctest/doctest.h" + + #include +-#include ++#include + + #include "nlohmann/json.hpp" + ++#include "test_interpreter.hpp" ++ + #include "xeus/xkernel.hpp" + #include "xeus/xmiddleware.hpp" + #include "xeus/xsystem.hpp" ++#include "xeus/xeus_context.hpp" ++#include "xeus/xhelper.hpp" ++#include "xeus/xkernel_configuration.hpp" ++#include "xeus/xserver_zmq.hpp" + + namespace nl = nlohmann; + + namespace xeus + { +- TEST_SUITE("kernel") { +- +- TEST_CASE("get_username") ++ TEST_SUITE("kernel") + { +- std::string username; +- username = get_user_name(); +- REQUIRE_NE(username, "unspecified user"); +- } ++ TEST_CASE("print_starting_message") ++ { ++ auto context = make_context(); + +- TEST_CASE("find_free_port") +- { +- std::string port = find_free_port(); +- REQUIRE_NE(port, ""); +- REQUIRE_EQ(port.length(), std::size_t(5)); +- } ++ using interpreter_ptr = std::unique_ptr; ++ interpreter_ptr interpreter = interpreter_ptr(new test_kernel::test_interpreter()); ++ xkernel kernel(get_user_name(), ++ std::move(context), ++ std::move(interpreter), ++ make_xserver_zmq); ++ std::string kernel_config = print_starting_message(kernel.get_config()); ++ std::cout << kernel_config << std::endl; ++ size_t pos = kernel_config.find("Starting kernel...\n" ++ "\n" ++ "If you want to connect to this kernel from an other client, just copy and paste the following content inside of a `kernel.json` file. And then run for example:\n" ++ "\n" ++ "# jupyter console --existing kernel.json\n" ++ "\n" ++ "kernel.json\n" ++ "```\n" ++ "{\n" ++ " \"transport\": \"tcp\",\n"); ++ REQUIRE_NE(pos, std::string::npos); ++ } + +- TEST_CASE("temp_directory_path") +- { +- std::string path = get_temp_directory_path(); +- std::cout << "Temporary directory path: " << path << std::endl; +- REQUIRE_NE(path, ""); +- REQUIRE_NE(path.back(), '/'); +- REQUIRE_NE(path.back(), '\\'); +- } ++ TEST_CASE("extract_filename") ++ { ++ char* argv[2]; ++ argv[0] = (char*)"-f"; ++ argv[1] = (char*)"connection.json"; ++ std::string file_name = extract_filename(3, argv); ++ REQUIRE_EQ(file_name, "connection.json"); ++ } + +- TEST_CASE("create_directory") +- { +- std::string temp_path = get_temp_directory_path(); +- std::string path = temp_path + "/intermediate/logs"; +- bool res = create_directory(path); +- REQUIRE_UNARY(res); +- } ++ TEST_CASE("should_print_version") ++ { ++ char* argv[2]; ++ argv[0] = (char*)"--version"; ++ REQUIRE_EQ(should_print_version(1, argv), true); ++ } + +- TEST_CASE("get_current_pid") +- { +- int pid = get_current_pid(); +- REQUIRE_NE(pid, -1); +- } ++ TEST_CASE("get_username") ++ { ++ std::string username; ++ username = get_user_name(); ++ REQUIRE_NE(username, "unspecified user"); ++ } + +- TEST_CASE("get_tmp_hash_seed") +- { +- size_t hs = get_tmp_hash_seed(); +- size_t expected = static_cast(0xc70f6907UL); +- REQUIRE_EQ(hs, expected); +- } ++ TEST_CASE("find_free_port") ++ { ++ std::string port = find_free_port(); ++ REQUIRE_NE(port, ""); ++ REQUIRE_EQ(port.length(), std::size_t(5)); ++ } ++ ++ TEST_CASE("temp_directory_path") ++ { ++ std::string path = get_temp_directory_path(); ++ std::cout << "Temporary directory path: " << path << std::endl; ++ REQUIRE_NE(path, ""); ++ REQUIRE_NE(path.back(), '/'); ++ REQUIRE_NE(path.back(), '\\'); ++ } ++ ++ TEST_CASE("create_directory") ++ { ++ std::string temp_path = get_temp_directory_path(); ++ std::string path = temp_path + "/intermediate/logs"; ++ bool res = create_directory(path); ++ REQUIRE_EQ(res, true); ++ } ++ ++ TEST_CASE("get_current_pid") ++ { ++ int pid = get_current_pid(); ++ REQUIRE_NE(pid, -1); ++ } ++ ++ TEST_CASE("get_tmp_hash_seed") ++ { ++ size_t hs = get_tmp_hash_seed(); ++ size_t expected = static_cast(0xc70f6907UL); ++ REQUIRE_EQ(hs, expected); ++ } + } + } + +-- +2.36.1 + diff --git a/xeus.spec b/xeus.spec index 5c551c6..8346a0a 100644 --- a/xeus.spec +++ b/xeus.spec @@ -6,14 +6,25 @@ Summary: C++ implementation of the Jupyter kernel protocol License: BSD URL: https://github.com/jupyter-xeus/xeus Source0: https://github.com/jupyter-xeus/xeus/archive/%{version}/%{name}-%{version}.tar.gz +# Backport to make further backports easier +# https://github.com/jupyter-xeus/xeus/pull/292 +Patch: 0001-switched-from-gtest-to-doctest-292.patch +# https://github.com/jupyter-xeus/xeus/pull/298 +Patch: 0002-Never-delete-context-before-sockets.patch +# Backport a refactor that only adds API, but leave out the documentation +# changes, plus a few later bug fixes. +# https://github.com/jupyter-xeus/xeus/pull/285 +# https://github.com/jupyter-xeus/xeus/pull/314 +# https://github.com/jupyter-xeus/xeus/pull/315 +Patch: 0003-Fix-non-standard-messages.patch BuildRequires: cmake >= 3.8 BuildRequires: cmake(cppzmq) >= 4.3.0 BuildRequires: cmake(nlohmann_json) >= 3.2.0 BuildRequires: cmake(xtl) >= 0.7 +BuildRequires: doctest-devel BuildRequires: doxygen BuildRequires: gcc-c++ -BuildRequires: gtest-devel BuildRequires: libuuid-devel BuildRequires: make BuildRequires: openssl-devel >= 1.0.1 From 7388acfbdbf62ec3452807d7543cc17510b6fc8c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 07:20:13 +0000 Subject: [PATCH 26/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering From 83fd7dd20de322172dcba645c72d3356391bb0cb Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 8 Jan 2023 04:10:57 -0500 Subject: [PATCH 27/46] Drop support for i686 --- xeus.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xeus.spec b/xeus.spec index 8346a0a..b609c7f 100644 --- a/xeus.spec +++ b/xeus.spec @@ -18,6 +18,9 @@ Patch: 0002-Never-delete-context-before-sockets.patch # https://github.com/jupyter-xeus/xeus/pull/315 Patch: 0003-Fix-non-standard-messages.patch +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + BuildRequires: cmake >= 3.8 BuildRequires: cmake(cppzmq) >= 4.3.0 BuildRequires: cmake(nlohmann_json) >= 3.2.0 From 4bff22283c24aa4d3f112916cf52f8201084cedc Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 22 Jan 2023 01:12:55 -0500 Subject: [PATCH 28/46] Update to latest version (#2007795) --- .gitignore | 1 + 0001-switched-from-gtest-to-doctest-292.patch | 523 ------------- ...-Never-delete-context-before-sockets.patch | 66 -- 0003-Fix-non-standard-messages.patch | 707 ------------------ sources | 2 +- xeus.spec | 19 +- 6 files changed, 5 insertions(+), 1313 deletions(-) delete mode 100644 0001-switched-from-gtest-to-doctest-292.patch delete mode 100644 0002-Never-delete-context-before-sockets.patch delete mode 100644 0003-Fix-non-standard-messages.patch diff --git a/.gitignore b/.gitignore index d6f8858..e0bb1ec 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /xeus-1.0.3.tar.gz /xeus-1.0.4.tar.gz /xeus-2.0.0.tar.gz +/xeus-3.0.5.tar.gz diff --git a/0001-switched-from-gtest-to-doctest-292.patch b/0001-switched-from-gtest-to-doctest-292.patch deleted file mode 100644 index f6aecac..0000000 --- a/0001-switched-from-gtest-to-doctest-292.patch +++ /dev/null @@ -1,523 +0,0 @@ -From 8964ef30354f59c19ed5f723c579350eb249c0ba Mon Sep 17 00:00:00 2001 -From: Thorsten Beier -Date: Tue, 21 Sep 2021 13:33:39 +0200 -Subject: [PATCH 1/3] switched from gtest to doctest (#292) - -Switchted to doctest - -Signed-off-by: Elliott Sales de Andrade ---- - .appveyor.yml | 4 +- - .azure-pipelines/unix-build.yml | 2 +- - CMakeLists.txt | 3 +- - environment-dev.yml | 1 + - test/CMakeLists.txt | 55 +--------- - test/copyGTest.cmake.in | 23 ---- - test/downloadGTest.cmake.in | 24 ----- - test/test_main.cpp | 2 + - test/test_unit_kernel.cpp | 36 ++++--- - test/test_xin_memory_history_manager.cpp | 130 ++++++++++++----------- - 10 files changed, 98 insertions(+), 182 deletions(-) - delete mode 100644 test/copyGTest.cmake.in - delete mode 100644 test/downloadGTest.cmake.in - create mode 100644 test/test_main.cpp - -diff --git a/.appveyor.yml b/.appveyor.yml -index e6596e8..a4d8393 100644 ---- a/.appveyor.yml -+++ b/.appveyor.yml -@@ -29,12 +29,12 @@ install: - - conda update -q conda - - conda info -a - - conda install mamba -c conda-forge -- - mamba install cmake cppzmq=4.7.1 zeromq=4.3.2 xtl=0.7 nlohmann_json OpenSSL=1 -c conda-forge -+ - mamba install cmake cppzmq=4.7.1 zeromq=4.3.2 xtl=0.7 nlohmann_json OpenSSL=1 doctest -c conda-forge - - mamba install pytest jupyter_kernel_test=0.3.0 -c conda-forge - # Build - - mkdir build - - cd build -- - cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\LIBRARY -D XEUS_DOWNLOAD_GTEST=ON -Dgtest_force_shared_crt=ON .. -+ - cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\LIBRARY -D XEUS_BUILD_TESTS=ON .. - - nmake install - # Build example - - cd ..\example -diff --git a/.azure-pipelines/unix-build.yml b/.azure-pipelines/unix-build.yml -index 733972b..cfe556b 100644 ---- a/.azure-pipelines/unix-build.yml -+++ b/.azure-pipelines/unix-build.yml -@@ -25,7 +25,7 @@ steps: - if [[ $(xeus_build_shared_lib) == '0' ]]; then - CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXEUS_BUILD_SHARED_LIBS=OFF"; - fi -- cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DXEUS_DOWNLOAD_GTEST=ON -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $CMAKE_EXTRA_ARGS $(Build.SourcesDirectory) -+ cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DXEUS_BUILD_TESTS=ON -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX $CMAKE_EXTRA_ARGS $(Build.SourcesDirectory) - displayName: Configure xeus - workingDirectory: $(Build.BinariesDirectory) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 41e6692..5cd2aab 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -55,7 +55,6 @@ option(XEUS_STATIC_DEPENDENCIES "link statically with xeus dependencies" OFF) - - # Test options - option(XEUS_BUILD_TESTS "xeus test suite" OFF) --option(XEUS_DOWNLOAD_GTEST "build gtest from downloaded sources" OFF) - - # Static build configuration - # ========================== -@@ -352,7 +351,7 @@ endif () - - include(CTest) - --if(XEUS_DOWNLOAD_GTEST OR GTEST_SRC_DIR OR XEUS_BUILD_TESTS) -+if(XEUS_BUILD_TESTS) - set(BUILD_TESTING ON) - message(STATUS "tests enabled") - else () -diff --git a/environment-dev.yml b/environment-dev.yml -index a6c688a..d109add 100644 ---- a/environment-dev.yml -+++ b/environment-dev.yml -@@ -14,5 +14,6 @@ dependencies: - - libopenssl-static=1 - - nlohmann_json - # Test dependencies -+ - doctest >= 2.4.6 - - pytest - - jupyter_kernel_test=0.3.0 -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 61aaade..b24a3e5 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -48,44 +48,15 @@ if(CMAKE_CXX_COMPILER_ID MATCHES MSVC) - set(CMAKE_EXE_LINKER_FLAGS /MANIFEST:NO) - endif() - --if(XEUS_DOWNLOAD_GTEST OR GTEST_SRC_DIR) -- if(XEUS_DOWNLOAD_GTEST) -- # Download and unpack googletest at configure time -- configure_file(downloadGTest.cmake.in googletest-download/CMakeLists.txt) -- else() -- # Copy local source of googletest at configure time -- configure_file(copyGTest.cmake.in googletest-download/CMakeLists.txt) -- endif() -- execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . -- RESULT_VARIABLE result -- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) -- if(result) -- message(FATAL_ERROR "CMake step for googletest failed: ${result}") -- endif() -- execute_process(COMMAND ${CMAKE_COMMAND} --build . -- RESULT_VARIABLE result -- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) -- if(result) -- message(FATAL_ERROR "Build step for googletest failed: ${result}") -- endif() - -- # Add googletest directly to our build. This defines -- # the gtest and gtest_main targets. -- add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src -- ${CMAKE_CURRENT_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) -+find_package(doctest REQUIRED) - -- set(GTEST_INCLUDE_DIRS "${gtest_SOURCE_DIR}/include") -- set(GTEST_BOTH_LIBRARIES gtest_main gtest) --else() -- find_package(GTest REQUIRED) --endif() - - find_package(Threads) - --find_program(PYTEST -- NAMES pytest-3 pytest py.test-3 py.test) -+find_program(PYTEST -+ NAMES pytest-3 pytest py.test-3 py.test REQUIRED) - --include_directories(${GTEST_INCLUDE_DIRS}) - - set(XEUS_TESTS - test_xin_memory_history_manager.cpp -@@ -113,27 +84,11 @@ endif () - foreach(filename IN LISTS XEUS_TESTS) - get_filename_component(targetname ${filename} NAME_WE) - -- add_executable(${targetname} ${filename}) -- target_link_libraries(${targetname} PRIVATE ${xeus_TARGET} ${GTEST_BOTH_LIBRARIES} Threads::Threads ${nlohmann_json_TARGET}) -- -+ add_executable(${targetname} test_main.cpp ${filename}) -+ target_link_libraries(${targetname} PRIVATE ${xeus_TARGET} doctest::doctest Threads::Threads ${nlohmann_json_TARGET}) - add_test(NAME ${targetname} COMMAND ${targetname}) - endforeach() - --if(XEUS_DOWNLOAD_GTEST OR GTEST_SRC_DIR) -- # https://github.com/jupyter-xeus/xeus/pull/126 -- # This should really just be post gtest and gtest_main targets, but CMake -- # won't allow us to do that. So do it after the last test (which depends on -- # those anyway.) -- if (XEUS_BUILD_SHARED_LIBS) -- add_custom_command( -- TARGET ${targetname} POST_BUILD -- COMMAND ${CMAKE_COMMAND} -E copy "$" "${CMAKE_CURRENT_BINARY_DIR}/") -- -- add_custom_command( -- TARGET ${targetname} POST_BUILD -- COMMAND ${CMAKE_COMMAND} -E copy "$" "${CMAKE_CURRENT_BINARY_DIR}/") -- endif () --endif() - - # Test_kernel tests - # ================= -diff --git a/test/copyGTest.cmake.in b/test/copyGTest.cmake.in -deleted file mode 100644 -index 1e5d3ed..0000000 ---- a/test/copyGTest.cmake.in -+++ /dev/null -@@ -1,23 +0,0 @@ --############################################################################ --# Copyright (c) 2016, Johan Mabille, Sylvain Corlay and Wolf Vollprecht # --# # --# Distributed under the terms of the BSD 3-Clause License. # --# # --# The full license is in the file LICENSE, distributed with this software. # --############################################################################ -- --cmake_minimum_required(VERSION 2.8.2) -- --project(googletest-download NONE) -- --include(ExternalProject) --ExternalProject_Add(googletest -- URL "${GTEST_SRC_DIR}" -- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" -- BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" -- CONFIGURE_COMMAND "" -- BUILD_COMMAND "" -- INSTALL_COMMAND "" -- TEST_COMMAND "" --) -- -diff --git a/test/downloadGTest.cmake.in b/test/downloadGTest.cmake.in -deleted file mode 100644 -index 852d43c..0000000 ---- a/test/downloadGTest.cmake.in -+++ /dev/null -@@ -1,24 +0,0 @@ --############################################################################ --# Copyright (c) 2016, Johan Mabille, Sylvain Corlay and Wolf Vollprecht # --# # --# Distributed under the terms of the BSD 3-Clause License. # --# # --# The full license is in the file LICENSE, distributed with this software. # --############################################################################ -- --cmake_minimum_required(VERSION 2.8.2) -- --project(googletest-download NONE) -- --include(ExternalProject) --ExternalProject_Add(googletest -- GIT_REPOSITORY https://github.com/google/googletest.git -- GIT_TAG release-1.10.0 -- SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" -- BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" -- CONFIGURE_COMMAND "" -- BUILD_COMMAND "" -- INSTALL_COMMAND "" -- TEST_COMMAND "" --) -- -diff --git a/test/test_main.cpp b/test/test_main.cpp -new file mode 100644 -index 0000000..84684c0 ---- /dev/null -+++ b/test/test_main.cpp -@@ -0,0 +1,2 @@ -+#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN -+#include "doctest/doctest.h" -\ No newline at end of file -diff --git a/test/test_unit_kernel.cpp b/test/test_unit_kernel.cpp -index 74b9f07..ee8709b 100644 ---- a/test/test_unit_kernel.cpp -+++ b/test/test_unit_kernel.cpp -@@ -6,9 +6,10 @@ - * The full license is in the file LICENSE, distributed with this software. * - ****************************************************************************/ - --#include "gtest/gtest.h" -+#include "doctest/doctest.h" - - #include -+#include - - #include "nlohmann/json.hpp" - -@@ -20,48 +21,51 @@ namespace nl = nlohmann; - - namespace xeus - { -- TEST(kernel, get_username) -+ TEST_SUITE("kernel") { -+ -+ TEST_CASE("get_username") - { - std::string username; - username = get_user_name(); -- EXPECT_NE(username, "unspecified user"); -+ REQUIRE_NE(username, "unspecified user"); - } - -- TEST(kernel, find_free_port) -+ TEST_CASE("find_free_port") - { - std::string port = find_free_port(); -- EXPECT_NE(port, ""); -- EXPECT_EQ(port.length(), std::size_t(5)); -+ REQUIRE_NE(port, ""); -+ REQUIRE_EQ(port.length(), std::size_t(5)); - } - -- TEST(kernel, temp_directory_path) -+ TEST_CASE("temp_directory_path") - { - std::string path = get_temp_directory_path(); - std::cout << "Temporary directory path: " << path << std::endl; -- EXPECT_NE(path, ""); -- EXPECT_NE(path.back(), '/'); -- EXPECT_NE(path.back(), '\\'); -+ REQUIRE_NE(path, ""); -+ REQUIRE_NE(path.back(), '/'); -+ REQUIRE_NE(path.back(), '\\'); - } - -- TEST(kernel, create_directory) -+ TEST_CASE("create_directory") - { - std::string temp_path = get_temp_directory_path(); - std::string path = temp_path + "/intermediate/logs"; - bool res = create_directory(path); -- EXPECT_TRUE(res); -+ REQUIRE_UNARY(res); - } - -- TEST(kernel, get_current_pid) -+ TEST_CASE("get_current_pid") - { - int pid = get_current_pid(); -- EXPECT_NE(pid, -1); -+ REQUIRE_NE(pid, -1); - } - -- TEST(kernel, get_tmp_hash_seed) -+ TEST_CASE("get_tmp_hash_seed") - { - size_t hs = get_tmp_hash_seed(); - size_t expected = static_cast(0xc70f6907UL); -- EXPECT_EQ(hs, expected); -+ REQUIRE_EQ(hs, expected); -+ } - } - } - -diff --git a/test/test_xin_memory_history_manager.cpp b/test/test_xin_memory_history_manager.cpp -index df2275a..a204ca1 100644 ---- a/test/test_xin_memory_history_manager.cpp -+++ b/test/test_xin_memory_history_manager.cpp -@@ -6,7 +6,7 @@ - * The full license is in the file LICENSE, distributed with this software. * - ****************************************************************************/ - --#include "gtest/gtest.h" -+#include "doctest/doctest.h" - - #include - #include -@@ -23,7 +23,8 @@ namespace xeus - using history_manager_ptr = std::unique_ptr; - using history_type = std::vector>; - -- TEST(xin_memory_history_manager, get_tail) -+ TEST_SUITE("xin_memory_history_manager"){ -+ TEST_CASE("get_tail") - { - history_manager_ptr hist = xeus::make_in_memory_history_manager(); - hist->store_inputs(0, 1, "print(3)"); -@@ -32,29 +33,29 @@ namespace xeus - hist->store_inputs(0, 4, "a"); - - nl::json tail1 = hist->get_tail(1000, true, false); -- ASSERT_EQ(tail1["status"], "ok"); -+ REQUIRE_EQ(tail1["status"], "ok"); - auto history1 = tail1["history"].get(); -- ASSERT_EQ(history1.size(), std::size_t(4)); -- ASSERT_EQ(history1[0][1], "1"); -- ASSERT_EQ(history1[0][2], "print(3)"); -- ASSERT_EQ(history1[1][1], "2"); -- ASSERT_EQ(history1[1][2], "a = 3"); -- ASSERT_EQ(history1[2][1], "3"); -- ASSERT_EQ(history1[2][2], "print(a)"); -- ASSERT_EQ(history1[3][1], "4"); -- ASSERT_EQ(history1[3][2], "a"); -+ REQUIRE_EQ(history1.size(), std::size_t(4)); -+ REQUIRE_EQ(history1[0][1], "1"); -+ REQUIRE_EQ(history1[0][2], "print(3)"); -+ REQUIRE_EQ(history1[1][1], "2"); -+ REQUIRE_EQ(history1[1][2], "a = 3"); -+ REQUIRE_EQ(history1[2][1], "3"); -+ REQUIRE_EQ(history1[2][2], "print(a)"); -+ REQUIRE_EQ(history1[3][1], "4"); -+ REQUIRE_EQ(history1[3][2], "a"); - - nl::json tail2 = hist->get_tail(2, true, false); -- ASSERT_EQ(tail2["status"], "ok"); -+ REQUIRE_EQ(tail2["status"], "ok"); - auto history2 = tail2["history"].get(); -- ASSERT_EQ(history2.size(), std::size_t(2)); -- ASSERT_EQ(history2[0][1], "3"); -- ASSERT_EQ(history2[0][2], "print(a)"); -- ASSERT_EQ(history2[1][1], "4"); -- ASSERT_EQ(history2[1][2], "a"); -+ REQUIRE_EQ(history2.size(), std::size_t(2)); -+ REQUIRE_EQ(history2[0][1], "3"); -+ REQUIRE_EQ(history2[0][2], "print(a)"); -+ REQUIRE_EQ(history2[1][1], "4"); -+ REQUIRE_EQ(history2[1][2], "a"); - } - -- TEST(xin_memory_history_manager, get_range) -+ TEST_CASE("get_range") - { - history_manager_ptr hist = xeus::make_in_memory_history_manager(); - hist->store_inputs(0, 1, "print(3)"); -@@ -63,26 +64,26 @@ namespace xeus - hist->store_inputs(0, 4, "a"); - - nl::json range1 = hist->get_range(0, 1, 2, true, false); -- ASSERT_EQ(range1["status"], "ok"); -+ REQUIRE_EQ(range1["status"], "ok"); - auto history1 = range1["history"].get(); -- ASSERT_EQ(history1.size(), std::size_t(1)); -- ASSERT_EQ(history1[0][1], "2"); -- ASSERT_EQ(history1[0][2], "a = 3"); -+ REQUIRE_EQ(history1.size(), std::size_t(1)); -+ REQUIRE_EQ(history1[0][1], "2"); -+ REQUIRE_EQ(history1[0][2], "a = 3"); - - nl::json range2 = hist->get_range(0, 1, 3, true, false); -- ASSERT_EQ(range2["status"], "ok"); -+ REQUIRE_EQ(range2["status"], "ok"); - auto history2 = range2["history"].get(); -- ASSERT_EQ(history2.size(), std::size_t(2)); -- ASSERT_EQ(history2[0][1], "2"); -- ASSERT_EQ(history2[0][2], "a = 3"); -- ASSERT_EQ(history2[1][1], "3"); -- ASSERT_EQ(history2[1][2], "print(a)"); -+ REQUIRE_EQ(history2.size(), std::size_t(2)); -+ REQUIRE_EQ(history2[0][1], "2"); -+ REQUIRE_EQ(history2[0][2], "a = 3"); -+ REQUIRE_EQ(history2[1][1], "3"); -+ REQUIRE_EQ(history2[1][2], "print(a)"); - - nl::json range3 = hist->get_range(0, 1000, 2, true, false); -- ASSERT_EQ(range3["status"], "error"); -+ REQUIRE_EQ(range3["status"], "error"); - } - -- TEST(xin_memory_history_manager, search) -+ TEST_CASE("search") - { - history_manager_ptr hist = xeus::make_in_memory_history_manager(); - hist->store_inputs(0, 1, "print(36)"); -@@ -91,55 +92,56 @@ namespace xeus - hist->store_inputs(0, 4, "a"); - - nl::json search1 = hist->search("print*", true, false, 10, false); -- ASSERT_EQ(search1["status"], "ok"); -+ REQUIRE_EQ(search1["status"], "ok"); - auto history1 = search1["history"].get(); -- ASSERT_EQ(history1.size(), std::size_t(2)); -- ASSERT_EQ(history1[0][1], "1"); -- ASSERT_EQ(history1[0][2], "print(36)"); -- ASSERT_EQ(history1[1][1], "3"); -- ASSERT_EQ(history1[1][2], "print(a)"); -+ REQUIRE_EQ(history1.size(), std::size_t(2)); -+ REQUIRE_EQ(history1[0][1], "1"); -+ REQUIRE_EQ(history1[0][2], "print(36)"); -+ REQUIRE_EQ(history1[1][1], "3"); -+ REQUIRE_EQ(history1[1][2], "print(a)"); - - nl::json search2 = hist->search("print(*)", true, false, 10, false); -- ASSERT_EQ(search2["status"], "ok"); -+ REQUIRE_EQ(search2["status"], "ok"); - auto history2 = search2["history"].get(); -- ASSERT_EQ(history2.size(), std::size_t(2)); -- ASSERT_EQ(history2[0][1], "1"); -- ASSERT_EQ(history2[0][2], "print(36)"); -- ASSERT_EQ(history2[1][1], "3"); -- ASSERT_EQ(history2[1][2], "print(a)"); -+ REQUIRE_EQ(history2.size(), std::size_t(2)); -+ REQUIRE_EQ(history2[0][1], "1"); -+ REQUIRE_EQ(history2[0][2], "print(36)"); -+ REQUIRE_EQ(history2[1][1], "3"); -+ REQUIRE_EQ(history2[1][2], "print(a)"); - - nl::json search3 = hist->search("print(?)", true, false, 10, false); -- ASSERT_EQ(search3["status"], "ok"); -+ REQUIRE_EQ(search3["status"], "ok"); - auto history3 = search3["history"].get(); -- ASSERT_EQ(history3.size(), std::size_t(1)); -- ASSERT_EQ(history3[0][1], "3"); -- ASSERT_EQ(history3[0][2], "print(a)"); -+ REQUIRE_EQ(history3.size(), std::size_t(1)); -+ REQUIRE_EQ(history3[0][1], "3"); -+ REQUIRE_EQ(history3[0][2], "print(a)"); - - nl::json search4 = hist->search("print*", true, false, 1, false); -- ASSERT_EQ(search4["status"], "ok"); -+ REQUIRE_EQ(search4["status"], "ok"); - auto history4 = search4["history"].get(); -- ASSERT_EQ(history4.size(), std::size_t(1)); -- ASSERT_EQ(history4[0][1], "3"); -- ASSERT_EQ(history4[0][2], "print(a)"); -+ REQUIRE_EQ(history4.size(), std::size_t(1)); -+ REQUIRE_EQ(history4[0][1], "3"); -+ REQUIRE_EQ(history4[0][2], "print(a)"); - - hist->store_inputs(0, 3, "print(a)"); - nl::json search5 = hist->search("print*", true, false, 10, false); -- ASSERT_EQ(search5["status"], "ok"); -+ REQUIRE_EQ(search5["status"], "ok"); - auto history5 = search5["history"].get(); -- ASSERT_EQ(history5.size(), std::size_t(3)); -- ASSERT_EQ(history2[0][1], "1"); -- ASSERT_EQ(history2[0][2], "print(36)"); -- ASSERT_EQ(history5[1][1], "3"); -- ASSERT_EQ(history5[1][2], "print(a)"); -- ASSERT_EQ(history5[2][1], "3"); -- ASSERT_EQ(history5[2][2], "print(a)"); -+ REQUIRE_EQ(history5.size(), std::size_t(3)); -+ REQUIRE_EQ(history2[0][1], "1"); -+ REQUIRE_EQ(history2[0][2], "print(36)"); -+ REQUIRE_EQ(history5[1][1], "3"); -+ REQUIRE_EQ(history5[1][2], "print(a)"); -+ REQUIRE_EQ(history5[2][1], "3"); -+ REQUIRE_EQ(history5[2][2], "print(a)"); - - nl::json search6 = hist->search("print*", true, false, 10, true); -- ASSERT_EQ(search6["status"], "ok"); -+ REQUIRE_EQ(search6["status"], "ok"); - auto history6 = search6["history"].get(); -- ASSERT_EQ(history2[0][1], "1"); -- ASSERT_EQ(history2[0][2], "print(36)"); -- ASSERT_EQ(history5[1][1], "3"); -- ASSERT_EQ(history5[1][2], "print(a)"); -+ REQUIRE_EQ(history2[0][1], "1"); -+ REQUIRE_EQ(history2[0][2], "print(36)"); -+ REQUIRE_EQ(history5[1][1], "3"); -+ REQUIRE_EQ(history5[1][2], "print(a)"); -+ } - } - } --- -2.36.1 - diff --git a/0002-Never-delete-context-before-sockets.patch b/0002-Never-delete-context-before-sockets.patch deleted file mode 100644 index 77551e5..0000000 --- a/0002-Never-delete-context-before-sockets.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 206f54ea54c0a5355adb1531e0d523501aa9c2b9 Mon Sep 17 00:00:00 2001 -From: Johan Mabille -Date: Fri, 24 Sep 2021 00:48:26 +0200 -Subject: [PATCH 2/3] Never delete context before sockets - -Signed-off-by: Elliott Sales de Andrade ---- - include/xeus/xkernel.hpp | 5 ++++- - src/xkernel.cpp | 4 ++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/include/xeus/xkernel.hpp b/include/xeus/xkernel.hpp -index 4ef0dd3..d32c07e 100644 ---- a/include/xeus/xkernel.hpp -+++ b/include/xeus/xkernel.hpp -@@ -84,13 +84,16 @@ namespace xeus - std::string m_kernel_id; - std::string m_session_id; - std::string m_user_name; -+ // The context must be declared before any other -+ // middleware component since it must be destroyed -+ // last -+ context_ptr p_context; - interpreter_ptr p_interpreter; - history_manager_ptr p_history_manager; - logger_ptr p_logger; - server_ptr p_server; - debugger_builder m_debugger_builder; - debugger_ptr p_debugger; -- context_ptr p_context; - kernel_core_ptr p_core; - nl::json m_debugger_config; - nl::json::error_handler_t m_error_handler; -diff --git a/src/xkernel.cpp b/src/xkernel.cpp -index 2bda8af..c8e263a 100644 ---- a/src/xkernel.cpp -+++ b/src/xkernel.cpp -@@ -82,11 +82,11 @@ namespace xeus - nl::json::error_handler_t eh) - : m_config(config) - , m_user_name(user_name) -+ , p_context(std::move(context)) - , p_interpreter(std::move(interpreter)) - , p_history_manager(std::move(history_manager)) - , p_logger(std::move(logger)) - , m_debugger_builder(dbuilder) -- , p_context(std::move(context)) - , m_debugger_config(debugger_config) - , m_error_handler(eh) - { -@@ -103,11 +103,11 @@ namespace xeus - nl::json debugger_config, - nl::json::error_handler_t eh) - : m_user_name(user_name) -+ , p_context(std::move(context)) - , p_interpreter(std::move(interpreter)) - , p_history_manager(std::move(history_manager)) - , p_logger(std::move(logger)) - , m_debugger_builder(dbuilder) -- , p_context(std::move(context)) - , m_debugger_config(debugger_config) - , m_error_handler(eh) - { --- -2.36.1 - diff --git a/0003-Fix-non-standard-messages.patch b/0003-Fix-non-standard-messages.patch deleted file mode 100644 index 4c5fc5d..0000000 --- a/0003-Fix-non-standard-messages.patch +++ /dev/null @@ -1,707 +0,0 @@ -From 271c3e1c4c134336323b979b6b0d5d702e0baa38 Mon Sep 17 00:00:00 2001 -From: Mariana Meireles -Date: Fri, 24 Sep 2021 07:30:56 +0000 -Subject: [PATCH 3/3] Fix non-standard messages - -Signed-off-by: Elliott Sales de Andrade ---- - CMakeLists.txt | 4 +- - example/src/custom_interpreter.cpp | 61 ++++-------- - include/xeus/xhelper.hpp | 72 ++++++++++++++ - src/xhelper.cpp | 155 +++++++++++++++++++++++++++++ - test/CMakeLists.txt | 3 +- - test/test_interpreter.cpp | 78 ++++++--------- - test/test_unit_kernel.cpp | 127 +++++++++++++++-------- - 7 files changed, 367 insertions(+), 133 deletions(-) - create mode 100644 include/xeus/xhelper.hpp - create mode 100644 src/xhelper.cpp - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5cd2aab..b968abb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -133,6 +133,7 @@ set(XEUS_HEADERS - ${XEUS_INCLUDE_DIR}/xeus/xkernel_configuration.hpp - ${XEUS_INCLUDE_DIR}/xeus/xlogger.hpp - ${XEUS_INCLUDE_DIR}/xeus/xmessage.hpp -+ ${XEUS_INCLUDE_DIR}/xeus/xhelper.hpp - ${XEUS_INCLUDE_DIR}/xeus/xmiddleware.hpp - ${XEUS_INCLUDE_DIR}/xeus/xserver.hpp - ${XEUS_INCLUDE_DIR}/xeus/xserver_control_main.hpp -@@ -168,6 +169,7 @@ set(XEUS_SOURCES - ${XEUS_SOURCE_DIR}/xlogger_impl.hpp - ${XEUS_SOURCE_DIR}/xlogger_impl.cpp - ${XEUS_SOURCE_DIR}/xmessage.cpp -+ ${XEUS_SOURCE_DIR}/xhelper.cpp - ${XEUS_SOURCE_DIR}/xmock_interpreter.cpp - ${XEUS_SOURCE_DIR}/xmock_interpreter.hpp - ${XEUS_SOURCE_DIR}/xmiddleware.cpp -@@ -351,7 +353,7 @@ endif () - - include(CTest) - --if(XEUS_BUILD_TESTS) -+if(XEUS_DOWNLOAD_GTEST OR GTEST_SRC_DIR OR XEUS_BUILD_TESTS) - set(BUILD_TESTING ON) - message(STATUS "tests enabled") - else () -diff --git a/example/src/custom_interpreter.cpp b/example/src/custom_interpreter.cpp -index caad375..e2dbfca 100644 ---- a/example/src/custom_interpreter.cpp -+++ b/example/src/custom_interpreter.cpp -@@ -10,7 +10,7 @@ - #include - - #include "nlohmann/json.hpp" -- -+#include "xeus/xhelper.hpp" - #include "custom_interpreter.hpp" - - namespace nl = nlohmann; -@@ -44,9 +44,7 @@ namespace custom - // publish_execution_error(error_name, error_value, error_traceback); - publish_execution_error("TypeError", "123", {"!@#$", "*(*"}); - -- nl::json result; -- result["status"] = "ok"; -- return result; -+ return xeus::create_successful_reply(); - } - - void custom_interpreter::configure_impl() -@@ -57,26 +55,16 @@ namespace custom - nl::json custom_interpreter::complete_request_impl(const std::string& code, - int cursor_pos) - { -- nl::json result; -- - // Code starts with 'H', it could be the following completion - if (code[0] == 'H') - { -- result["status"] = "ok"; -- result["matches"] = {"Hello", "Hey", "Howdy"}; -- result["cursor_start"] = 5; -- result["cursor_end"] = cursor_pos; -+ return xeus::create_complete_reply({"Hello", "Hey", "Howdy"}, 5, cursor_pos); - } - // No completion result - else - { -- result["status"] = "ok"; -- result["matches"] = nl::json::array(); -- result["cursor_start"] = cursor_pos; -- result["cursor_end"] = cursor_pos; -+ return xeus::create_complete_reply({}, cursor_pos, cursor_pos); - } -- -- return result; - } - - nl::json custom_interpreter::inspect_request_impl(const std::string& code, -@@ -87,48 +75,33 @@ namespace custom - - if (code.compare("print") == 0) - { -- result["found"] = true; -- result["text/plain"] = "Print objects to the text stream file, [...]"; -+ return xeus::create_inspect_reply(true, -+ {"text/plain", "Print objects to the text stream file, [...]"}); - } - else - { -- result["found"] = false; -+ return xeus::create_inspect_reply(); - } -- -- result["status"] = "ok"; -- return result; - } - - nl::json custom_interpreter::is_complete_request_impl(const std::string& /*code*/) - { -- nl::json result; -- -- // if (is_complete(code)) -- // { -- result["status"] = "complete"; -- // } -- // else -- // { -- // result["status"] = "incomplete"; -- // result["indent"] = 4; -- //} -- -- return result; -+ return xeus::create_is_complete_reply("complete"); - } - - nl::json custom_interpreter::kernel_info_request_impl() - { -- nl::json result; -- result["implementation"] = "my_kernel"; -- result["implementation_version"] = "0.1.0"; -- result["language_info"]["name"] = "python"; -- result["language_info"]["version"] = "3.7"; -- result["language_info"]["mimetype"] = "text/x-python"; -- result["language_info"]["file_extension"] = ".py"; -- return result; -+ return xeus::create_info_reply("", -+ "my_kernel", -+ "0.1.0", -+ "python", -+ "3.7", -+ "text/x-python", -+ ".py"); - } - -- void custom_interpreter::shutdown_request_impl() { -+ void custom_interpreter::shutdown_request_impl() -+ { - std::cout << "Bye!!" << std::endl; - } - -diff --git a/include/xeus/xhelper.hpp b/include/xeus/xhelper.hpp -new file mode 100644 -index 0000000..584c150 ---- /dev/null -+++ b/include/xeus/xhelper.hpp -@@ -0,0 +1,72 @@ -+/*************************************************************************** -+* Copyright (c) 2016, Johan Mabille, Sylvain Corlay, Martin Renou * -+* Copyright (c) 2016, QuantStack * -+* * -+* Distributed under the terms of the BSD 3-Clause License. * -+* * -+* The full license is in the file LICENSE, distributed with this software. * -+****************************************************************************/ -+ -+#ifndef XEUS_HELPER_HPP -+#define XEUS_HELPER_HPP -+ -+#include -+#include -+#include -+ -+#include "xeus/xeus.hpp" -+#include "xeus/xkernel_configuration.hpp" -+ -+#include "nlohmann/json.hpp" -+ -+namespace nl = nlohmann; -+ -+namespace xeus -+{ -+ XEUS_API std::string print_starting_message(const xconfiguration& config); -+ -+ XEUS_API std::string extract_filename(int argc, char* argv[]); -+ -+ XEUS_API bool should_print_version(int argc, char* argv[]); -+ -+ XEUS_API -+ nl::json create_error_reply(const std::string& ename = std::string(), -+ const std::string& evalue = std::string(), -+ const nl::json& trace_back = nl::json::array()); -+ -+ XEUS_API -+ nl::json create_successful_reply(const nl::json& payload = nl::json::array(), -+ const nl::json& user_expressions = nl::json::object()); -+ -+ XEUS_API -+ nl::json create_complete_reply(const nl::json& matches, -+ const int& cursor_start, -+ const int& cursor_end, -+ const nl::json& metadata = nl::json::object()); -+ -+ XEUS_API -+ nl::json create_inspect_reply(const bool found = false, -+ const nl::json& data = nl::json::object(), -+ const nl::json& metadata = nl::json::object()); -+ -+ XEUS_API -+ nl::json create_is_complete_reply(const std::string& status = std::string(), -+ const std::string& indent = std::string("")); -+ -+ XEUS_API -+ nl::json create_info_reply(const std::string& protocol_version = std::string(), -+ const std::string& implementation = std::string(), -+ const std::string& implementation_version = std::string(), -+ const std::string& language_name = std::string(), -+ const std::string& language_version = std::string(), -+ const std::string& language_mimetype = std::string(), -+ const std::string& language_file_extension = std::string(), -+ const std::string& pygments_lexer = std::string(), -+ const std::string& language_codemirror_mode = std::string(), -+ const std::string& language_nbconvert_exporter = std::string(), -+ const std::string& banner = std::string(), -+ const bool debugger = false, -+ const nl::json& help_links = nl::json::array()); -+} -+ -+#endif -diff --git a/src/xhelper.cpp b/src/xhelper.cpp -new file mode 100644 -index 0000000..7526f0d ---- /dev/null -+++ b/src/xhelper.cpp -@@ -0,0 +1,155 @@ -+#include -+#include -+ -+#include "nlohmann/json.hpp" -+ -+#include "xeus/xhelper.hpp" -+ -+namespace nl = nlohmann; -+ -+namespace xeus -+{ -+ std::string print_starting_message(const xconfiguration& config) -+ { -+ std::string kernel_info; -+ kernel_info = "Starting kernel...\n\n" -+ "If you want to connect to this kernel from an other client, just copy" -+ " and paste the following content inside of a `kernel.json` file. And then run for example:\n\n" -+ "# jupyter console --existing kernel.json\n\n" -+ "kernel.json\n```\n{\n" -+ " \"transport\": \"" + config.m_transport + "\",\n" -+ " \"ip\": \"" + config.m_ip + "\",\n" -+ " \"control_port\": " + config.m_control_port + ",\n" -+ " \"shell_port\": " + config.m_shell_port + ",\n" -+ " \"stdin_port\": " + config.m_stdin_port + ",\n" -+ " \"iopub_port\": " + config.m_iopub_port + ",\n" -+ " \"hb_port\": " + config.m_hb_port + ",\n" -+ " \"signature_scheme\": \"" + config.m_signature_scheme + "\",\n" -+ " \"key\": \"" + config.m_key + "\"\n" -+ "}\n```"; -+ return kernel_info; -+ } -+ -+ std::string extract_filename(int argc, char* argv[]) -+ { -+ std::string res = ""; -+ for (int i = 0; i < argc; ++i) -+ { -+ if ((std::string(argv[i]) == "-f") && (i + 1 < argc)) -+ { -+ res = argv[i + 1]; -+ for(int j = i; j < argc - 2; ++j) -+ { -+ argv[j] = argv[j + 2]; -+ } -+ argc -= 2; -+ break; -+ } -+ } -+ return res; -+ } -+ -+ bool should_print_version(int argc, char* argv[]) -+ { -+ for (int i = 0; i < argc; ++i) -+ { -+ if (std::string(argv[i]) == "--version") -+ { -+ return true; -+ } -+ } -+ return false; -+ } -+ -+ // Helpers that create replies to the server -+ nl::json create_error_reply(const std::string& evalue, -+ const std::string& ename, -+ const nl::json& trace_back) -+ { -+ nl::json kernel_res; -+ kernel_res["status"] = "error"; -+ kernel_res["ename"] = ename; -+ kernel_res["evalue"] = evalue; -+ kernel_res["traceback"] = trace_back; -+ return kernel_res; -+ } -+ -+ nl::json create_successful_reply(const nl::json& payload, -+ const nl::json& user_expressions) -+ { -+ nl::json kernel_res; -+ kernel_res["status"] = "ok"; -+ kernel_res["payload"] = payload; -+ kernel_res["user_expressions"] = user_expressions; -+ return kernel_res; -+ } -+ -+ nl::json create_complete_reply(const nl::json& matches, -+ const int& cursor_start, -+ const int& cursor_end, -+ const nl::json& metadata) -+ { -+ nl::json kernel_res; -+ kernel_res["status"] = "ok"; -+ kernel_res["matches"] = matches; -+ kernel_res["cursor_start"] = cursor_start; -+ kernel_res["cursor_end"] = cursor_end; -+ kernel_res["metadata"] = metadata; -+ return kernel_res; -+ } -+ -+ nl::json create_inspect_reply(const bool found, -+ const nl::json& data, -+ const nl::json& metadata) -+ { -+ nl::json kernel_res; -+ kernel_res["status"] = "ok"; -+ kernel_res["found"] = found; -+ kernel_res["data"] = data; -+ kernel_res["metadata"] = metadata; -+ return kernel_res; -+ } -+ -+ nl::json create_is_complete_reply(const std::string& status, -+ const std::string& indent) -+ { -+ nl::json kernel_res; -+ kernel_res["status"] = status; -+ kernel_res["indent"] = indent; -+ return kernel_res; -+ } -+ -+ nl::json create_info_reply(const std::string& protocol_version, -+ const std::string& implementation, -+ const std::string& implementation_version, -+ const std::string& language_name, -+ const std::string& language_version, -+ const std::string& language_mimetype, -+ const std::string& language_file_extension, -+ const std::string& language_pygments_lexer, -+ const std::string& language_codemirror_mode, -+ const std::string& language_nbconvert_exporter, -+ const std::string& banner, -+ const bool debugger, -+ const nl::json& help_links) -+ { -+ nl::json kernel_res; -+ kernel_res["status"] = "ok"; -+ kernel_res["protocol_version"] = protocol_version; -+ kernel_res["implementation"] = implementation; -+ kernel_res["implementation_version"] = implementation_version; -+ kernel_res["language_info"]["name"] = language_name; -+ kernel_res["language_info"]["version"] = language_version; -+ kernel_res["language_info"]["mimetype"] = language_mimetype; -+ kernel_res["language_info"]["file_extension"] = language_file_extension; -+ kernel_res["language_info"]["pygments_lexer"] = language_pygments_lexer; -+ kernel_res["language_info"]["codemirror_mode"] = language_codemirror_mode; -+ kernel_res["language_info"]["nbconvert_exporter"] = language_nbconvert_exporter; -+ kernel_res["banner"] = banner; -+ kernel_res["debugger"] = debugger; -+ kernel_res["help_links"] = help_links; -+ return kernel_res; -+ } -+ -+} -+ -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index b24a3e5..176ef2a 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -84,7 +84,7 @@ endif () - foreach(filename IN LISTS XEUS_TESTS) - get_filename_component(targetname ${filename} NAME_WE) - -- add_executable(${targetname} test_main.cpp ${filename}) -+ add_executable(${targetname} test_main.cpp ${filename} test_interpreter.cpp) - target_link_libraries(${targetname} PRIVATE ${xeus_TARGET} doctest::doctest Threads::Threads ${nlohmann_json_TARGET}) - add_test(NAME ${targetname} COMMAND ${targetname}) - endforeach() -@@ -179,3 +179,4 @@ add_test(NAME test_kernel_shell - set_tests_properties(test_kernel_shell - PROPERTIES - ENVIRONMENT "JUPYTER_PATH=${CMAKE_CURRENT_BINARY_DIR}") -+ -diff --git a/test/test_interpreter.cpp b/test/test_interpreter.cpp -index dd7491e..f01aac9 100644 ---- a/test/test_interpreter.cpp -+++ b/test/test_interpreter.cpp -@@ -11,6 +11,8 @@ - #include "nlohmann/json.hpp" - - #include "test_interpreter.hpp" -+ -+#include "xeus/xhelper.hpp" - #include "xeus/xguid.hpp" - - namespace nl = nlohmann; -@@ -34,8 +36,6 @@ namespace test_kernel - nl::json /* user_expressions */, - bool /* allow_stdin */) - { -- nl::json kernel_res; -- - if (code.compare("hello, world") == 0) - { - publish_stream("stdout", code); -@@ -49,62 +49,44 @@ namespace test_kernel - if (code.compare("?") == 0) - { - std::string html_content = R"()"; -- -- kernel_res["status"] = "ok"; -- kernel_res["payload"] = nl::json::array(); -- kernel_res["payload"][0] = nl::json::object({ -- {"data", { -- {"text/plain", "https://xeus.readthedocs.io"}, -- {"text/html", html_content}} -- }, -- {"source", "page"}, -- {"start", 0} -- }); -- kernel_res["user_expressions"] = nl::json::object(); -- -- return kernel_res; -+ https://xeus.readthedocs.io">)"; -+ -+ auto payload = nl::json::array(); -+ payload[0] = nl::json::object({ -+ {"data", { -+ {"text/plain", "https://xeus.readthedocs.io"}, -+ {"text/html", html_content}} -+ }, -+ {"source", "page"}, -+ {"start", 0} -+ }); -+ -+ return xeus::create_successful_reply(payload); - } - - nl::json pub_data; - pub_data["text/plain"] = code; -- publish_execution_result(execution_counter, std::move(pub_data), nl::json()); -+ publish_execution_result(execution_counter, std::move(pub_data), nl::json::object()); - -- kernel_res["status"] = "ok"; -- kernel_res["payload"] = nl::json::array(); -- kernel_res["user_expressions"] = nl::json::object(); -- -- return kernel_res; -+ return xeus::create_successful_reply(); - } - - nl::json test_interpreter::complete_request_impl(const std::string& /* code */, - int /* cursor_pos */) - { -- nl::json result; -- result["status"] = "ok"; -- result["matches"] = {"a.test1", "a.test2"}; -- result["cursor_start"] = 2; -- result["cursor_end"] = 6; -- -- return result; -+ return xeus::create_complete_reply({"a.test1", "a.test2"}, 2, 6); - } - - nl::json test_interpreter::inspect_request_impl(const std::string& /* code */, - int /* cursor_pos */, - int /* detail_level */) - { -- nl::json result; -- result["status"] = "ok"; -- result["found"] = true; -- result["data"] = {{"text/plain", ""}}; -- result["metadata"] = {{"text/plain", ""}}; -- return result; -+ return xeus::create_inspect_reply(true, {{"text/plain", ""}}, {{"text/plain", ""}}); - } - - nl::json test_interpreter::is_complete_request_impl(const std::string& code) - { -- nl::json result; -- result["status"] = code; -+ nl::json result = xeus::create_is_complete_reply(code); - if (code.compare("incomplete") == 0) - { - result["indent"] = " "; -@@ -114,15 +96,17 @@ namespace test_kernel - - nl::json test_interpreter::kernel_info_request_impl() - { -- nl::json result; -- result["implementation"] = "cpp_test"; -- result["implementation_version"] = "1.0.0"; -- result["banner"] = "test_kernel"; -- result["language_info"]["name"] = "cpp"; -- result["language_info"]["version"] = "14.0.0"; -- result["language_info"]["mimetype"] = "text/x-c++src"; -- result["language_info"]["file_extension"] = ".cpp"; -- return result; -+ return xeus::create_info_reply("", -+ "cpp_test", -+ "1.0.0", -+ "cpp", -+ "14.0.0", -+ "text/x-c++src", -+ ".cpp", -+ "", -+ "", -+ "", -+ "test_kernel"); - } - - void test_interpreter::shutdown_request_impl() -diff --git a/test/test_unit_kernel.cpp b/test/test_unit_kernel.cpp -index ee8709b..789bbc9 100644 ---- a/test/test_unit_kernel.cpp -+++ b/test/test_unit_kernel.cpp -@@ -9,63 +9,110 @@ - #include "doctest/doctest.h" - - #include --#include -+#include - - #include "nlohmann/json.hpp" - -+#include "test_interpreter.hpp" -+ - #include "xeus/xkernel.hpp" - #include "xeus/xmiddleware.hpp" - #include "xeus/xsystem.hpp" -+#include "xeus/xeus_context.hpp" -+#include "xeus/xhelper.hpp" -+#include "xeus/xkernel_configuration.hpp" -+#include "xeus/xserver_zmq.hpp" - - namespace nl = nlohmann; - - namespace xeus - { -- TEST_SUITE("kernel") { -- -- TEST_CASE("get_username") -+ TEST_SUITE("kernel") - { -- std::string username; -- username = get_user_name(); -- REQUIRE_NE(username, "unspecified user"); -- } -+ TEST_CASE("print_starting_message") -+ { -+ auto context = make_context(); - -- TEST_CASE("find_free_port") -- { -- std::string port = find_free_port(); -- REQUIRE_NE(port, ""); -- REQUIRE_EQ(port.length(), std::size_t(5)); -- } -+ using interpreter_ptr = std::unique_ptr; -+ interpreter_ptr interpreter = interpreter_ptr(new test_kernel::test_interpreter()); -+ xkernel kernel(get_user_name(), -+ std::move(context), -+ std::move(interpreter), -+ make_xserver_zmq); -+ std::string kernel_config = print_starting_message(kernel.get_config()); -+ std::cout << kernel_config << std::endl; -+ size_t pos = kernel_config.find("Starting kernel...\n" -+ "\n" -+ "If you want to connect to this kernel from an other client, just copy and paste the following content inside of a `kernel.json` file. And then run for example:\n" -+ "\n" -+ "# jupyter console --existing kernel.json\n" -+ "\n" -+ "kernel.json\n" -+ "```\n" -+ "{\n" -+ " \"transport\": \"tcp\",\n"); -+ REQUIRE_NE(pos, std::string::npos); -+ } - -- TEST_CASE("temp_directory_path") -- { -- std::string path = get_temp_directory_path(); -- std::cout << "Temporary directory path: " << path << std::endl; -- REQUIRE_NE(path, ""); -- REQUIRE_NE(path.back(), '/'); -- REQUIRE_NE(path.back(), '\\'); -- } -+ TEST_CASE("extract_filename") -+ { -+ char* argv[2]; -+ argv[0] = (char*)"-f"; -+ argv[1] = (char*)"connection.json"; -+ std::string file_name = extract_filename(3, argv); -+ REQUIRE_EQ(file_name, "connection.json"); -+ } - -- TEST_CASE("create_directory") -- { -- std::string temp_path = get_temp_directory_path(); -- std::string path = temp_path + "/intermediate/logs"; -- bool res = create_directory(path); -- REQUIRE_UNARY(res); -- } -+ TEST_CASE("should_print_version") -+ { -+ char* argv[2]; -+ argv[0] = (char*)"--version"; -+ REQUIRE_EQ(should_print_version(1, argv), true); -+ } - -- TEST_CASE("get_current_pid") -- { -- int pid = get_current_pid(); -- REQUIRE_NE(pid, -1); -- } -+ TEST_CASE("get_username") -+ { -+ std::string username; -+ username = get_user_name(); -+ REQUIRE_NE(username, "unspecified user"); -+ } - -- TEST_CASE("get_tmp_hash_seed") -- { -- size_t hs = get_tmp_hash_seed(); -- size_t expected = static_cast(0xc70f6907UL); -- REQUIRE_EQ(hs, expected); -- } -+ TEST_CASE("find_free_port") -+ { -+ std::string port = find_free_port(); -+ REQUIRE_NE(port, ""); -+ REQUIRE_EQ(port.length(), std::size_t(5)); -+ } -+ -+ TEST_CASE("temp_directory_path") -+ { -+ std::string path = get_temp_directory_path(); -+ std::cout << "Temporary directory path: " << path << std::endl; -+ REQUIRE_NE(path, ""); -+ REQUIRE_NE(path.back(), '/'); -+ REQUIRE_NE(path.back(), '\\'); -+ } -+ -+ TEST_CASE("create_directory") -+ { -+ std::string temp_path = get_temp_directory_path(); -+ std::string path = temp_path + "/intermediate/logs"; -+ bool res = create_directory(path); -+ REQUIRE_EQ(res, true); -+ } -+ -+ TEST_CASE("get_current_pid") -+ { -+ int pid = get_current_pid(); -+ REQUIRE_NE(pid, -1); -+ } -+ -+ TEST_CASE("get_tmp_hash_seed") -+ { -+ size_t hs = get_tmp_hash_seed(); -+ size_t expected = static_cast(0xc70f6907UL); -+ REQUIRE_EQ(hs, expected); -+ } - } - } - --- -2.36.1 - diff --git a/sources b/sources index 15f8694..024dbdc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-2.0.0.tar.gz) = a1897dda5416e202351a1afce7e2ebb4427ed06feb9edd8bb526df293999a021726b6214068a92203adbc533439f39a710279bfa4e4e485f168e79e9fca27b3a +SHA512 (xeus-3.0.5.tar.gz) = 38c10ab6ab13e323a082124dd4980f5886081426a08bbeda509b28dae6cc794e23f23aadc189b39874f6d7fb1d917372bcfa9ceb2b6d0893fd2e5b333067b9d9 diff --git a/xeus.spec b/xeus.spec index b609c7f..0bbddd3 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,28 +1,16 @@ Name: xeus -Version: 2.0.0 +Version: 3.0.5 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol License: BSD URL: https://github.com/jupyter-xeus/xeus Source0: https://github.com/jupyter-xeus/xeus/archive/%{version}/%{name}-%{version}.tar.gz -# Backport to make further backports easier -# https://github.com/jupyter-xeus/xeus/pull/292 -Patch: 0001-switched-from-gtest-to-doctest-292.patch -# https://github.com/jupyter-xeus/xeus/pull/298 -Patch: 0002-Never-delete-context-before-sockets.patch -# Backport a refactor that only adds API, but leave out the documentation -# changes, plus a few later bug fixes. -# https://github.com/jupyter-xeus/xeus/pull/285 -# https://github.com/jupyter-xeus/xeus/pull/314 -# https://github.com/jupyter-xeus/xeus/pull/315 -Patch: 0003-Fix-non-standard-messages.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: cmake >= 3.8 -BuildRequires: cmake(cppzmq) >= 4.3.0 BuildRequires: cmake(nlohmann_json) >= 3.2.0 BuildRequires: cmake(xtl) >= 0.7 BuildRequires: doctest-devel @@ -30,8 +18,7 @@ BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: libuuid-devel BuildRequires: make -BuildRequires: openssl-devel >= 1.0.1 -BuildRequires: pkgconfig(libzmq) >= 4.2.5 +BuildRequires: pkgconfig(uuid) BuildRequires: python3dist(breathe) BuildRequires: python3dist(jupyter-kernel-test) BuildRequires: python3dist(pytest) @@ -75,7 +62,7 @@ rm docs/build/html/.buildinfo %files %doc README.md docs/build/html %license LICENSE -%{_libdir}/libxeus.so.5* +%{_libdir}/libxeus.so.8* %files devel %{_includedir}/xeus/ From ae40bd3eac8b468d36ecb135a21b1e337949bf93 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 3 Jul 2023 20:43:50 -0400 Subject: [PATCH 29/46] Update to latest version (#2211103) --- .gitignore | 1 + sources | 2 +- xeus.spec | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e0bb1ec..f872696 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /xeus-1.0.4.tar.gz /xeus-2.0.0.tar.gz /xeus-3.0.5.tar.gz +/xeus-3.1.1.tar.gz diff --git a/sources b/sources index 024dbdc..decef14 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-3.0.5.tar.gz) = 38c10ab6ab13e323a082124dd4980f5886081426a08bbeda509b28dae6cc794e23f23aadc189b39874f6d7fb1d917372bcfa9ceb2b6d0893fd2e5b333067b9d9 +SHA512 (xeus-3.1.1.tar.gz) = a5260f42e0aaf9b715bc46d10938e5ecaaf4a543e7b14576d4b02b505ab41419ba4b38796b5566eabd4d932e2737b266771f0c3d0b37feda75dcf921d4440cf0 diff --git a/xeus.spec b/xeus.spec index 0bbddd3..d699eb8 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 3.0.5 +Version: 3.1.1 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol @@ -62,7 +62,7 @@ rm docs/build/html/.buildinfo %files %doc README.md docs/build/html %license LICENSE -%{_libdir}/libxeus.so.8* +%{_libdir}/libxeus.so.9* %files devel %{_includedir}/xeus/ From def077ae5090ebc985af4514b6b42fe1e6483b64 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 18:42:41 +0000 Subject: [PATCH 30/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering From 14b0072979e2f9f2f7f92e8544dc1fe3cb1acc59 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 8 Oct 2023 04:24:11 -0400 Subject: [PATCH 31/46] Update to latest version (#2240272) --- .gitignore | 1 + sources | 2 +- xeus.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f872696..07d29dd 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /xeus-2.0.0.tar.gz /xeus-3.0.5.tar.gz /xeus-3.1.1.tar.gz +/xeus-3.1.3.tar.gz diff --git a/sources b/sources index decef14..29ab737 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-3.1.1.tar.gz) = a5260f42e0aaf9b715bc46d10938e5ecaaf4a543e7b14576d4b02b505ab41419ba4b38796b5566eabd4d932e2737b266771f0c3d0b37feda75dcf921d4440cf0 +SHA512 (xeus-3.1.3.tar.gz) = a432a4e775db0179febfcd6a8e2d5900c949e2962e5f7820103f3098bb93e0b5d52ef01446c87765635852b2a586f53e4dd72c4db261d33735955defaec7ef01 diff --git a/xeus.spec b/xeus.spec index d699eb8..4cfa506 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 3.1.1 +Version: 3.1.3 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol From 468f62bc99fb9ae4895a883e97e23fe74475ccf4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 3 Dec 2023 03:41:22 -0500 Subject: [PATCH 32/46] Update to latest version (#2252266) --- .gitignore | 1 + sources | 2 +- xeus.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 07d29dd..c86bf90 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /xeus-3.0.5.tar.gz /xeus-3.1.1.tar.gz /xeus-3.1.3.tar.gz +/xeus-3.1.4.tar.gz diff --git a/sources b/sources index 29ab737..3d15042 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-3.1.3.tar.gz) = a432a4e775db0179febfcd6a8e2d5900c949e2962e5f7820103f3098bb93e0b5d52ef01446c87765635852b2a586f53e4dd72c4db261d33735955defaec7ef01 +SHA512 (xeus-3.1.4.tar.gz) = 4c95fb386f3fb19beef9902e7be8e8a108ba8abf70525c23921f5a056bf16296b506152356df9aaf3f2750bd98a21510213295c049a82db9d325851fda58e133 diff --git a/xeus.spec b/xeus.spec index 4cfa506..34e28ca 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 3.1.3 +Version: 3.1.4 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol From cf06ac4f13dfb9a29acd3a8583512fc3bc4b97f0 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 7 Jan 2024 04:20:02 -0500 Subject: [PATCH 33/46] Update to latest version (#2256781) --- .gitignore | 1 + sources | 2 +- xeus.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c86bf90..a8d8df5 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /xeus-3.1.1.tar.gz /xeus-3.1.3.tar.gz /xeus-3.1.4.tar.gz +/xeus-3.1.5.tar.gz diff --git a/sources b/sources index 3d15042..dbb3df6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-3.1.4.tar.gz) = 4c95fb386f3fb19beef9902e7be8e8a108ba8abf70525c23921f5a056bf16296b506152356df9aaf3f2750bd98a21510213295c049a82db9d325851fda58e133 +SHA512 (xeus-3.1.5.tar.gz) = 40ede2371d6b4e584fd1d0d5c95c326314f21f3642dddab0e6ca0d40e1bc5b88b1f0f07d9bfbb6d788d567f9dc39eb73d4e62a0e2afc041030d5b97def637b09 diff --git a/xeus.spec b/xeus.spec index 34e28ca..65ca309 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 3.1.4 +Version: 3.1.5 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol From abb5eb002fbce1874ac25a8eb04a8817468fd468 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 09:31:33 +0000 Subject: [PATCH 34/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 8b4af5d04a01b146ee39923be40afe66b5a42365 Mon Sep 17 00:00:00 2001 From: Benson Muite Date: Sat, 1 Jun 2024 14:22:52 +0300 Subject: [PATCH 35/46] Update to 5.1.0 --- sources | 2 +- xeus.spec | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sources b/sources index dbb3df6..e0d9041 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-3.1.5.tar.gz) = 40ede2371d6b4e584fd1d0d5c95c326314f21f3642dddab0e6ca0d40e1bc5b88b1f0f07d9bfbb6d788d567f9dc39eb73d4e62a0e2afc041030d5b97def637b09 +SHA512 (xeus-5.1.0.tar.gz) = 2f85b290618a1994197a00b2cab2276578cef4075596cdd276ddd719a8af1e68026f01379c710beb38aa71170abc3999fdf7ded06344c88b082b22327df2f554 diff --git a/xeus.spec b/xeus.spec index 65ca309..faddb8e 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 3.1.5 +Version: 5.1.0 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol @@ -11,8 +11,7 @@ Source0: https://github.com/jupyter-xeus/xeus/archive/%{version}/%{name}- ExcludeArch: %{ix86} BuildRequires: cmake >= 3.8 -BuildRequires: cmake(nlohmann_json) >= 3.2.0 -BuildRequires: cmake(xtl) >= 0.7 +BuildRequires: cmake(nlohmann_json) >= 3.11.0 BuildRequires: doctest-devel BuildRequires: doxygen BuildRequires: gcc-c++ @@ -62,7 +61,7 @@ rm docs/build/html/.buildinfo %files %doc README.md docs/build/html %license LICENSE -%{_libdir}/libxeus.so.9* +%{_libdir}/libxeus.so.11* %files devel %{_includedir}/xeus/ From ed77e0db6bb90f454a04e65e6e32ee354b4dcd28 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 09:55:17 +0000 Subject: [PATCH 36/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From c7b6f0e334f19851d9677112ff0e0446b33af3b1 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 8 Aug 2024 05:01:01 -0400 Subject: [PATCH 37/46] Update to latest version (#2263428) --- .gitignore | 1 + sources | 2 +- xeus.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a8d8df5..e768f3f 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /xeus-3.1.3.tar.gz /xeus-3.1.4.tar.gz /xeus-3.1.5.tar.gz +/xeus-5.1.1.tar.gz diff --git a/sources b/sources index e0d9041..ab6fa62 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-5.1.0.tar.gz) = 2f85b290618a1994197a00b2cab2276578cef4075596cdd276ddd719a8af1e68026f01379c710beb38aa71170abc3999fdf7ded06344c88b082b22327df2f554 +SHA512 (xeus-5.1.1.tar.gz) = 694a93f8e76c984daea74647a1ae7a3f37bb07a87a395b294e862af2c0fa4998a4c197388567cf2442d56844809c5d415cdaf5e1d19343f6c89967a36fc88d8e diff --git a/xeus.spec b/xeus.spec index faddb8e..a31d326 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 5.1.0 +Version: 5.1.1 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol From f70e25b5d623a0b5a727efff7bfba657d863588f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 4 Sep 2024 22:52:31 +0200 Subject: [PATCH 38/46] convert license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- xeus.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xeus.spec b/xeus.spec index a31d326..af9a49b 100644 --- a/xeus.spec +++ b/xeus.spec @@ -3,7 +3,8 @@ Version: 5.1.1 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol -License: BSD +# Automatically converted from old format: BSD - review is highly recommended. +License: LicenseRef-Callaway-BSD URL: https://github.com/jupyter-xeus/xeus Source0: https://github.com/jupyter-xeus/xeus/archive/%{version}/%{name}-%{version}.tar.gz From f292f7502575146050565746eb9f433d2ccb8f1e Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 22 Sep 2024 05:00:21 -0400 Subject: [PATCH 39/46] Correct license --- xeus.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xeus.spec b/xeus.spec index af9a49b..6f88bf0 100644 --- a/xeus.spec +++ b/xeus.spec @@ -3,8 +3,7 @@ Version: 5.1.1 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol -# Automatically converted from old format: BSD - review is highly recommended. -License: LicenseRef-Callaway-BSD +License: BSD-3-Clause URL: https://github.com/jupyter-xeus/xeus Source0: https://github.com/jupyter-xeus/xeus/archive/%{version}/%{name}-%{version}.tar.gz From d13ae02137b867826ec6759f17581a44681f3f57 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 15:39:48 +0000 Subject: [PATCH 40/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 6ff579c6fc59e4f623d9997c765e8a05ce91eebc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:44:52 +0000 Subject: [PATCH 41/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From b47ecc8029d7b539bc539bd1a5b732bebea922fa Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 24 Aug 2025 23:42:22 -0400 Subject: [PATCH 42/46] Add Packit configuration --- .packit.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .packit.yaml diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..d11d5ba --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,18 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ +--- +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + rawhide: + fast_forward_merge_into: + - fedora-branched + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-all From 715eb251d6b524f7d17fab4f272a37dc03f2489d Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 21 Sep 2025 15:41:00 -0400 Subject: [PATCH 43/46] Update to latest version (#2349512) --- .gitignore | 2 ++ sources | 2 +- xeus.spec | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e768f3f..5a18e6b 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ /xeus-3.1.4.tar.gz /xeus-3.1.5.tar.gz /xeus-5.1.1.tar.gz +/xeus-5.2.3.tar.gz +/xeus-5.2.4.tar.gz diff --git a/sources b/sources index ab6fa62..fdc6e03 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-5.1.1.tar.gz) = 694a93f8e76c984daea74647a1ae7a3f37bb07a87a395b294e862af2c0fa4998a4c197388567cf2442d56844809c5d415cdaf5e1d19343f6c89967a36fc88d8e +SHA512 (xeus-5.2.4.tar.gz) = 6dba4aa1b274e9471701ccb12825d9810bee3e6e79fa6ae1463b0b55b4270b3697b69fda3a6e5d737b10592ae3c1cfa347f912de5a17f9fff8e1841fce7fe165 diff --git a/xeus.spec b/xeus.spec index 6f88bf0..57a3775 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 5.1.1 +Version: 5.2.4 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol @@ -61,7 +61,7 @@ rm docs/build/html/.buildinfo %files %doc README.md docs/build/html %license LICENSE -%{_libdir}/libxeus.so.11* +%{_libdir}/libxeus.so.13{,.*} %files devel %{_includedir}/xeus/ From d7784151153e2b51a839719c6f5e74a6cb676495 Mon Sep 17 00:00:00 2001 From: Packit Date: Mon, 24 Nov 2025 16:45:06 +0000 Subject: [PATCH 44/46] Update to 5.2.6 upstream release - Resolves: rhbz#2416738 Commit authored by Packit automation (https://packit.dev/) --- .gitignore | 1 + README.packit | 3 +++ sources | 2 +- xeus.spec | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 README.packit diff --git a/.gitignore b/.gitignore index 5a18e6b..43180ab 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ /xeus-5.1.1.tar.gz /xeus-5.2.3.tar.gz /xeus-5.2.4.tar.gz +/xeus-5.2.6.tar.gz diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..a901bca --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 1.12.0.post1.dev18+gc39b0e7d4. diff --git a/sources b/sources index fdc6e03..2d23942 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xeus-5.2.4.tar.gz) = 6dba4aa1b274e9471701ccb12825d9810bee3e6e79fa6ae1463b0b55b4270b3697b69fda3a6e5d737b10592ae3c1cfa347f912de5a17f9fff8e1841fce7fe165 +SHA512 (xeus-5.2.6.tar.gz) = f931ed1ba0122ee3855f4ce6bb3e30506a3fd56011c9594679baad7382372aa39e2088d1e84c6c730334e27c94080fc3b381073e987afd68186d64626abb32f6 diff --git a/xeus.spec b/xeus.spec index 57a3775..dcdfba4 100644 --- a/xeus.spec +++ b/xeus.spec @@ -1,5 +1,5 @@ Name: xeus -Version: 5.2.4 +Version: 5.2.6 Release: %autorelease Summary: C++ implementation of the Jupyter kernel protocol From 8353711aec8df0fe69636b39159191e7ae9af322 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 20:34:46 +0000 Subject: [PATCH 45/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 14b64b75af4505ef2de2e0d6d8ec73c5f1b20d46 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 09:08:01 +0000 Subject: [PATCH 46/46] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild