From 46c0f2e61aaa2d1a5c277877980c13bd19e72e8b Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 5 May 2023 08:22:23 +0000 Subject: automatic import of python-pytemperature --- .gitignore | 1 + python-pytemperature.spec | 159 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 161 insertions(+) create mode 100644 python-pytemperature.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..b692dce 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pytemperature-1.1.tar.gz diff --git a/python-pytemperature.spec b/python-pytemperature.spec new file mode 100644 index 0000000..47d1399 --- /dev/null +++ b/python-pytemperature.spec @@ -0,0 +1,159 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pytemperature +Version: 1.1 +Release: 1 +Summary: Scale of temperature +License: MIT +URL: https://github.com/wannaphong/pytemperature +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2f/74/d83f02be7290b90657fc34b5835feaccf993d9dd9831ca0471fe63096264/pytemperature-1.1.tar.gz +BuildArch: noarch + + +%description +# pytemperature + + A module that helps to convert temperature units. + +**Examples of usage** + +```python +>>> import pytemperature +>>> pytemperature.c2f(37.78) # Celsius to Fahrenheit +100.0 +>>> pytemperature.f2c(104) # Fahrenheit to Celsius +40.0 +>>> pytemperature.c2k(40) # Celsius to Kelvin +313.15 +>>> pytemperature.k2c(273.15) # Kelvin to Celsius +0.0 +>>> pytemperature.k2f(273.15) # Kelvin to Fahrenheit +31.98 +>>> pytemperature.f2k(100) # Fahrenheit to Kelvin +310.93 +>>> pytemperature.r2c(80) # Romoe to Celsius +100.0 +>>> pytemperature.c2r(100) # Celsius to Romoe +80.0 +>>> pytemperature.r2k(80) #Romoe to Kelvin +373.15 +``` + + + + +%package -n python3-pytemperature +Summary: Scale of temperature +Provides: python-pytemperature +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pytemperature +# pytemperature + + A module that helps to convert temperature units. + +**Examples of usage** + +```python +>>> import pytemperature +>>> pytemperature.c2f(37.78) # Celsius to Fahrenheit +100.0 +>>> pytemperature.f2c(104) # Fahrenheit to Celsius +40.0 +>>> pytemperature.c2k(40) # Celsius to Kelvin +313.15 +>>> pytemperature.k2c(273.15) # Kelvin to Celsius +0.0 +>>> pytemperature.k2f(273.15) # Kelvin to Fahrenheit +31.98 +>>> pytemperature.f2k(100) # Fahrenheit to Kelvin +310.93 +>>> pytemperature.r2c(80) # Romoe to Celsius +100.0 +>>> pytemperature.c2r(100) # Celsius to Romoe +80.0 +>>> pytemperature.r2k(80) #Romoe to Kelvin +373.15 +``` + + + + +%package help +Summary: Development documents and examples for pytemperature +Provides: python3-pytemperature-doc +%description help +# pytemperature + + A module that helps to convert temperature units. + +**Examples of usage** + +```python +>>> import pytemperature +>>> pytemperature.c2f(37.78) # Celsius to Fahrenheit +100.0 +>>> pytemperature.f2c(104) # Fahrenheit to Celsius +40.0 +>>> pytemperature.c2k(40) # Celsius to Kelvin +313.15 +>>> pytemperature.k2c(273.15) # Kelvin to Celsius +0.0 +>>> pytemperature.k2f(273.15) # Kelvin to Fahrenheit +31.98 +>>> pytemperature.f2k(100) # Fahrenheit to Kelvin +310.93 +>>> pytemperature.r2c(80) # Romoe to Celsius +100.0 +>>> pytemperature.c2r(100) # Celsius to Romoe +80.0 +>>> pytemperature.r2k(80) #Romoe to Kelvin +373.15 +``` + + + + +%prep +%autosetup -n pytemperature-1.1 + +%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-pytemperature -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot - 1.1-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..0eecab1 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +42f84fd6c46862f0b3871f3114271d36 pytemperature-1.1.tar.gz -- cgit v1.2.3