[packages/python3-pyxattr] - copied from python-pyxattr.spec, updated to 0.7.1 (python 2 no longer supported)

qboosh qboosh at pld-linux.org
Sat Jan 25 22:32:33 CET 2020


commit a755e2cdfded0e4022893d0f4cde4227e7720f35
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jan 25 22:32:43 2020 +0100

    - copied from python-pyxattr.spec, updated to 0.7.1 (python 2 no longer supported)

 python-pyxattr.spec  | 91 ----------------------------------------------------
 python3-pyxattr.spec | 66 +++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 91 deletions(-)
---
diff --git a/python-pyxattr.spec b/python-pyxattr.spec
deleted file mode 100644
index 1e12553..0000000
--- a/python-pyxattr.spec
+++ /dev/null
@@ -1,91 +0,0 @@
-#
-# Conditional build:
-%bcond_without	python2	# CPython 2.x module
-%bcond_without	python3	# CPython 3.x module
-
-%define 	module	pyxattr
-Summary:	Python 2 module for accessing Extended Attributes of the files
-Summary(pl.UTF-8):	Moduł Pythona 2 pozwalający na dostęp do rozszerzonych atrybutów plików
-Name:		python-%{module}
-Version:	0.6.1
-Release:	2
-License:	LGPL v2.1+
-Group:		Libraries/Python
-Source0:	https://pyxattr.k1024.org/downloads/%{module}-%{version}.tar.gz
-# Source0-md5:	523e9d90f9801141c785d93e6197cc33
-URL:		https://pyxattr.k1024.org/
-%if %{with python2}
-BuildRequires:	python-devel >= 1:2.5
-BuildRequires:	python-modules >= 1:2.5
-BuildRequires:	python-setuptools
-%endif
-%if %{with python3}
-BuildRequires:	python3-devel >= 1:3.2
-BuildRequires:	python3-modules >= 1:3.2
-BuildRequires:	python3-setuptools
-%endif
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Python 2 module for accessing Extended Attributes of the files.
-
-%description -l pl.UTF-8
-Moduł Pythona 2 pozwalający na dostęp do rozszerzonych atrybutów
-plików.
-
-%package -n python3-%{module}
-Summary:	Python 3 module for accessing Extended Attributes of the files
-Summary(pl.UTF-8):	Moduł Pythona 3 pozwalający na dostęp do rozszerzonych atrybutów plików
-Group:		Libraries/Python
-
-%description -n python3-%{module}
-Python 3 module for accessing Extended Attributes of the files.
-
-%description -n python3-%{module} -l pl.UTF-8
-Moduł Pythona 3 pozwalający na dostęp do rozszerzonych atrybutów
-plików.
-
-%prep
-%setup -q -n %{module}-%{version}
-
-%build
-#CC="%{__cc}" \
-#CFLAGS="%{rpmcppflags} %{rpmcflags}"
-%if %{with python2}
-%py_build
-%endif
-
-%if %{with python3}
-%py3_build
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc NEWS README.rst
-%attr(755,root,root) %{py_sitedir}/xattr.so
-%{py_sitedir}/pyxattr-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py3_sitedir}/xattr.cpython-*.so
-%{py3_sitedir}/pyxattr-%{version}-py*.egg-info
-%endif
diff --git a/python3-pyxattr.spec b/python3-pyxattr.spec
new file mode 100644
index 0000000..460c9d8
--- /dev/null
+++ b/python3-pyxattr.spec
@@ -0,0 +1,66 @@
+#
+# Conditional build:
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tests
+
+%define 	module	pyxattr
+Summary:	Python 3 module for accessing Extended Attributes of the files
+Summary(pl.UTF-8):	Moduł Pythona 3 pozwalający na dostęp do rozszerzonych atrybutów plików
+Name:		python3-%{module}
+Version:	0.7.1
+Release:	1
+License:	LGPL v2.1+
+Group:		Libraries/Python
+Source0:	https://pyxattr.k1024.org/downloads/%{module}-%{version}.tar.gz
+# Source0-md5:	f3341e703489452afaf68b336be5d32c
+URL:		https://pyxattr.k1024.org/
+BuildRequires:	python3-devel >= 1:3.4
+BuildRequires:	python3-modules >= 1:3.4
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-pytest
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	python3-recommonmark
+BuildRequires:	sphinx-pdg-3
+%endif
+Requires:	python3-libs >= 1:3.4
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python 3 module for accessing Extended Attributes of the files.
+
+%description -l pl.UTF-8
+Moduł Pythona 3 pozwalający na dostęp do rozszerzonych atrybutów
+plików.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%py3_build
+
+%if %{with tests}
+PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
+%{__python3} -m pytest test
+%endif
+
+%if %{with doc}
+sphinx-build-3 -b html doc doc/_build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc NEWS README.md
+%attr(755,root,root) %{py3_sitedir}/xattr.cpython-*.so
+%{py3_sitedir}/pyxattr-%{version}-py*.egg-info
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pyxattr.git/commitdiff/a755e2cdfded0e4022893d0f4cde4227e7720f35



More information about the pld-cvs-commit mailing list