From e971d9333f2301e84bb8776eba0c60aebfcee1dc Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 10 May 2023 09:26:35 +0000 Subject: automatic import of python-elevate --- .gitignore | 1 + python-elevate.spec | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 89 insertions(+) create mode 100644 python-elevate.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..e4cb072 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/elevate-0.1.3.tar.gz diff --git a/python-elevate.spec b/python-elevate.spec new file mode 100644 index 0000000..171077a --- /dev/null +++ b/python-elevate.spec @@ -0,0 +1,87 @@ +%global _empty_manifest_terminate_build 0 +Name: python-elevate +Version: 0.1.3 +Release: 1 +Summary: Python library for requesting root privileges +License: MIT +URL: https://github.com/barneygale/elevate +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/81/32/29ba61063ac124632754e26c65e71217f48ce682fbf8762ee9a0bb0d32de/elevate-0.1.3.tar.gz +BuildArch: noarch + + +%description +Elevate is a small Python library that re-launches the current process with +root/admin privileges using one of the following mechanisms: +- UAC (Windows) +- AppleScript (macOS) +- ``pkexec``, ``gksudo`` or ``kdesudo`` (Linux) +- ``sudo`` (Linux, macOS) + +%package -n python3-elevate +Summary: Python library for requesting root privileges +Provides: python-elevate +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-elevate +Elevate is a small Python library that re-launches the current process with +root/admin privileges using one of the following mechanisms: +- UAC (Windows) +- AppleScript (macOS) +- ``pkexec``, ``gksudo`` or ``kdesudo`` (Linux) +- ``sudo`` (Linux, macOS) + +%package help +Summary: Development documents and examples for elevate +Provides: python3-elevate-doc +%description help +Elevate is a small Python library that re-launches the current process with +root/admin privileges using one of the following mechanisms: +- UAC (Windows) +- AppleScript (macOS) +- ``pkexec``, ``gksudo`` or ``kdesudo`` (Linux) +- ``sudo`` (Linux, macOS) + +%prep +%autosetup -n elevate-0.1.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-elevate -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot - 0.1.3-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..cafc12c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +33d07ae9cc2f280415179d1075e3e9e2 elevate-0.1.3.tar.gz -- cgit v1.2.3