You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python-zc-lockfile/python-zc-lockfile.spec

180 lines
6.2 KiB

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