diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-11 16:20:39 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-11 16:20:39 +0000 |
commit | 14ba765419676b6104e52766be1d19887be3e366 (patch) | |
tree | 56af757f9fa17c3ae520d20193e523b31ce032a0 | |
parent | 7396f936b213eb1e1eaa1f342e86f0877538a6cf (diff) |
automatic import of python-smart-getenv
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-smart-getenv.spec | 84 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 86 insertions, 0 deletions
@@ -0,0 +1 @@ +/smart-getenv-1.1.0.tar.gz diff --git a/python-smart-getenv.spec b/python-smart-getenv.spec new file mode 100644 index 0000000..f1d40a4 --- /dev/null +++ b/python-smart-getenv.spec @@ -0,0 +1,84 @@ +%global _empty_manifest_terminate_build 0 +Name: python-smart-getenv +Version: 1.1.0 +Release: 1 +Summary: Wrapper for os.getenv that achieves return values of a specified type +License: Apache License 2.0 +URL: https://github.com/Va1/smart-getenv +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0e/98/08b7e39638e6ee1da27f5b70f8b6453156b812a289356fd3dbbb807227bc/smart-getenv-1.1.0.tar.gz +BuildArch: noarch + + +%description +Since environment variables in os.environ are strings, it often appears inconvenient to store and retrieve other +data types such as bool or list. The package provides a single function that wraps os.getenv and allows +you to specify the desired variable type. +Tested and supported types: str, int, float, list. tuple, dict. +`PyPi page`_ + +%package -n python3-smart-getenv +Summary: Wrapper for os.getenv that achieves return values of a specified type +Provides: python-smart-getenv +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-smart-getenv +Since environment variables in os.environ are strings, it often appears inconvenient to store and retrieve other +data types such as bool or list. The package provides a single function that wraps os.getenv and allows +you to specify the desired variable type. +Tested and supported types: str, int, float, list. tuple, dict. +`PyPi page`_ + +%package help +Summary: Development documents and examples for smart-getenv +Provides: python3-smart-getenv-doc +%description help +Since environment variables in os.environ are strings, it often appears inconvenient to store and retrieve other +data types such as bool or list. The package provides a single function that wraps os.getenv and allows +you to specify the desired variable type. +Tested and supported types: str, int, float, list. tuple, dict. +`PyPi page`_ + +%prep +%autosetup -n smart-getenv-1.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-smart-getenv -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.0-1 +- Package Spec generated @@ -0,0 +1 @@ +dcf09acf5f87575eeeeb56d993eec1ca smart-getenv-1.1.0.tar.gz |