%global _empty_manifest_terminate_build 0 Name: python-IPythonDisplayTurtle Version: 0.0.33 Release: 1 Summary: Turtles using IPython Display License: MIT License URL: https://github.com/atahan-git/IPythonDisplayTurtle Source0: https://mirrors.nju.edu.cn/pypi/web/packages/58/ef/a4f2a1bdace1eaa2995934ea014335e528420891600223734c5e39255c0d/IPythonDisplayTurtle-0.0.33.tar.gz BuildArch: noarch Requires: python3-IPython %description # WIP Please note that this is still being actively developed, hence may not work properly for you! # IPythonDisplayTurtle An implementation of the classic turtle module mainly implemented using IPython.display, IPython.HTML, and paperscript. Can be used with Jupyter Notebooks, and in places where ipywidgets are not supported. Only requires one way communication to work, so great for remote server cases. Also has level drawing capabilities. You can check the source code yourself for more info! How to install from a terminal/command prompt: pip install IPythonDisplayTurtle To install from a jupyter notebook cell: !pip install IPythonDisplayTurtle How to use: ```python from IPythonDisplayTurtle import Snake colours=["red","orange","yellow","green","blue","purple"] divisions = 12 angle = 360/divisions t = Snake(_pendown = 0) for i in range(divisions): if(i%2 == 0): t.pendown() t.pencolor(colours[int(i/2)%len(colours)]) else: t.penup() t.goforward(300/divisions) t.turnright(angle) t.penup() t.goforward(120) t.turnright(360) t.display() ``` ![Example Turtle](Example.png) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/atahan-git/IPythonDisplayTurtle/master) %package -n python3-IPythonDisplayTurtle Summary: Turtles using IPython Display Provides: python-IPythonDisplayTurtle BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-IPythonDisplayTurtle # WIP Please note that this is still being actively developed, hence may not work properly for you! # IPythonDisplayTurtle An implementation of the classic turtle module mainly implemented using IPython.display, IPython.HTML, and paperscript. Can be used with Jupyter Notebooks, and in places where ipywidgets are not supported. Only requires one way communication to work, so great for remote server cases. Also has level drawing capabilities. You can check the source code yourself for more info! How to install from a terminal/command prompt: pip install IPythonDisplayTurtle To install from a jupyter notebook cell: !pip install IPythonDisplayTurtle How to use: ```python from IPythonDisplayTurtle import Snake colours=["red","orange","yellow","green","blue","purple"] divisions = 12 angle = 360/divisions t = Snake(_pendown = 0) for i in range(divisions): if(i%2 == 0): t.pendown() t.pencolor(colours[int(i/2)%len(colours)]) else: t.penup() t.goforward(300/divisions) t.turnright(angle) t.penup() t.goforward(120) t.turnright(360) t.display() ``` ![Example Turtle](Example.png) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/atahan-git/IPythonDisplayTurtle/master) %package help Summary: Development documents and examples for IPythonDisplayTurtle Provides: python3-IPythonDisplayTurtle-doc %description help # WIP Please note that this is still being actively developed, hence may not work properly for you! # IPythonDisplayTurtle An implementation of the classic turtle module mainly implemented using IPython.display, IPython.HTML, and paperscript. Can be used with Jupyter Notebooks, and in places where ipywidgets are not supported. Only requires one way communication to work, so great for remote server cases. Also has level drawing capabilities. You can check the source code yourself for more info! How to install from a terminal/command prompt: pip install IPythonDisplayTurtle To install from a jupyter notebook cell: !pip install IPythonDisplayTurtle How to use: ```python from IPythonDisplayTurtle import Snake colours=["red","orange","yellow","green","blue","purple"] divisions = 12 angle = 360/divisions t = Snake(_pendown = 0) for i in range(divisions): if(i%2 == 0): t.pendown() t.pencolor(colours[int(i/2)%len(colours)]) else: t.penup() t.goforward(300/divisions) t.turnright(angle) t.penup() t.goforward(120) t.turnright(360) t.display() ``` ![Example Turtle](Example.png) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/atahan-git/IPythonDisplayTurtle/master) %prep %autosetup -n IPythonDisplayTurtle-0.0.33 %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-IPythonDisplayTurtle -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Wed May 10 2023 Python_Bot - 0.0.33-1 - Package Spec generated