summaryrefslogtreecommitdiff
path: root/python-tri-struct.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-tri-struct.spec')
-rw-r--r--python-tri-struct.spec90
1 files changed, 90 insertions, 0 deletions
diff --git a/python-tri-struct.spec b/python-tri-struct.spec
new file mode 100644
index 0000000..10f567f
--- /dev/null
+++ b/python-tri-struct.spec
@@ -0,0 +1,90 @@
+%global _empty_manifest_terminate_build 0
+Name: python-tri.struct
+Version: 4.1.0
+Release: 1
+Summary: tri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time
+License: BSD
+URL: https://github.com/TriOptima/tri.struct
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/6c/ac/7b87ee04fb3bf9bec912376a8dc1944e488a6eafc4062df4c0786ee7d70e/tri.struct-4.1.0.tar.gz
+BuildArch: noarch
+
+
+%description
+tri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time. There are two versions:
+- Struct: mutable struct
+- FrozenStruct: immutable struct
+Some niceties include:
+- Predictable repr() so it's easy to write tests
+- `merged` function call to merge different types of dicts into a new: `merged(Struct(a=1), FrozenStruct(b=1), c=1) == Struct(a=1, b=1, c=1)`)
+- Accelerated implementation in c for improved speed. (With python-only fallback reference implementation)
+
+%package -n python3-tri.struct
+Summary: tri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time
+Provides: python-tri.struct
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-tri.struct
+tri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time. There are two versions:
+- Struct: mutable struct
+- FrozenStruct: immutable struct
+Some niceties include:
+- Predictable repr() so it's easy to write tests
+- `merged` function call to merge different types of dicts into a new: `merged(Struct(a=1), FrozenStruct(b=1), c=1) == Struct(a=1, b=1, c=1)`)
+- Accelerated implementation in c for improved speed. (With python-only fallback reference implementation)
+
+%package help
+Summary: Development documents and examples for tri.struct
+Provides: python3-tri.struct-doc
+%description help
+tri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time. There are two versions:
+- Struct: mutable struct
+- FrozenStruct: immutable struct
+Some niceties include:
+- Predictable repr() so it's easy to write tests
+- `merged` function call to merge different types of dicts into a new: `merged(Struct(a=1), FrozenStruct(b=1), c=1) == Struct(a=1, b=1, c=1)`)
+- Accelerated implementation in c for improved speed. (With python-only fallback reference implementation)
+
+%prep
+%autosetup -n tri.struct-4.1.0
+
+%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-tri.struct -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 4.1.0-1
+- Package Spec generated