a574ee
%global with_python3 1
Marcin Zajaczkowski 2cd6a1
Name:		pyxattr
Marcin Zajaczkowski 2cd6a1
Summary:	Extended attributes library wrapper for Python
a574ee
Version:	0.5.3
188816
Release:	4%{?dist}
Marcin Zajaczkowski 2cd6a1
License:	LGPLv2+
Marcin Zajaczkowski 2cd6a1
Group:		Development/Libraries
a574ee
URL:		http://pyxattr.k1024.org/
a574ee
Source:		https://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
Marcin Zajaczkowski 3699be
Patch0:		0001-use-Py_ssize_t.patch
a574ee
BuildRequires:	libattr-devel
a574ee
BuildRequires:	python2-devel, python-setuptools
a574ee
%if %{?with_python3}
a574ee
BuildRequires:	python3-devel, python3-setuptools
a574ee
%endif # with_python3
77a8c8
77a8c8
%description
77a8c8
Python extension module wrapper for libattr. It allows to query, list,
77a8c8
add and remove extended attributes from files and directories.
77a8c8
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 Zajaczkowski 3699be
%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
77a8c8
%files
77a8c8
%defattr(0644,root,root,0755)
a574ee
%{python2_sitearch}/xattr.so
a574ee
%{python2_sitearch}/*egg-info
24d724
%{!?_licensedir:%global license %%doc}
24d724
%license COPYING
24d724
%doc NEWS README
77a8c8
a574ee
%if %{?with_python3}
a574ee
%files -n python3-%{name}
a574ee
%defattr(0644,root,root,0755)
a574ee
%{python3_sitearch}/xattr.cpython-??m.so
a574ee
%{python3_sitearch}/*egg-info
24d724
%{!?_licensedir:%global license %%doc}
24d724
%license COPYING
24d724
%doc NEWS README
a574ee
%endif # with_python3
a574ee
77a8c8
%changelog
188816
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.3-4
188816
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
188816
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)