diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-spectate.spec | 306 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 308 insertions, 0 deletions
@@ -0,0 +1 @@ +/spectate-1.0.1.tar.gz diff --git a/python-spectate.spec b/python-spectate.spec new file mode 100644 index 0000000..59f2b1c --- /dev/null +++ b/python-spectate.spec @@ -0,0 +1,306 @@ +%global _empty_manifest_terminate_build 0 +Name: python-spectate +Version: 1.0.1 +Release: 1 +Summary: Track changes to mutable data types. +License: MIT +URL: https://github.com/rmorshea/spectate +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c8/8d/78dbadaeea943cc0fb9d3cd6b0a4f4668a46f84de1c5507fe3c9f02b8973/spectate-1.0.1.tar.gz +BuildArch: noarch + + +%description +[](https://travis-ci.org/rmorshea/spectate/branches) +[](http://python-spectate.readthedocs.io/en/latest/?badge=latest) +[](https://pypi.python.org/pypi/spectate) + +# Spectate + +A library for Python 3.6 and above that can track changes to mutable data types. + +With `spectate`, complicated protocols for managing updates don't need to be the outward responsibility of a user and can instead be done automagically in the background. For instance, syncing the state between a server and client can controlled by `spectate`, so users don't have to. + + +# Documentation + +https://python-spectate.readthedocs.io/en/latest/ + + +# Install + ++ stable + +```bash +pip install spectate +``` + ++ pre-release + +```bash +pip install spectate --pre +``` + ++ master + +```bash +pip install git+https://github.com/rmorshea/spectate.git#egg=spectate +``` + ++ developer + +```bash +git clone https://github.com/rmorshea/spectate && cd spectate/ && pip install -e . -r requirements.txt +``` + + +# At A Glance + +If you're using Python 3.6 and above, create a model object + +```python +from spectate import mvc + +l = mvc.List() +``` + +Register a view function to it that observes changes + +```python +@mvc.view(l) +def printer(l, events): + for e in events: + print(e) +``` + +Then modify your object and watch the view function react + +```python +l.append(0) +l[0] = 1 +l.extend([2, 3]) +``` + +``` +{'index': 0, 'old': Undefined, 'new': 0} +{'index': 0, 'old': 0, 'new': 1} +{'index': 1, 'old': Undefined, 'new': 2} +{'index': 2, 'old': Undefined, 'new': 3} +``` + + + + +%package -n python3-spectate +Summary: Track changes to mutable data types. +Provides: python-spectate +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-spectate +[](https://travis-ci.org/rmorshea/spectate/branches) +[](http://python-spectate.readthedocs.io/en/latest/?badge=latest) +[](https://pypi.python.org/pypi/spectate) + +# Spectate + +A library for Python 3.6 and above that can track changes to mutable data types. + +With `spectate`, complicated protocols for managing updates don't need to be the outward responsibility of a user and can instead be done automagically in the background. For instance, syncing the state between a server and client can controlled by `spectate`, so users don't have to. + + +# Documentation + +https://python-spectate.readthedocs.io/en/latest/ + + +# Install + ++ stable + +```bash +pip install spectate +``` + ++ pre-release + +```bash +pip install spectate --pre +``` + ++ master + +```bash +pip install git+https://github.com/rmorshea/spectate.git#egg=spectate +``` + ++ developer + +```bash +git clone https://github.com/rmorshea/spectate && cd spectate/ && pip install -e . -r requirements.txt +``` + + +# At A Glance + +If you're using Python 3.6 and above, create a model object + +```python +from spectate import mvc + +l = mvc.List() +``` + +Register a view function to it that observes changes + +```python +@mvc.view(l) +def printer(l, events): + for e in events: + print(e) +``` + +Then modify your object and watch the view function react + +```python +l.append(0) +l[0] = 1 +l.extend([2, 3]) +``` + +``` +{'index': 0, 'old': Undefined, 'new': 0} +{'index': 0, 'old': 0, 'new': 1} +{'index': 1, 'old': Undefined, 'new': 2} +{'index': 2, 'old': Undefined, 'new': 3} +``` + + + + +%package help +Summary: Development documents and examples for spectate +Provides: python3-spectate-doc +%description help +[](https://travis-ci.org/rmorshea/spectate/branches) +[](http://python-spectate.readthedocs.io/en/latest/?badge=latest) +[](https://pypi.python.org/pypi/spectate) + +# Spectate + +A library for Python 3.6 and above that can track changes to mutable data types. + +With `spectate`, complicated protocols for managing updates don't need to be the outward responsibility of a user and can instead be done automagically in the background. For instance, syncing the state between a server and client can controlled by `spectate`, so users don't have to. + + +# Documentation + +https://python-spectate.readthedocs.io/en/latest/ + + +# Install + ++ stable + +```bash +pip install spectate +``` + ++ pre-release + +```bash +pip install spectate --pre +``` + ++ master + +```bash +pip install git+https://github.com/rmorshea/spectate.git#egg=spectate +``` + ++ developer + +```bash +git clone https://github.com/rmorshea/spectate && cd spectate/ && pip install -e . -r requirements.txt +``` + + +# At A Glance + +If you're using Python 3.6 and above, create a model object + +```python +from spectate import mvc + +l = mvc.List() +``` + +Register a view function to it that observes changes + +```python +@mvc.view(l) +def printer(l, events): + for e in events: + print(e) +``` + +Then modify your object and watch the view function react + +```python +l.append(0) +l[0] = 1 +l.extend([2, 3]) +``` + +``` +{'index': 0, 'old': Undefined, 'new': 0} +{'index': 0, 'old': 0, 'new': 1} +{'index': 1, 'old': Undefined, 'new': 2} +{'index': 2, 'old': Undefined, 'new': 3} +``` + + + + +%prep +%autosetup -n spectate-1.0.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-spectate -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.1-1 +- Package Spec generated @@ -0,0 +1 @@ +0da35306b62c71e52a9662bccc16f5a3 spectate-1.0.1.tar.gz |
