diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-05 06:07:55 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 06:07:55 +0000 |
| commit | ec94e290693fe6c4ba9563b07d1d20e30150c5f1 (patch) | |
| tree | 38ab4d82a4516d67ed75931aae531af21a2058a7 | |
| parent | 747e8461ce75a8c80d2c52c77af9fae19ea6851c (diff) | |
automatic import of python-optionaldictopeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-optionaldict.spec | 216 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 218 insertions, 0 deletions
@@ -0,0 +1 @@ +/optionaldict-0.1.2.tar.gz diff --git a/python-optionaldict.spec b/python-optionaldict.spec new file mode 100644 index 0000000..b098ff6 --- /dev/null +++ b/python-optionaldict.spec @@ -0,0 +1,216 @@ +%global _empty_manifest_terminate_build 0 +Name: python-optionaldict +Version: 0.1.2 +Release: 1 +Summary: A dict-like object that ignore NoneType values for Python +License: MIT License +URL: https://github.com/messense/optionaldict +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ad/8b/cb72b1d40d21963ad1923ce529ae1f9ba49a13c18c7e6c47081c3dc1211f/optionaldict-0.1.2.tar.gz +BuildArch: noarch + + +%description +# optionaldict + +[](https://travis-ci.org/messense/optionaldict) +[](https://ci.appveyor.com/project/messense/optionaldict/branch/master) +[](https://coveralls.io/r/messense/optionaldict) + +``optionaldict`` is a dict-like object that ignore NoneType values for Python which is pickable and JSON serializable. + +# Installation + +You can install ``optionaldict`` simply using ``pip``: +```bash +pip install optionaldict +``` + +# Usage +``optionaldict``'s usage is very simple, you will import it by: + +```python +from optionaldict import optionaldict +``` + +or if you prefer the CamelCasing style naming, you can import it by: + +```python +from optionaldict import OptionalDict +``` + +> Tips: In fact, ``optionaldict`` is just an alias for ``OptionalDict``. + +Then you can use it just like the built-in ``dict``: + +```python +d1 = optionaldict(a=1, b=None) +d1['c'] = 2 +d1.setdefault('d', None) + +d2 = optionaldict() +d2['a'] = 1 +d2['b'] = None + +d3 = optionaldict({ + 'a': 1, + 'b': None +}) +``` + + + + +%package -n python3-optionaldict +Summary: A dict-like object that ignore NoneType values for Python +Provides: python-optionaldict +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-optionaldict +# optionaldict + +[](https://travis-ci.org/messense/optionaldict) +[](https://ci.appveyor.com/project/messense/optionaldict/branch/master) +[](https://coveralls.io/r/messense/optionaldict) + +``optionaldict`` is a dict-like object that ignore NoneType values for Python which is pickable and JSON serializable. + +# Installation + +You can install ``optionaldict`` simply using ``pip``: +```bash +pip install optionaldict +``` + +# Usage +``optionaldict``'s usage is very simple, you will import it by: + +```python +from optionaldict import optionaldict +``` + +or if you prefer the CamelCasing style naming, you can import it by: + +```python +from optionaldict import OptionalDict +``` + +> Tips: In fact, ``optionaldict`` is just an alias for ``OptionalDict``. + +Then you can use it just like the built-in ``dict``: + +```python +d1 = optionaldict(a=1, b=None) +d1['c'] = 2 +d1.setdefault('d', None) + +d2 = optionaldict() +d2['a'] = 1 +d2['b'] = None + +d3 = optionaldict({ + 'a': 1, + 'b': None +}) +``` + + + + +%package help +Summary: Development documents and examples for optionaldict +Provides: python3-optionaldict-doc +%description help +# optionaldict + +[](https://travis-ci.org/messense/optionaldict) +[](https://ci.appveyor.com/project/messense/optionaldict/branch/master) +[](https://coveralls.io/r/messense/optionaldict) + +``optionaldict`` is a dict-like object that ignore NoneType values for Python which is pickable and JSON serializable. + +# Installation + +You can install ``optionaldict`` simply using ``pip``: +```bash +pip install optionaldict +``` + +# Usage +``optionaldict``'s usage is very simple, you will import it by: + +```python +from optionaldict import optionaldict +``` + +or if you prefer the CamelCasing style naming, you can import it by: + +```python +from optionaldict import OptionalDict +``` + +> Tips: In fact, ``optionaldict`` is just an alias for ``OptionalDict``. + +Then you can use it just like the built-in ``dict``: + +```python +d1 = optionaldict(a=1, b=None) +d1['c'] = 2 +d1.setdefault('d', None) + +d2 = optionaldict() +d2['a'] = 1 +d2['b'] = None + +d3 = optionaldict({ + 'a': 1, + 'b': None +}) +``` + + + + +%prep +%autosetup -n optionaldict-0.1.2 + +%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-optionaldict -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.2-1 +- Package Spec generated @@ -0,0 +1 @@ +421af5fc122af0be9399d825d3793cae optionaldict-0.1.2.tar.gz |
