summaryrefslogtreecommitdiff
path: root/python-optionaldict.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-optionaldict.spec')
-rw-r--r--python-optionaldict.spec216
1 files changed, 216 insertions, 0 deletions
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
+
+[![Build Status](https://travis-ci.org/messense/optionaldict.svg)](https://travis-ci.org/messense/optionaldict)
+[![Build status](https://ci.appveyor.com/api/projects/status/qkj8q2cuitihj2dx/branch/master?svg=true)](https://ci.appveyor.com/project/messense/optionaldict/branch/master)
+[![Coverage Status](https://coveralls.io/repos/messense/optionaldict/badge.svg)](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
+
+[![Build Status](https://travis-ci.org/messense/optionaldict.svg)](https://travis-ci.org/messense/optionaldict)
+[![Build status](https://ci.appveyor.com/api/projects/status/qkj8q2cuitihj2dx/branch/master?svg=true)](https://ci.appveyor.com/project/messense/optionaldict/branch/master)
+[![Coverage Status](https://coveralls.io/repos/messense/optionaldict/badge.svg)](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
+
+[![Build Status](https://travis-ci.org/messense/optionaldict.svg)](https://travis-ci.org/messense/optionaldict)
+[![Build status](https://ci.appveyor.com/api/projects/status/qkj8q2cuitihj2dx/branch/master?svg=true)](https://ci.appveyor.com/project/messense/optionaldict/branch/master)
+[![Coverage Status](https://coveralls.io/repos/messense/optionaldict/badge.svg)](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