%global _empty_manifest_terminate_build 0 Name: python-detect Version: 2020.12.3 Release: 1 Summary: detect OS and Python versions License: Unlicense URL: https://github.com/andrewp-as-is/detect.py Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a7/e4/50b692a4eb05580e7e081823e71c6b16cb6c506e766a2dfa5f9705f50c05/detect-2020.12.3.tar.gz BuildArch: noarch %description [![](https://img.shields.io/pypi/v/detect.svg?maxAge=3600)](https://pypi.org/project/detect/) [![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/) ### Installation ```bash $ [sudo] pip install detect ``` #### Features ##### OS variables variable|description -|- `detect.freebsd`| True if OS is FreeBSD `detect.linux`| True if OS is Linux `detect.mac`| True if OS is MacOS `detect.osx`| True if OS is MacOS OS X `detect.windows`| True if OS is Windows `detect.cygwin`| True if OS is Cygwin detected `detect.unix`| True if OS is Unix (not Windows) ##### Python variables variable|description -|- `detect.py2`| True if python is 2.x `detect.py3`| True if python is 3.x ##### Docker variable|description -|- `detect.docker`| True if running inside a Docker container
%package -n python3-detect Summary: detect OS and Python versions Provides: python-detect BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-detect [![](https://img.shields.io/pypi/v/detect.svg?maxAge=3600)](https://pypi.org/project/detect/) [![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/) ### Installation ```bash $ [sudo] pip install detect ``` #### Features ##### OS variables variable|description -|- `detect.freebsd`| True if OS is FreeBSD `detect.linux`| True if OS is Linux `detect.mac`| True if OS is MacOS `detect.osx`| True if OS is MacOS OS X `detect.windows`| True if OS is Windows `detect.cygwin`| True if OS is Cygwin detected `detect.unix`| True if OS is Unix (not Windows) ##### Python variables variable|description -|- `detect.py2`| True if python is 2.x `detect.py3`| True if python is 3.x ##### Docker variable|description -|- `detect.docker`| True if running inside a Docker container %package help Summary: Development documents and examples for detect Provides: python3-detect-doc %description help [![](https://img.shields.io/pypi/v/detect.svg?maxAge=3600)](https://pypi.org/project/detect/) [![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/) ### Installation ```bash $ [sudo] pip install detect ``` #### Features ##### OS variables variable|description -|- `detect.freebsd`| True if OS is FreeBSD `detect.linux`| True if OS is Linux `detect.mac`| True if OS is MacOS `detect.osx`| True if OS is MacOS OS X `detect.windows`| True if OS is Windows `detect.cygwin`| True if OS is Cygwin detected `detect.unix`| True if OS is Unix (not Windows) ##### Python variables variable|description -|- `detect.py2`| True if python is 2.x `detect.py3`| True if python is 3.x ##### Docker variable|description -|- `detect.docker`| True if running inside a Docker container %prep %autosetup -n detect-2020.12.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-detect -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot