diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-10 09:26:35 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-10 09:26:35 +0000 |
commit | e971d9333f2301e84bb8776eba0c60aebfcee1dc (patch) | |
tree | 472bb5584e7ba0bdd0dcd5fc91253527a3fbbfc4 | |
parent | 1cc555da3912bae5a6b95e61f292b10f07371a79 (diff) |
automatic import of python-elevate
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-elevate.spec | 87 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 89 insertions, 0 deletions
@@ -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 <Python_Bot@openeuler.org> - 0.1.3-1 +- Package Spec generated @@ -0,0 +1 @@ +33d07ae9cc2f280415179d1075e3e9e2 elevate-0.1.3.tar.gz |