a574ee
%global with_python3 1
Marcin Zajaczkowski 2cd6a1
Name:		pyxattr
Marcin Zajaczkowski 2cd6a1
Summary:	Extended attributes library wrapper for Python
Marcin Zajączkowski fa669d
Version:	0.5.6
Marcin Zajączkowski 768997
Release:	2%{?dist}
Marcin Zajaczkowski 2cd6a1
License:	LGPLv2+
Marcin Zajaczkowski 2cd6a1
Group:		Development/Libraries
a574ee
URL:		http://pyxattr.k1024.org/
Marcin Zajączkowski 74837c
Source:		https://pyxattr.k1024.org/downloads/%{name}-%{version}.tar.gz
Marcin Zajączkowski 768997
# Bacported with modifications from 0.6.1
Marcin Zajączkowski 768997
# https://github.com/iustin/pyxattr/commit/a799657a333b5fa44ae9bfb51b7bd40441123064
Marcin Zajączkowski 768997
Patch0:		0002-use-system-xattr-h.patch
Marcin Zajączkowski 3e584e
BuildRequires:	gcc
a574ee
BuildRequires:	libattr-devel
bf7879
BuildRequires:	python2-devel, python2-setuptools
a574ee
%if %{?with_python3}
a574ee
BuildRequires:	python3-devel, python3-setuptools
a574ee
%endif # with_python3
77a8c8
8591f3
%global _description\
8591f3
Python extension module wrapper for libattr. It allows to query, list,\
77a8c8
add and remove extended attributes from files and directories.
77a8c8
8591f3
%description %_description
8591f3
8591f3
%package -n python2-%{name}
8591f3
Summary: %summary
8591f3
%{?python_provide:%python_provide python2-%{name}}
8591f3
# Remove before F30
a5f6e0
Provides: pyxattr = %{version}-%{release}
8591f3
Provides: pyxattr%{?_isa} = %{version}-%{release}
8591f3
Obsoletes: pyxattr < %{version}-%{release}
8591f3
8591f3
%description -n python2-%{name} %_description
8591f3
a574ee
%if %{?with_python3}
a574ee
%package -n python3-%{name}
a574ee
Summary:	Extended attributes library wrapper for Python 3
a574ee
a574ee
%description -n python3-%{name}
a574ee
Python extension module wrapper for libattr. It allows to query, list,
a574ee
add and remove extended attributes from files and directories.
a574ee
a574ee
Python 3 version.
a574ee
%endif # with_python3
a574ee
77a8c8
%prep
77a8c8
%setup -q
Marcin Zajączkowski 768997
%patch0 -p1
77a8c8
a574ee
%if 0%{?with_python3}
a574ee
rm -rf %{py3dir}
a574ee
cp -a . %{py3dir}
a574ee
%endif # with_python3
a574ee
77a8c8
%build
a574ee
CFLAGS="%{optflags}" %{__python2} setup.py build
a574ee
a574ee
%if 0%{?with_python3}
a574ee
pushd %{py3dir}
a574ee
CFLAGS="%{optflags}" %{__python3} setup.py build
a574ee
popd
a574ee
%endif # with_python3
77a8c8
77a8c8
%install
a574ee
%{__python2} setup.py install --root="%{buildroot}" --prefix="%{_prefix}"
a574ee
a574ee
%if 0%{?with_python3}
a574ee
pushd %{py3dir}
a574ee
%{__python3} setup.py install --root="%{buildroot}" --prefix="%{_prefix}"
a574ee
popd
a574ee
%endif # with_python3
a574ee
a574ee
%check
b99f7a
# selinux in koji produces unexpected xattrs for tests
b99f7a
export TEST_IGNORE_XATTRS=security.selinux
b99f7a
a574ee
%{__python2} setup.py test
77a8c8
a574ee
%if 0%{?with_python3}
a574ee
pushd %{py3dir}
a574ee
%{__python3} setup.py test
a574ee
popd
a574ee
%endif # with_python3
77a8c8
8591f3
%files -n python2-%{name}
a574ee
%{python2_sitearch}/xattr.so
a574ee
%{python2_sitearch}/*egg-info
24d724
%{!?_licensedir:%global license %%doc}
24d724
%license COPYING
Marcin Zajączkowski fa669d
%doc NEWS README.rst
77a8c8
a574ee
%if %{?with_python3}
a574ee
%files -n python3-%{name}
Robert Kuska 6cab9e
%{python3_sitearch}/xattr.cpython-??m*
a574ee
%{python3_sitearch}/*egg-info
24d724
%{!?_licensedir:%global license %%doc}
24d724
%license COPYING
Marcin Zajączkowski fa669d
%doc NEWS README.rst
a574ee
%endif # with_python3
a574ee
77a8c8
%changelog
Marcin Zajączkowski 768997
* Tue Jul 24 2018 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.5.6-2
Marcin Zajączkowski 768997
- Backport patch from 0.6.1 to fix issues with missing ENOATTR in libatttr 2.4.48
Marcin Zajączkowski 768997
  in Fedora 28/29 (#1603242, related to #1601482) - 0.5.6-1 was broken also in F28
Marcin Zajączkowski 768997
Marcin Zajączkowski fa669d
* Thu Jul 19 2018 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.5.6-1
Marcin Zajączkowski 74837c
- Upgrade to 0.5.6 (transitional step before 0.6.x for Fedora <29)
Marcin Zajączkowski fa669d
- Drop Py_ssize_t patch applied upstream
Marcin Zajączkowski 74837c
- Update download URL
Marcin Zajączkowski fa669d
Marcin Zajączkowski 3e584e
* Thu Jul 12 2018 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.5.3-18
Marcin Zajączkowski 3e584e
- Add gcc to BuildRequires - https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
Marcin Zajączkowski 3e584e
a77fed
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.3-17
a77fed
- Rebuilt for Python 3.7
a77fed
ad097a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-16
ad097a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ad097a
bf7879
* Wed Jan 31 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.3-15
bf7879
- Update Python 2 dependency declarations to new packaging standards
bf7879
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
bf7879
a5f6e0
* Tue Dec 26 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5.3-14
a5f6e0
- Also add Provides for the old name without %%_isa
a5f6e0
8591f3
* Sun Aug 13 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5.3-13
8591f3
- Python 2 binary package renamed to python2-pyxattr
8591f3
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
8591f3
cce239
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-12
cce239
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
cce239
c90541
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-11
c90541
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c90541
72106e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-10
72106e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
72106e
e74465
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.5.3-9
e74465
- Rebuild for Python 3.6
e74465
27a384
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.3-8
27a384
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
27a384
80a9f1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.3-7
80a9f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
80a9f1
Robert Kuska 6cab9e
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 0.5.3-6
Robert Kuska 6cab9e
- Rebuilt for Python3.5 rebuild
Robert Kuska 6cab9e
- Change pattern for listed so file to reflect new naming in py35
Robert Kuska 6cab9e
ce4275
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.3-5
ce4275
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ce4275
bbb612
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.3-4
bbb612
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
bbb612
Marcin Zajaczkowski 3699be
* Thu Aug  7 2014 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.5.3-3
Marcin Zajaczkowski 3699be
- add Mark Hamzy's patch to fix issue with PPC builds (bug 1127310)
Marcin Zajaczkowski 3699be
24d724
* Mon Aug  4 2014 Tom Callaway <spot@fedoraproject.org> - 0.5.3-2
24d724
- fix license handling
24d724
a574ee
* Sat Jun 28 2014 Miro Hrončok <mhroncok@redhat.com> - 0.5.3-1
a574ee
- Updated to 0.5.3
a574ee
- Updated the website
a574ee
- Updated download URL to PyPI
a574ee
- Removed useless Require of python >= 2.2
a574ee
- Use %%{pythonX_sitearch} macros
a574ee
- Removed BuildRoot definition, %%clean section and rm -rf at the beginning of %%install
a574ee
- Introduced Python 3 subpackage
a574ee
- Introduced %%check and run the test suite
a574ee
d3a8f3
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-5
d3a8f3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d3a8f3
d457d3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-4
d457d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d457d3
6765de
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-3
6765de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6765de
d04df5
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
d04df5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d04df5
Marcin Zajaczkowski e7558f
* Tue Jun 26 2012 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.5.1-1
Marcin Zajaczkowski e7558f
- updated to 0.5.1
Marcin Zajaczkowski e7558f
- fix bugs found with cpychecker (bug 809974)
Marcin Zajaczkowski e7558f
Marcin Zajaczkowski 2cd6a1
* Mon Feb 27 2012 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.5.0-5
Marcin Zajaczkowski 2cd6a1
- remove prodive/obsolete of python-xattr (bug 781838)
Marcin Zajaczkowski 2cd6a1
- fix problem with mixed use of tabs and spaces
Marcin Zajaczkowski 2cd6a1
d52082
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-4
d52082
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d52082
cdc07d
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
cdc07d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
cdc07d
359e83
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.5.0-2
359e83
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
359e83
24ecac
* Sun Dec 27 2009 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.5.0-1
24ecac
- updated to 0.5.0
24ecac
- added support for unicode filenames (bug 479417)
24ecac
a50911
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-4
a50911
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a50911
818594
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-3
818594
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
818594
9f05f3
* Sat Dec 6 2008 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.4.0-2
9f05f3
- added python-setuptools in BuildRequires which is needed in build process
9f05f3
since version 0.4.0 (thanks to Kevin Fenzi)
9f05f3
9f05f3
* Fri Dec 5 2008 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.4.0-1
9f05f3
- updated to 0.4.0
9f05f3
- License Tag adjusted to current licensing LGPLv2+
9f05f3
- modified Python Eggs support due to its usage in source distribution 
9f05f3
a0b6ec
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.2-4
a0b6ec
- Rebuild for Python 2.6
a0b6ec
12b3bf
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.2.2-3
12b3bf
- Autorebuild for GCC 4.3
12b3bf
1830d7
* Tue Jan 15 2008 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.2.2-2
1830d7
- added compatibility with Python Eggs forced in F9 
1830d7
c2ccf7
* Mon Aug 27 2007 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.2.2-1
04cb5a
- upgraded to 0.2.2
c2ccf7
c2ccf7
* Sun Aug 26 2007 Kevin Fenzi <kevin@tummy.com> - 0.2.1-5
c2ccf7
 - Updated License tag
04cb5a
114c59
* Wed Apr 25 2007 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.2.1-4
114c59
 - added Provides/Obsoletes tags
114c59
77a8c8
* Sat Apr 21 2007 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.2.1-3
77a8c8
 - removed redundant after name change "exclude" tag
77a8c8
 - comments cleanup
77a8c8
77a8c8
* Wed Apr 18 2007 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.2.1-2
77a8c8
 - applied suggestions from Kevin Fenzi
77a8c8
 - name changed from python-xattr to pyxattr
77a8c8
 - corrected path to the source file
77a8c8
77a8c8
* Thu Apr 5 2007 Marcin Zajaczkowski <mszpak att="" wp="" dott="" pl=""> - 0.2.1-1
77a8c8
 - updated to 0.2.1
77a8c8
 - added python-devel in BuildRequires
77a8c8
 - added more doc files
77a8c8
 - added Provides section
77a8c8
 - modified to Fedora Extras requirements
77a8c8
77a8c8
* Sun Sep 11 2005 Dag Wieers <dag@wieers.com> - 0.2-1 - +/
77a8c8
- Initial package. (using DAR)