bb59c59
%if 0%{?rhel} && 0%{?rhel} <= 6
bb59c59
%{!?__python2:        %global __python2 /usr/bin/python2}
bb59c59
%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
bb59c59
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
bb59c59
%endif
bb59c59
bb59c59
%if 0%{?fedora}
bb59c59
%global with_python3 1
d1c61e0
%endif
e55b760
e55b760
Name:           python-zc-lockfile
faf5b25
Version:        1.2.1
f84c373
Release:        3%{?dist}
e55b760
Summary:        Basic Inter-Process Locks
e55b760
Group:          Development/Languages
e55b760
License:        ZPLv2.1
faf5b25
URL:            https://pypi.io/project/zc.lockfile/
faf5b25
Source0:        https://pypi.io/packages/source/z/zc.lockfile/zc.lockfile-%{version}.tar.gz
e55b760
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
e55b760
e55b760
BuildArch:      noarch
e55b760
BuildRequires:  python-devel
e55b760
BuildRequires:  python-setuptools
e55b760
BuildRequires:  python-zope-testing
faf5b25
BuildRequires:  python-mock
e55b760
bb59c59
%if 0%{with_python3}
bb59c59
BuildRequires:  python3-devel
bb59c59
BuildRequires:  python3-setuptools
bb59c59
BuildRequires:  python3-zope-testing
faf5b25
BuildRequires:  python3-mock
bb59c59
%endif
bb59c59
e55b760
%description
e55b760
The zc.lockfile package provides a basic portable implementation of
e55b760
interprocess locks using lock files. The purpose if not specifically
e55b760
to lock files, but to simply provide locks with an implementation based
e55b760
on file-locking primitives. Of course, these locks could be used to
e55b760
mediate access to other files. For example, the ZODB file storage
e55b760
implementation uses file locks to mediate access to file-storage
e55b760
database files. The database files and lock file files are separate files.
e55b760
bb59c59
%if 0%{with_python3}
bb59c59
%package -n python3-zc-lockfile
bb59c59
Summary:        Basic Inter-Process Locks
bb59c59
Group:          Development/Languages
bb59c59
bb59c59
%description -n python3-zc-lockfile
bb59c59
The zc.lockfile package provides a basic portable implementation of
bb59c59
interprocess locks using lock files. The purpose if not specifically
bb59c59
to lock files, but to simply provide locks with an implementation based
bb59c59
on file-locking primitives. Of course, these locks could be used to
bb59c59
mediate access to other files. For example, the ZODB file storage
bb59c59
implementation uses file locks to mediate access to file-storage
bb59c59
database files. The database files and lock file files are separate files.
bb59c59
%endif
bb59c59
e55b760
%prep
e55b760
%setup -q -n zc.lockfile-%{version}
e55b760
bb59c59
%if 0%{?with_python3}
bb59c59
rm -rf %{py3dir}
bb59c59
cp -a . %{py3dir}
bb59c59
%endif
bb59c59
e55b760
%build
bb59c59
%{__python2} setup.py build
bb59c59
bb59c59
%if 0%{?with_python3}
bb59c59
pushd %{py3dir}
bb59c59
%{__python3} setup.py build
bb59c59
popd
bb59c59
%endif
bb59c59
e55b760
e55b760
%install
bb59c59
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
bb59c59
rm -f %{buildroot}%{python2_sitelib}/zc/lockfile/*.txt
bb59c59
bb59c59
%if 0%{?with_python3}
bb59c59
pushd %{py3dir}
bb59c59
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
bb59c59
rm -f %{buildroot}%{python3_sitelib}/zc/lockfile/*.txt
bb59c59
popd
bb59c59
%endif
e55b760
e55b760
%check
bb59c59
%{__python2} setup.py test
e55b760
bb59c59
%if 0%{?with_python3}
bb59c59
pushd %{py3dir}
bb59c59
%{__python3} setup.py test
bb59c59
popd
bb59c59
%endif
e55b760
e55b760
%files
d1c61e0
%doc src/zc/lockfile/*.txt
bb59c59
%{python2_sitelib}/zc.lockfile-*.egg-info
bb59c59
%{python2_sitelib}/zc.lockfile-*-nspkg.pth
bb59c59
%{python2_sitelib}/zc/lockfile/
bb59c59
%dir %{python2_sitelib}/zc/
e55b760
bb59c59
%if 0%{?with_python3}
bb59c59
%files -n python3-zc-lockfile
bb59c59
%doc src/zc/lockfile/*.txt
bb59c59
%{python3_sitelib}/zc.lockfile-*.egg-info
bb59c59
%{python3_sitelib}/zc.lockfile-*-nspkg.pth
bb59c59
%{python3_sitelib}/zc/lockfile/
bb59c59
%dir %{python3_sitelib}/zc/
bb59c59
%endif
e55b760
e55b760
%changelog
f84c373
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3
f84c373
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f84c373
e576d2d
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.2.1-2
e576d2d
- Rebuild for Python 3.6
e576d2d
faf5b25
* Mon Aug 01 2016 Ralph Bean <rbean@redhat.com> - 1.2.1-1
faf5b25
- new version
faf5b25
0eceb50
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-8
0eceb50
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
0eceb50
c1601aa
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-7
c1601aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c1601aa
46d0cc7
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
46d0cc7
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
46d0cc7
c496180
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-5
c496180
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c496180
bb59c59
* Tue Jun 10 2014 Ralph Bean <rbean@redhat.com> - 1.1.0-4
bb59c59
- Python3 subpackage.
bb59c59
- Modernize python macros.
bb59c59
4792b1b
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
4792b1b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4792b1b
4866342
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
4866342
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4866342
abb3de2
* Mon Feb 25 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-1
abb3de2
- Latest upstream
abb3de2
04781cd
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-9
04781cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
04781cd
7937042
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-8
7937042
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7937042
21993bb
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-7
21993bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
21993bb
18d56b0
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-6
18d56b0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
18d56b0
b0d80ff
* Mon Aug 30 2010 Robin Lee <robinlee.sysu@gmail.com> - 1.0.0-5
b0d80ff
- Remove python-zope-filesystem from requirements
b0d80ff
- Own %%{python_sitelib}/zc/
b0d80ff
392862b
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.0.0-4
392862b
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
392862b
d1c61e0
* Thu Jun 17 2010 Robin Lee <robinlee.sysu@gmail.com> - 1.0.0-3
313aa9c
- Don't own %%{python_sitelib}/zc/, which is provided by python-zope-filesystem
d1c61e0
- Add python-zope-filesystem as requirement
d1c61e0
- Include more documents
d1c61e0
e55b760
* Sun Jul 5 2009 Conrad Meyer <konrad@tylerc.org> - 1.0.0-2
e55b760
- Add missing BR on python-setuptools.
e55b760
- Enable testing stuff as python-zope-testing is in devel.
e55b760
e55b760
* Mon Dec 15 2008 Conrad Meyer <konrad@tylerc.org> - 1.0.0-1
e55b760
- Initial package.