From 9046e68c94e1875664effbb1f86f64cbae98589e Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 12 Apr 2023 03:14:05 +0000 Subject: automatic import of python-guardonce --- python-guardonce.spec | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 python-guardonce.spec (limited to 'python-guardonce.spec') diff --git a/python-guardonce.spec b/python-guardonce.spec new file mode 100644 index 0000000..cf88c40 --- /dev/null +++ b/python-guardonce.spec @@ -0,0 +1,97 @@ +%global _empty_manifest_terminate_build 0 +Name: python-guardonce +Version: 2.4.0 +Release: 1 +Summary: Utilities for converting from C/C++ include guards to #pragma once and back again +License: MIT +URL: https://github.com/cgmb/guardonce +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ce/fa/ccd538dd490fae9a01c75ca750c3f17d4dcc8783202f97fb17342c005d1f/guardonce-2.4.0.tar.gz +BuildArch: noarch + +Requires: python3-nose + +%description +Include guards suck. They're tiring to type and tedius to update. Worse, +the task of updating boilerplate leaves room for copy/paste errors, or +other mistakes. #pragma once is simpler and less error prone. That's why +you should convert to #pragma once. +Alas, though #pragma once is available on all the most commonly used +compilers, it's not available on *every* compiler. Perhaps one day +you'll add support for a platform with a barebones compiler with no +support for #pragma once and you'll have to convert back. That's ok. +It's easy! + +%package -n python3-guardonce +Summary: Utilities for converting from C/C++ include guards to #pragma once and back again +Provides: python-guardonce +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-guardonce +Include guards suck. They're tiring to type and tedius to update. Worse, +the task of updating boilerplate leaves room for copy/paste errors, or +other mistakes. #pragma once is simpler and less error prone. That's why +you should convert to #pragma once. +Alas, though #pragma once is available on all the most commonly used +compilers, it's not available on *every* compiler. Perhaps one day +you'll add support for a platform with a barebones compiler with no +support for #pragma once and you'll have to convert back. That's ok. +It's easy! + +%package help +Summary: Development documents and examples for guardonce +Provides: python3-guardonce-doc +%description help +Include guards suck. They're tiring to type and tedius to update. Worse, +the task of updating boilerplate leaves room for copy/paste errors, or +other mistakes. #pragma once is simpler and less error prone. That's why +you should convert to #pragma once. +Alas, though #pragma once is available on all the most commonly used +compilers, it's not available on *every* compiler. Perhaps one day +you'll add support for a platform with a barebones compiler with no +support for #pragma once and you'll have to convert back. That's ok. +It's easy! + +%prep +%autosetup -n guardonce-2.4.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-guardonce -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Apr 12 2023 Python_Bot - 2.4.0-1 +- Package Spec generated -- cgit v1.2.3