Bump version to 0.6.1
- Remove conditional whether to build with python3 - remove no longer used python2 provides - simplify %build %prep and %install - don't use private %__python* macros - drop no longer required patch 0002-use-system-xattr-h.patch
This commit is contained in:
parent
09f19e1ebf
commit
1dde29d39b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/pyxattr-0.5.1.tar.gz
|
/pyxattr-0.5.1.tar.gz
|
||||||
/pyxattr-0.5.3.tar.gz
|
/pyxattr-0.5.3.tar.gz
|
||||||
/pyxattr-0.5.6.tar.gz
|
/pyxattr-0.5.6.tar.gz
|
||||||
|
/pyxattr-0.6.1.tar.gz
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
diff --git a/xattr.c.org b/xattr.c
|
|
||||||
index c792df3..a419b95 100644
|
|
||||||
--- a/xattr.c.org
|
|
||||||
+++ b/xattr.c
|
|
||||||
@@ -23,7 +23,9 @@
|
|
||||||
|
|
||||||
#define PY_SSIZE_T_CLEAN
|
|
||||||
#include <Python.h>
|
|
||||||
-#include <attr/xattr.h>
|
|
||||||
+#if defined(__APPLE__) || defined(__linux__)
|
|
||||||
+#include <sys/xattr.h>
|
|
||||||
+#endif
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
/* Compatibility with python 2.4 regarding python size type (PEP 353) */
|
|
||||||
@@ -551,11 +553,7 @@ get_all(PyObject *self, PyObject *args, PyObject *keywds)
|
|
||||||
buf_val = buf_val_tmp;
|
|
||||||
nalloc = realloc_size;
|
|
||||||
continue;
|
|
||||||
- } else if(
|
|
||||||
-#ifdef ENODATA
|
|
||||||
- errno == ENODATA ||
|
|
||||||
-#endif
|
|
||||||
- errno == ENOATTR) {
|
|
||||||
+ } else if (errno == ENODATA) {
|
|
||||||
/* this attribute has gone away since we queried
|
|
||||||
the attribute list */
|
|
||||||
missing = 1;
|
|
||||||
@@ -1137,8 +1135,7 @@ static char __xattr_doc__[] = \
|
|
||||||
" a :exc:`EnvironmentError`; under\n"
|
|
||||||
" Linux, the following ``errno`` values are used:\n"
|
|
||||||
"\n"
|
|
||||||
- " - ``ENOATTR`` and ``ENODATA`` mean that the attribute name is\n"
|
|
||||||
- " invalid\n"
|
|
||||||
+ " - ``ENODATA`` means that the attribute name is\n invalid\n"
|
|
||||||
" - ``ENOTSUP`` and ``EOPNOTSUPP`` mean that the filesystem does not\n"
|
|
||||||
" support extended attributes, or that the namespace is invalid\n"
|
|
||||||
" - ``E2BIG`` mean that the attribute value is too big\n"
|
|
||||||
|
|
64
pyxattr.spec
64
pyxattr.spec
@ -1,20 +1,14 @@
|
|||||||
%global with_python3 1
|
|
||||||
Name: pyxattr
|
Name: pyxattr
|
||||||
Summary: Extended attributes library wrapper for Python
|
Summary: Extended attributes library wrapper for Python
|
||||||
Version: 0.5.6
|
Version: 0.6.1
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://pyxattr.k1024.org/
|
URL: https://pyxattr.k1024.org/
|
||||||
Source: https://pyxattr.k1024.org/downloads/%{name}-%{version}.tar.gz
|
Source: %{url}/downloads/%{name}-%{version}.tar.gz
|
||||||
# Bacported with modifications from 0.6.1
|
|
||||||
# https://github.com/iustin/pyxattr/commit/a799657a333b5fa44ae9bfb51b7bd40441123064
|
|
||||||
Patch0: 0002-use-system-xattr-h.patch
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
BuildRequires: python2-devel, python2-setuptools
|
BuildRequires: python2-devel
|
||||||
%if %{?with_python3}
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-devel, python3-setuptools
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%global _description\
|
%global _description\
|
||||||
Python extension module wrapper for libattr. It allows to query, list,\
|
Python extension module wrapper for libattr. It allows to query, list,\
|
||||||
@ -25,80 +19,54 @@ add and remove extended attributes from files and directories.
|
|||||||
%package -n python2-%{name}
|
%package -n python2-%{name}
|
||||||
Summary: %summary
|
Summary: %summary
|
||||||
%{?python_provide:%python_provide python2-%{name}}
|
%{?python_provide:%python_provide python2-%{name}}
|
||||||
# Remove before F30
|
|
||||||
Provides: pyxattr = %{version}-%{release}
|
|
||||||
Provides: pyxattr%{?_isa} = %{version}-%{release}
|
|
||||||
Obsoletes: pyxattr < %{version}-%{release}
|
|
||||||
|
|
||||||
%description -n python2-%{name} %_description
|
%description -n python2-%{name} %_description
|
||||||
|
|
||||||
%if %{?with_python3}
|
|
||||||
%package -n python3-%{name}
|
%package -n python3-%{name}
|
||||||
Summary: Extended attributes library wrapper for Python 3
|
Summary: Extended attributes library wrapper for Python 3
|
||||||
|
%{?python_provide:%python_provide python3-%{name}}
|
||||||
|
|
||||||
%description -n python3-%{name}
|
%description -n python3-%{name}
|
||||||
Python extension module wrapper for libattr. It allows to query, list,
|
Python extension module wrapper for libattr. It allows to query, list,
|
||||||
add and remove extended attributes from files and directories.
|
add and remove extended attributes from files and directories.
|
||||||
|
|
||||||
Python 3 version.
|
Python 3 version.
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="%{optflags}" %{__python2} setup.py build
|
%py2_build
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
popd
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python2} setup.py install --root="%{buildroot}" --prefix="%{_prefix}"
|
%py2_install
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
%py3_install
|
%py3_install
|
||||||
popd
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# selinux in koji produces unexpected xattrs for tests
|
# selinux in koji produces unexpected xattrs for tests
|
||||||
export TEST_IGNORE_XATTRS=security.selinux
|
export TEST_IGNORE_XATTRS=security.selinux
|
||||||
|
|
||||||
%{__python2} setup.py test
|
python2 setup.py test
|
||||||
|
python3 setup.py test
|
||||||
%if 0%{?with_python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
%{__python3} setup.py test
|
|
||||||
popd
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%files -n python2-%{name}
|
%files -n python2-%{name}
|
||||||
%{python2_sitearch}/xattr.so
|
%{python2_sitearch}/xattr.so
|
||||||
%{python2_sitearch}/*egg-info
|
%{python2_sitearch}/*egg-info
|
||||||
%{!?_licensedir:%global license %%doc}
|
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc NEWS README.rst
|
%doc NEWS README.rst
|
||||||
|
|
||||||
%if %{?with_python3}
|
|
||||||
%files -n python3-%{name}
|
%files -n python3-%{name}
|
||||||
%{python3_sitearch}/xattr.cpython-??*
|
%{python3_sitearch}/xattr.cpython-??*
|
||||||
%{python3_sitearch}/*egg-info
|
%{python3_sitearch}/*egg-info
|
||||||
%{!?_licensedir:%global license %%doc}
|
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc NEWS README.rst
|
%doc NEWS README.rst
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jul 14 2019 Dan Čermák <dan.cermak@cgc-instruments.com> - 0.6.1-1
|
||||||
|
- Bump version to 0.6.1
|
||||||
|
- Simplify spec file
|
||||||
|
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6-3
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.6-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pyxattr-0.5.6.tar.gz) = 100df863a42c35036dc8d105be3bbc84c5567489b1bbc09ec2a139e71f2413fd2fc18df0a67df8504a624ff0cab2a10417491a21670207651da77bf54717aa3b
|
SHA512 (pyxattr-0.6.1.tar.gz) = 2c2defee81e2bd7e7e7f67d33676858f27494f12ba5c3d34bd548912a058cae562e9e9ed0dc5697892d1d55c29f2a5e10455260092b63faa54e40b841c42681d
|
||||||
|
Loading…
Reference in New Issue
Block a user