diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-15 08:36:23 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-15 08:36:23 +0000 |
| commit | 0a4ca1460c585e0aecc602ec5e9c49b3c48d8db4 (patch) | |
| tree | 2531107f6dbcdce88c983afb9ffe0282e64bbdfc /python-prefs.spec | |
| parent | 39f6617e4483639ef6574c7446b779cfcecf6d21 (diff) | |
automatic import of python-prefs
Diffstat (limited to 'python-prefs.spec')
| -rw-r--r-- | python-prefs.spec | 314 |
1 files changed, 314 insertions, 0 deletions
diff --git a/python-prefs.spec b/python-prefs.spec new file mode 100644 index 0000000..126379c --- /dev/null +++ b/python-prefs.spec @@ -0,0 +1,314 @@ +%global _empty_manifest_terminate_build 0 +Name: python-prefs +Version: 1.0.1 +Release: 1 +Summary: Store and manage preferences easily. +License: MIT +URL: https://patitotective.github.io/PREFS/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/62/2c/9d1fefea8afec951a61fb18dc8e0bb7a04ccf99d001b8ea1cbb21b7f0aec/prefs-1.0.1.tar.gz +BuildArch: noarch + +Requires: python3-lark +Requires: python3-click + +%description +# PREFS +> **Store and manage preferences easily.** + +[](https://patitotective.github.io/PREFS) + +[](https://pypi.org/project/prefs/) +[](https://pypi.org/project/prefs/) +[](https://pepy.tech/project/prefs) +[](https://github.com/Patitotective/PREFS/stargazers) + +[](https://github.com/Patitotective/PREFS/commits/main) + +[](https://github.com/Patitotective/PREFS/) + +[](https://www.python.org/) +[](https://discord.gg/as85Q4GnR6) + +**PREFS** is Python library that stores preferences in a text file with a dictionary-like structure. + +## Installation +On _Windows_: +`pip install PREFS` + +On _MacOS_ and _Linux_: +`pip3 install PREFS` + +### Getting started +To initialize your preferences you will need to instance the `Prefs` class with the first argument as the default preferences (the ones used the first time the program runs or whenever the file gets deleted). + +```py +import prefs + +default_prefs = { + "lang": "en", + "theme": { + "background": "#ffffff", + "font": "UbuntuMono", + }, +} + +my_prefs = prefs.Prefs(default_prefs) +``` + +The above code will create a file called `prefs.prefs` that looks like: +```py +#PREFS +lang='en' +theme=> + background='#ffffff' + font='UbuntuMono' +``` +Then you can change values as if it were a dictionary. +```py +my_prefs["lang"] = "es" +``` +And now `prefs.prefs` will look like: +```py +#PREFS +lang='es' +theme=> + background='#ffffff' + font='UbuntuMono' +``` + +You can write your own _PREFS_ files manually as well, to manage your application's color scheme or the translations. + +*** + +## About +- Docs: https://patitotective.github.io/PREFS/docs/start. +- GitHub: https://github.com/Patitotective/PREFS. +- Pypi: https://pypi.org/project/PREFS/. +- Discord: https://discord.gg/as85Q4GnR6. + +Contact me: +- Discord: **Patitotective#0127**. +- Tiwtter: [@patitotective](https://twitter.com/patitotective). +- Email: **cristobalriaga@gmail.com**. + +***v1.0.0*** + + +%package -n python3-prefs +Summary: Store and manage preferences easily. +Provides: python-prefs +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-prefs +# PREFS +> **Store and manage preferences easily.** + +[](https://patitotective.github.io/PREFS) + +[](https://pypi.org/project/prefs/) +[](https://pypi.org/project/prefs/) +[](https://pepy.tech/project/prefs) +[](https://github.com/Patitotective/PREFS/stargazers) + +[](https://github.com/Patitotective/PREFS/commits/main) + +[](https://github.com/Patitotective/PREFS/) + +[](https://www.python.org/) +[](https://discord.gg/as85Q4GnR6) + +**PREFS** is Python library that stores preferences in a text file with a dictionary-like structure. + +## Installation +On _Windows_: +`pip install PREFS` + +On _MacOS_ and _Linux_: +`pip3 install PREFS` + +### Getting started +To initialize your preferences you will need to instance the `Prefs` class with the first argument as the default preferences (the ones used the first time the program runs or whenever the file gets deleted). + +```py +import prefs + +default_prefs = { + "lang": "en", + "theme": { + "background": "#ffffff", + "font": "UbuntuMono", + }, +} + +my_prefs = prefs.Prefs(default_prefs) +``` + +The above code will create a file called `prefs.prefs` that looks like: +```py +#PREFS +lang='en' +theme=> + background='#ffffff' + font='UbuntuMono' +``` +Then you can change values as if it were a dictionary. +```py +my_prefs["lang"] = "es" +``` +And now `prefs.prefs` will look like: +```py +#PREFS +lang='es' +theme=> + background='#ffffff' + font='UbuntuMono' +``` + +You can write your own _PREFS_ files manually as well, to manage your application's color scheme or the translations. + +*** + +## About +- Docs: https://patitotective.github.io/PREFS/docs/start. +- GitHub: https://github.com/Patitotective/PREFS. +- Pypi: https://pypi.org/project/PREFS/. +- Discord: https://discord.gg/as85Q4GnR6. + +Contact me: +- Discord: **Patitotective#0127**. +- Tiwtter: [@patitotective](https://twitter.com/patitotective). +- Email: **cristobalriaga@gmail.com**. + +***v1.0.0*** + + +%package help +Summary: Development documents and examples for prefs +Provides: python3-prefs-doc +%description help +# PREFS +> **Store and manage preferences easily.** + +[](https://patitotective.github.io/PREFS) + +[](https://pypi.org/project/prefs/) +[](https://pypi.org/project/prefs/) +[](https://pepy.tech/project/prefs) +[](https://github.com/Patitotective/PREFS/stargazers) + +[](https://github.com/Patitotective/PREFS/commits/main) + +[](https://github.com/Patitotective/PREFS/) + +[](https://www.python.org/) +[](https://discord.gg/as85Q4GnR6) + +**PREFS** is Python library that stores preferences in a text file with a dictionary-like structure. + +## Installation +On _Windows_: +`pip install PREFS` + +On _MacOS_ and _Linux_: +`pip3 install PREFS` + +### Getting started +To initialize your preferences you will need to instance the `Prefs` class with the first argument as the default preferences (the ones used the first time the program runs or whenever the file gets deleted). + +```py +import prefs + +default_prefs = { + "lang": "en", + "theme": { + "background": "#ffffff", + "font": "UbuntuMono", + }, +} + +my_prefs = prefs.Prefs(default_prefs) +``` + +The above code will create a file called `prefs.prefs` that looks like: +```py +#PREFS +lang='en' +theme=> + background='#ffffff' + font='UbuntuMono' +``` +Then you can change values as if it were a dictionary. +```py +my_prefs["lang"] = "es" +``` +And now `prefs.prefs` will look like: +```py +#PREFS +lang='es' +theme=> + background='#ffffff' + font='UbuntuMono' +``` + +You can write your own _PREFS_ files manually as well, to manage your application's color scheme or the translations. + +*** + +## About +- Docs: https://patitotective.github.io/PREFS/docs/start. +- GitHub: https://github.com/Patitotective/PREFS. +- Pypi: https://pypi.org/project/PREFS/. +- Discord: https://discord.gg/as85Q4GnR6. + +Contact me: +- Discord: **Patitotective#0127**. +- Tiwtter: [@patitotective](https://twitter.com/patitotective). +- Email: **cristobalriaga@gmail.com**. + +***v1.0.0*** + + +%prep +%autosetup -n prefs-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-prefs -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.1-1 +- Package Spec generated |
