%global _empty_manifest_terminate_build 0
Name: python-gif
Version: 23.3.0
Release: 1
Summary: The matplotlib Animation Extension
License: MIT
URL: https://github.com/maxhumber/gif
Source0: https://mirrors.aliyun.com/pypi/web/packages/c3/36/eb714cc959b03bfc3ac66f0da62d6fea058196b378286d6c196e30d2062a/gif-23.3.0.tar.gz
BuildArch: noarch
Requires: python3-matplotlib
Requires: python3-Pillow
Requires: python3-mypy
Requires: python3-isort
Requires: python3-pyright
Requires: python3-black
Requires: python3-matplotlib
Requires: python3-pandas
Requires: python3-pytest
Requires: python3-matplotlib
Requires: python3-pandas
Requires: python3-pytest
%description
### About
The [matplotlib](https://matplotlib.org/) Animation Extension
### Install & Import
```sh
pip install gif
```
```python
import gif
```
### Quickstart
```python
import gif
from random import randint
from matplotlib import pyplot as plt
x = [randint(0, 100) for _ in range(100)]
y = [randint(0, 100) for _ in range(100)]
# (Optional) Set the dots per inch resolution to 300
gif.options.matplotlib["dpi"] = 300
# Decorate a plot function with @gif.frame
@gif.frame
def plot(i):
xi = x[i*10:(i+1)*10]
yi = y[i*10:(i+1)*10]
plt.scatter(xi, yi)
plt.xlim((0, 100))
plt.ylim((0, 100))
# Construct "frames"
frames = [plot(i) for i in range(10)]
# Save "frames" to gif with a specified duration (milliseconds) between each frame
gif.save(frames, 'example.gif', duration=50)
```
### Examples
| [](examples/arrival.py) | [](examples/hop.py) | [](examples/phone.py) |
| ------------------------------------------------------------ | ------------------------------------------------------ | --------------------------------------------------- |
| [](examples/seinfeld.py) | [](examples/spiral.py) | [](heart.py) |
### Warning
Altair and Plotly are no longer supported in `22.5.0`+
Please use `pip install gif==3.0.0` if you still need to interface with these libraries
%package -n python3-gif
Summary: The matplotlib Animation Extension
Provides: python-gif
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-gif
### About
The [matplotlib](https://matplotlib.org/) Animation Extension
### Install & Import
```sh
pip install gif
```
```python
import gif
```
### Quickstart
```python
import gif
from random import randint
from matplotlib import pyplot as plt
x = [randint(0, 100) for _ in range(100)]
y = [randint(0, 100) for _ in range(100)]
# (Optional) Set the dots per inch resolution to 300
gif.options.matplotlib["dpi"] = 300
# Decorate a plot function with @gif.frame
@gif.frame
def plot(i):
xi = x[i*10:(i+1)*10]
yi = y[i*10:(i+1)*10]
plt.scatter(xi, yi)
plt.xlim((0, 100))
plt.ylim((0, 100))
# Construct "frames"
frames = [plot(i) for i in range(10)]
# Save "frames" to gif with a specified duration (milliseconds) between each frame
gif.save(frames, 'example.gif', duration=50)
```
### Examples
| [](examples/arrival.py) | [](examples/hop.py) | [](examples/phone.py) |
| ------------------------------------------------------------ | ------------------------------------------------------ | --------------------------------------------------- |
| [](examples/seinfeld.py) | [](examples/spiral.py) | [](heart.py) |
### Warning
Altair and Plotly are no longer supported in `22.5.0`+
Please use `pip install gif==3.0.0` if you still need to interface with these libraries
%package help
Summary: Development documents and examples for gif
Provides: python3-gif-doc
%description help
### About
The [matplotlib](https://matplotlib.org/) Animation Extension
### Install & Import
```sh
pip install gif
```
```python
import gif
```
### Quickstart
```python
import gif
from random import randint
from matplotlib import pyplot as plt
x = [randint(0, 100) for _ in range(100)]
y = [randint(0, 100) for _ in range(100)]
# (Optional) Set the dots per inch resolution to 300
gif.options.matplotlib["dpi"] = 300
# Decorate a plot function with @gif.frame
@gif.frame
def plot(i):
xi = x[i*10:(i+1)*10]
yi = y[i*10:(i+1)*10]
plt.scatter(xi, yi)
plt.xlim((0, 100))
plt.ylim((0, 100))
# Construct "frames"
frames = [plot(i) for i in range(10)]
# Save "frames" to gif with a specified duration (milliseconds) between each frame
gif.save(frames, 'example.gif', duration=50)
```
### Examples
| [](examples/arrival.py) | [](examples/hop.py) | [](examples/phone.py) |
| ------------------------------------------------------------ | ------------------------------------------------------ | --------------------------------------------------- |
| [](examples/seinfeld.py) | [](examples/spiral.py) | [](heart.py) |
### Warning
Altair and Plotly are no longer supported in `22.5.0`+
Please use `pip install gif==3.0.0` if you still need to interface with these libraries
%prep
%autosetup -n gif-23.3.0
%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-gif -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Jun 20 2023 Python_Bot - 23.3.0-1
- Package Spec generated