summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-detect.spec195
-rw-r--r--sources1
3 files changed, 197 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..63a8181 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/detect-2020.12.3.tar.gz
diff --git a/python-detect.spec b/python-detect.spec
new file mode 100644
index 0000000..762bbf2
--- /dev/null
+++ b/python-detect.spec
@@ -0,0 +1,195 @@
+%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://readme42.com
+-->
+
+
+[![](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
+
+<p align="center">
+ <a href="https://readme42.com/">readme42.com</a>
+</p>
+
+%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://readme42.com
+-->
+
+
+[![](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
+
+<p align="center">
+ <a href="https://readme42.com/">readme42.com</a>
+</p>
+
+%package help
+Summary: Development documents and examples for detect
+Provides: python3-detect-doc
+%description help
+<!--
+https://readme42.com
+-->
+
+
+[![](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
+
+<p align="center">
+ <a href="https://readme42.com/">readme42.com</a>
+</p>
+
+%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
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 2020.12.3-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..795250b
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+870de516d7c549472cade577cfd96e31 detect-2020.12.3.tar.gz