python-xlib/python-xlib.spec

95 lines
3.1 KiB
RPMSpec
Raw Normal View History

%global _empty_manifest_terminate_build 0
Name: python-xlib
2022-12-08 13:29:29 +08:00
Version: 0.32
2022-12-09 10:40:12 +08:00
Release: 2
Summary: Python X Library
2022-12-09 10:40:12 +08:00
License: LGPL-2.1-or-later
URL: https://github.com/python-xlib/python-xlib
2022-12-08 13:29:29 +08:00
Source0: https://github.com/python-xlib/python-xlib/archive/refs/tags/python-xlib-0.32.tar.gz
BuildArch: noarch
Requires: python3-six
%global _description\
The Python X Library is intended to be a fully functional X client\
library for Python programs. It is written entirely in Python, in\
contrast to earlier X libraries for Python (the ancient X extension and\
the newer plxlib) which were interfaces to the C Xlib.\
This is possible to do since X client programs communicate with the X\
server via the X protocol. The communication takes place over TCP/IP,\
Unix sockets, DECnet or any other streaming network protocol. The C Xlib\
is merely an interface to this protocol, providing functions suitable\
for a C environment.\
There are three advantages of implementing a pure Python library:\
- Integration: The library can make use of the wonderful object system\
in Python, providing an easy-to-use class hierarchy.\
- Portability: The library will be usable on (almost) any computer\
which have Python installed. A C interface could be problematic to\
port to non-Unix systems, such as MS Windows or OpenVMS.\
- Maintainability: It is much easier to develop and debug native Python\
modules than modules written in C.
%description %_description
%package -n python3-xlib
Summary: Python X Library
Provides: python-xlib
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
%description -n python3-xlib %_description
%package help
Summary: Development documents and examples for python-xlib
Provides: python3-python-xlib-doc
%description help %_description
%prep
2022-12-08 13:29:29 +08:00
%autosetup -n python-xlib-0.32
%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-xlib -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
2022-12-09 10:40:12 +08:00
* Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 0.32-2
- License compliance rectification
2022-12-08 13:29:29 +08:00
* Thu Dec 08 2022 liqiuyu <liqiuyu@kylinos.cn> - 0.32-1
- Update package to version 0.32
* Wed Sep 02 2020 Python_Bot <Python_Bot@openeuler.org>
- Package Spec generated