diff options
author | CoprDistGit <infra@openeuler.org> | 2023-03-09 16:37:04 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-03-09 16:37:04 +0000 |
commit | c3f4e5ddc552c6d7d6c7d035a48d1dab4b8570dc (patch) | |
tree | fcfdf83cf21aadb4b231149a7aca9ecb824ddc75 /python-rxjson.spec | |
parent | 39e933c36cfc72af4f02a4ee00364c8ac5ec943f (diff) |
automatic import of python-rxjson
Diffstat (limited to 'python-rxjson.spec')
-rw-r--r-- | python-rxjson.spec | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/python-rxjson.spec b/python-rxjson.spec new file mode 100644 index 0000000..208eb79 --- /dev/null +++ b/python-rxjson.spec @@ -0,0 +1,111 @@ +%global _empty_manifest_terminate_build 0 +Name: python-rxjson +Version: 0.3 +Release: 1 +Summary: JSON RX Schema validation tool +License: GPLv2.0 +URL: https://github.com/spiral-project/rxjson +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0a/66/a34442065708bf6416af43d6285129b5b806eecee2f04926f63998eda170/rxjson-0.3.zip +BuildArch: noarch + + +%description +When adding an API to your web service, you have to choose how to encode the +data you send across the line. XML is one common choice for this, but it can +grow arcane and cumbersome pretty quickly. Lots of webservice authors want to +avoid thinking about XML, and instead choose formats that provide a few simple +data types that correspond to common data structures in modern programming +languages. In other words, JSON and YAML. +Unfortunately, while these formats make it easy to pass around complex data +structures, they lack a system for validation. XML has XML Schemas and RELAX +NG, but these are complicated and sometimes confusing standards. They're not +very portable to the kind of data structure provided by JSON, and if you wanted +to avoid XML as a data encoding, writing more XML to validate the first XML is +probably even less appealing. +Rx is meant to provide a system for data validation that matches up with +JSON-style data structures and is as easy to work with as JSON itself. + +%package -n python3-rxjson +Summary: JSON RX Schema validation tool +Provides: python-rxjson +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-rxjson +When adding an API to your web service, you have to choose how to encode the +data you send across the line. XML is one common choice for this, but it can +grow arcane and cumbersome pretty quickly. Lots of webservice authors want to +avoid thinking about XML, and instead choose formats that provide a few simple +data types that correspond to common data structures in modern programming +languages. In other words, JSON and YAML. +Unfortunately, while these formats make it easy to pass around complex data +structures, they lack a system for validation. XML has XML Schemas and RELAX +NG, but these are complicated and sometimes confusing standards. They're not +very portable to the kind of data structure provided by JSON, and if you wanted +to avoid XML as a data encoding, writing more XML to validate the first XML is +probably even less appealing. +Rx is meant to provide a system for data validation that matches up with +JSON-style data structures and is as easy to work with as JSON itself. + +%package help +Summary: Development documents and examples for rxjson +Provides: python3-rxjson-doc +%description help +When adding an API to your web service, you have to choose how to encode the +data you send across the line. XML is one common choice for this, but it can +grow arcane and cumbersome pretty quickly. Lots of webservice authors want to +avoid thinking about XML, and instead choose formats that provide a few simple +data types that correspond to common data structures in modern programming +languages. In other words, JSON and YAML. +Unfortunately, while these formats make it easy to pass around complex data +structures, they lack a system for validation. XML has XML Schemas and RELAX +NG, but these are complicated and sometimes confusing standards. They're not +very portable to the kind of data structure provided by JSON, and if you wanted +to avoid XML as a data encoding, writing more XML to validate the first XML is +probably even less appealing. +Rx is meant to provide a system for data validation that matches up with +JSON-style data structures and is as easy to work with as JSON itself. + +%prep +%autosetup -n rxjson-0.3 + +%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-rxjson -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3-1 +- Package Spec generated |