%global _empty_manifest_terminate_build 0 Name: python-spylon-kernel Version: 0.4.1 Release: 1 Summary: Jupyter metakernel for apache spark and scala License: BSD 3-clause URL: http://github.com/maxpoint/spylon-kernel Source0: https://mirrors.nju.edu.cn/pypi/web/packages/3b/26/0c1c289ab535489b0e290461b0f2c45a00d2033a50a58a45f6d00c5fb205/spylon-kernel-0.4.1.tar.gz BuildArch: noarch %description # spylon-kernel [![Build Status](https://travis-ci.org/maxpoint/spylon-kernel.svg?branch=master)](https://travis-ci.org/maxpoint/spylon-kernel) [![codecov](https://codecov.io/gh/maxpoint/spylon-kernel/branch/master/graph/badge.svg)](https://codecov.io/gh/maxpoint/spylon-kernel) A Scala [Jupyter kernel](http://jupyter.readthedocs.io/en/latest/projects/kernels.html) that uses [metakernel](https://github.com/Calysto/metakernel) in combination with [py4j](https://www.py4j.org/). ## Prerequisites * Apache Spark 2.1.1 compiled for Scala 2.11 * Jupyter Notebook * Python 3.5+ ## Install You can install the spylon-kernel package using `pip` or `conda`. ```bash pip install spylon-kernel # or conda install -c conda-forge spylon-kernel ``` ## Using it as a Scala Kernel You can use spylon-kernel as Scala kernel for Jupyter Notebook. Do this when you want to work with Spark in Scala with a bit of Python code mixed in. Create a kernel spec for Jupyter notebook by running the following command: ```bash python -m spylon_kernel install ``` Launch `jupyter notebook` and you should see a `spylon-kernel` as an option in the *New* dropdown menu. See [the basic example notebook](./examples/basic_example.ipynb) for information about how to intiialize a Spark session and use it both in Scala and Python. ## Using it as an IPython Magic You can also use spylon-kernel as a magic in an IPython notebook. Do this when you want to mix a little bit of Scala into your primarily Python notebook. ```python from spylon_kernel import register_ipython_magics register_ipython_magics() ``` ```scala %%scala val x = 8 x ``` ## Using it as a Library Finally, you can use spylon-kernel as a Python library. Do this when you want to evaluate a string of Scala code in a Python script or shell. ```python from spylon_kernel import get_scala_interpreter interp = get_scala_interpreter() # Evaluate the result of a scala code block. interp.interpret(""" val x = 8 x """) interp.last_result() ``` # Release Process Push a tag and submit a source dist to PyPI. ``` git commit -m 'REL: 0.2.1' --allow-empty git tag -a 0.2.1 # and enter the same message as the commit git push origin master # or send a PR # if everything builds / tests cleanly, release to pypi make release ``` Then update https://github.com/conda-forge/spylon-kernel-feedstock. %package -n python3-spylon-kernel Summary: Jupyter metakernel for apache spark and scala Provides: python-spylon-kernel BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-spylon-kernel # spylon-kernel [![Build Status](https://travis-ci.org/maxpoint/spylon-kernel.svg?branch=master)](https://travis-ci.org/maxpoint/spylon-kernel) [![codecov](https://codecov.io/gh/maxpoint/spylon-kernel/branch/master/graph/badge.svg)](https://codecov.io/gh/maxpoint/spylon-kernel) A Scala [Jupyter kernel](http://jupyter.readthedocs.io/en/latest/projects/kernels.html) that uses [metakernel](https://github.com/Calysto/metakernel) in combination with [py4j](https://www.py4j.org/). ## Prerequisites * Apache Spark 2.1.1 compiled for Scala 2.11 * Jupyter Notebook * Python 3.5+ ## Install You can install the spylon-kernel package using `pip` or `conda`. ```bash pip install spylon-kernel # or conda install -c conda-forge spylon-kernel ``` ## Using it as a Scala Kernel You can use spylon-kernel as Scala kernel for Jupyter Notebook. Do this when you want to work with Spark in Scala with a bit of Python code mixed in. Create a kernel spec for Jupyter notebook by running the following command: ```bash python -m spylon_kernel install ``` Launch `jupyter notebook` and you should see a `spylon-kernel` as an option in the *New* dropdown menu. See [the basic example notebook](./examples/basic_example.ipynb) for information about how to intiialize a Spark session and use it both in Scala and Python. ## Using it as an IPython Magic You can also use spylon-kernel as a magic in an IPython notebook. Do this when you want to mix a little bit of Scala into your primarily Python notebook. ```python from spylon_kernel import register_ipython_magics register_ipython_magics() ``` ```scala %%scala val x = 8 x ``` ## Using it as a Library Finally, you can use spylon-kernel as a Python library. Do this when you want to evaluate a string of Scala code in a Python script or shell. ```python from spylon_kernel import get_scala_interpreter interp = get_scala_interpreter() # Evaluate the result of a scala code block. interp.interpret(""" val x = 8 x """) interp.last_result() ``` # Release Process Push a tag and submit a source dist to PyPI. ``` git commit -m 'REL: 0.2.1' --allow-empty git tag -a 0.2.1 # and enter the same message as the commit git push origin master # or send a PR # if everything builds / tests cleanly, release to pypi make release ``` Then update https://github.com/conda-forge/spylon-kernel-feedstock. %package help Summary: Development documents and examples for spylon-kernel Provides: python3-spylon-kernel-doc %description help # spylon-kernel [![Build Status](https://travis-ci.org/maxpoint/spylon-kernel.svg?branch=master)](https://travis-ci.org/maxpoint/spylon-kernel) [![codecov](https://codecov.io/gh/maxpoint/spylon-kernel/branch/master/graph/badge.svg)](https://codecov.io/gh/maxpoint/spylon-kernel) A Scala [Jupyter kernel](http://jupyter.readthedocs.io/en/latest/projects/kernels.html) that uses [metakernel](https://github.com/Calysto/metakernel) in combination with [py4j](https://www.py4j.org/). ## Prerequisites * Apache Spark 2.1.1 compiled for Scala 2.11 * Jupyter Notebook * Python 3.5+ ## Install You can install the spylon-kernel package using `pip` or `conda`. ```bash pip install spylon-kernel # or conda install -c conda-forge spylon-kernel ``` ## Using it as a Scala Kernel You can use spylon-kernel as Scala kernel for Jupyter Notebook. Do this when you want to work with Spark in Scala with a bit of Python code mixed in. Create a kernel spec for Jupyter notebook by running the following command: ```bash python -m spylon_kernel install ``` Launch `jupyter notebook` and you should see a `spylon-kernel` as an option in the *New* dropdown menu. See [the basic example notebook](./examples/basic_example.ipynb) for information about how to intiialize a Spark session and use it both in Scala and Python. ## Using it as an IPython Magic You can also use spylon-kernel as a magic in an IPython notebook. Do this when you want to mix a little bit of Scala into your primarily Python notebook. ```python from spylon_kernel import register_ipython_magics register_ipython_magics() ``` ```scala %%scala val x = 8 x ``` ## Using it as a Library Finally, you can use spylon-kernel as a Python library. Do this when you want to evaluate a string of Scala code in a Python script or shell. ```python from spylon_kernel import get_scala_interpreter interp = get_scala_interpreter() # Evaluate the result of a scala code block. interp.interpret(""" val x = 8 x """) interp.last_result() ``` # Release Process Push a tag and submit a source dist to PyPI. ``` git commit -m 'REL: 0.2.1' --allow-empty git tag -a 0.2.1 # and enter the same message as the commit git push origin master # or send a PR # if everything builds / tests cleanly, release to pypi make release ``` Then update https://github.com/conda-forge/spylon-kernel-feedstock. %prep %autosetup -n spylon-kernel-0.4.1 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-spylon-kernel -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 0.4.1-1 - Package Spec generated