Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from DerThorsten/jupyter_lite_kernel
changes for jupyterlite-kernel
- Loading branch information
Showing
6 changed files
with
448 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
# slightly modified version of: https://github.com/Kitware/CMake/blob/master/Modules/FindSQLite3.cmake | ||
|
||
# CMake - Cross Platform Makefile Generator | ||
# Copyright 2000-2022 Kitware, Inc. and Contributors | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# | ||
# * Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# | ||
# * Neither the name of Kitware, Inc. nor the names of Contributors | ||
# may be used to endorse or promote products derived from this | ||
# software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
# ------------------------------------------------------------------------------ | ||
# | ||
# The following individuals and institutions are among the Contributors: | ||
# | ||
# * Aaron C. Meadows <cmake@shadowguarddev.com> | ||
# * Adriaan de Groot <groot@kde.org> | ||
# * Aleksey Avdeev <solo@altlinux.ru> | ||
# * Alexander Neundorf <neundorf@kde.org> | ||
# * Alexander Smorkalov <alexander.smorkalov@itseez.com> | ||
# * Alexey Sokolov <sokolov@google.com> | ||
# * Alex Merry <alex.merry@kde.org> | ||
# * Alex Turbov <i.zaufi@gmail.com> | ||
# * Andreas Pakulat <apaku@gmx.de> | ||
# * Andreas Schneider <asn@cryptomilk.org> | ||
# * André Rigland Brodtkorb <Andre.Brodtkorb@ifi.uio.no> | ||
# * Axel Huebl, Helmholtz-Zentrum Dresden - Rossendorf | ||
# * Benjamin Eikel | ||
# * Bjoern Ricks <bjoern.ricks@gmail.com> | ||
# * Brad Hards <bradh@kde.org> | ||
# * Christopher Harvey | ||
# * Christoph Grüninger <foss@grueninger.de> | ||
# * Clement Creusot <creusot@cs.york.ac.uk> | ||
# * Daniel Blezek <blezek@gmail.com> | ||
# * Daniel Pfeifer <daniel@pfeifer-mail.de> | ||
# * Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | ||
# * Eran Ifrah <eran.ifrah@gmail.com> | ||
# * Esben Mose Hansen, Ange Optimization ApS | ||
# * Geoffrey Viola <geoffrey.viola@asirobots.com> | ||
# * Google Inc | ||
# * Gregor Jasny | ||
# * Helio Chissini de Castro <helio@kde.org> | ||
# * Ilya Lavrenov <ilya.lavrenov@itseez.com> | ||
# * Insight Software Consortium <insightsoftwareconsortium.org> | ||
# * Intel Corporation <www.intel.com> | ||
# * Jan Woetzel | ||
# * Jordan Williams <jordan@jwillikers.com> | ||
# * Julien Schueller | ||
# * Kelly Thompson <kgt@lanl.gov> | ||
# * Konstantin Podsvirov <konstantin@podsvirov.pro> | ||
# * Laurent Montel <montel@kde.org> | ||
# * Mario Bensi <mbensi@ipsquad.net> | ||
# * Martin Gräßlin <mgraesslin@kde.org> | ||
# * Mathieu Malaterre <mathieu.malaterre@gmail.com> | ||
# * Matthaeus G. Chajdas | ||
# * Matthias Kretz <kretz@kde.org> | ||
# * Matthias Maennich <matthias@maennich.net> | ||
# * Michael Hirsch, Ph.D. <www.scivision.co> | ||
# * Michael Stürmer | ||
# * Miguel A. Figueroa-Villanueva | ||
# * Mike Jackson | ||
# * Mike McQuaid <mike@mikemcquaid.com> | ||
# * Nicolas Bock <nicolasbock@gmail.com> | ||
# * Nicolas Despres <nicolas.despres@gmail.com> | ||
# * Nikita Krupen'ko <krnekit@gmail.com> | ||
# * NVIDIA Corporation <www.nvidia.com> | ||
# * OpenGamma Ltd. <opengamma.com> | ||
# * Patrick Stotko <stotko@cs.uni-bonn.de> | ||
# * Per Øyvind Karlsen <peroyvind@mandriva.org> | ||
# * Peter Collingbourne <peter@pcc.me.uk> | ||
# * Petr Gotthard <gotthard@honeywell.com> | ||
# * Philip Lowman <philip@yhbt.com> | ||
# * Philippe Proulx <pproulx@efficios.com> | ||
# * Raffi Enficiaud, Max Planck Society | ||
# * Raumfeld <raumfeld.com> | ||
# * Roger Leigh <rleigh@codelibre.net> | ||
# * Rolf Eike Beer <eike@sf-mail.de> | ||
# * Roman Donchenko <roman.donchenko@itseez.com> | ||
# * Roman Kharitonov <roman.kharitonov@itseez.com> | ||
# * Ruslan Baratov | ||
# * Sebastian Holtermann <sebholt@xwmw.org> | ||
# * Stephen Kelly <steveire@gmail.com> | ||
# * Sylvain Joubert <joubert.sy@gmail.com> | ||
# * The Qt Company Ltd. | ||
# * Thomas Sondergaard <ts@medical-insight.com> | ||
# * Tobias Hunger <tobias.hunger@qt.io> | ||
# * Todd Gamblin <tgamblin@llnl.gov> | ||
# * Tristan Carel | ||
# * University of Dundee | ||
# * Vadim Zhukov | ||
# * Will Dicharry <wdicharry@stellarscience.com> | ||
# | ||
# See version control history for details of individual contributions. | ||
# | ||
# The above copyright and license notice applies to distributions of | ||
# CMake in source and binary form. Third-party software packages supplied | ||
# with CMake under compatible licenses provide their own copyright notices | ||
# documented in corresponding subdirectories or source files. | ||
# | ||
# ------------------------------------------------------------------------------ | ||
# | ||
# CMake was initially developed by Kitware with the following sponsorship: | ||
# | ||
# * National Library of Medicine at the National Institutes of Health | ||
# as part of the Insight Segmentation and Registration Toolkit (ITK). | ||
# | ||
# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel | ||
# Visualization Initiative. | ||
# | ||
# * National Alliance for Medical Image Computing (NAMIC) is funded by the | ||
# National Institutes of Health through the NIH Roadmap for Medical Research, | ||
# Grant U54 EB005149. | ||
# | ||
# * Kitware, Inc. | ||
|
||
|
||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying | ||
# file Copyright.txt or https://cmake.org/licensing for details. | ||
|
||
#[=======================================================================[.rst: | ||
FindSQLite3 | ||
----------- | ||
|
||
.. versionadded:: 3.14 | ||
|
||
Find the SQLite libraries, v3 | ||
|
||
IMPORTED targets | ||
^^^^^^^^^^^^^^^^ | ||
|
||
This module defines the following :prop_tgt:`IMPORTED` target: | ||
|
||
``SQLite::SQLite3`` | ||
|
||
Result variables | ||
^^^^^^^^^^^^^^^^ | ||
|
||
This module will set the following variables if found: | ||
|
||
``SQLite3_INCLUDE_DIRS`` | ||
where to find sqlite3.h, etc. | ||
``SQLite3_LIBRARIES`` | ||
the libraries to link against to use SQLite3. | ||
``SQLite3_VERSION`` | ||
version of the SQLite3 library found | ||
``SQLite3_FOUND`` | ||
TRUE if found | ||
|
||
#]=======================================================================] | ||
INCLUDE(FindPackageHandleStandardArgs) | ||
|
||
# Look for the necessary header | ||
find_path(SQLite3_INCLUDE_DIR NAMES sqlite3.h) | ||
mark_as_advanced(SQLite3_INCLUDE_DIR) | ||
|
||
# Look for the necessary library | ||
find_library(SQLite3_LIBRARY NAMES sqlite3 sqlite) | ||
mark_as_advanced(SQLite3_LIBRARY) | ||
|
||
# Extract version information from the header file | ||
if(SQLite3_INCLUDE_DIR) | ||
file(STRINGS ${SQLite3_INCLUDE_DIR}/sqlite3.h _ver_line | ||
REGEX "^#define SQLITE_VERSION *\"[0-9]+\\.[0-9]+\\.[0-9]+\"" | ||
LIMIT_COUNT 1) | ||
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" | ||
SQLite3_VERSION "${_ver_line}") | ||
unset(_ver_line) | ||
endif() | ||
|
||
find_package_handle_standard_args(SQLite3 | ||
REQUIRED_VARS SQLite3_INCLUDE_DIR SQLite3_LIBRARY | ||
VERSION_VAR SQLite3_VERSION) | ||
|
||
# Create the imported target | ||
if(SQLite3_FOUND) | ||
set(SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR}) | ||
set(SQLite3_LIBRARIES ${SQLite3_LIBRARY}) | ||
if(NOT TARGET SQLite::SQLite3) | ||
add_library(SQLite::SQLite3 UNKNOWN IMPORTED) | ||
set_target_properties(SQLite::SQLite3 PROPERTIES | ||
IMPORTED_LOCATION "${SQLite3_LIBRARY}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}") | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*************************************************************************** | ||
* Copyright (c) 2022, Thorsten Beier * * | ||
* Copyright (c) 2022, QuantStack * | ||
* * | ||
* Distributed under the terms of the BSD 3-Clause License. * | ||
* * | ||
* The full license is in the file LICENSE, distributed with this software. * | ||
****************************************************************************/ | ||
|
||
#include <iostream> | ||
#include <memory> | ||
|
||
|
||
#include <emscripten/bind.h> | ||
|
||
#include "xeus-sqlite/xeus_sqlite_interpreter.hpp" | ||
#include "xeus/xembind.hpp" | ||
|
||
|
||
EMSCRIPTEN_BINDINGS(my_module) { | ||
xeus::export_core(); | ||
using interpreter_type = xeus_sqlite::interpreter; | ||
xeus::export_kernel<interpreter_type>("xkernel"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.