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.
248 lines
7.2 KiB
248 lines
7.2 KiB
%{?!_without_doc:%global with_doc 1}
|
|
%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || (0%{?fedora} < 30 && 0%{?rhel} < 8)}
|
|
%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7}
|
|
%{?!_without_python3_other:%global with_python3_other 0%{?_with_python3_other:1} || 0%{?rhel} == 7}
|
|
%{?!_without_tests:%global with_tests 1}
|
|
|
|
%global commit b71c3a494b1a9a84ddaa4a4d43bfd985a01e81e7
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
%global srcname filelock
|
|
%global sum A platform independent file lock
|
|
|
|
Name: python-%{srcname}
|
|
Version: 3.0.9
|
|
Release: 1%{?dist}
|
|
Summary: %{sum}
|
|
|
|
Group: Development/Libraries
|
|
License: Unlicense
|
|
URL: https://github.com/benediktschmitt/py-%{srcname}
|
|
Source0: https://github.com/benediktschmitt/py-%{srcname}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
This package contains a single module, which implements a platform independent
|
|
file locking mechanism for Python.
|
|
|
|
The lock includes a lock counter and is thread safe. This means, when locking
|
|
the same lock object twice, it will not block.
|
|
|
|
%if 0%{?with_doc}
|
|
%package doc
|
|
Summary: Documentation for %{srcname}, %{sum}
|
|
|
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
|
BuildRequires: python2-sphinx
|
|
BuildRequires: python2-sphinx-theme-alabaster
|
|
%else # rhel
|
|
BuildRequires: python%{python3_pkgversion}-sphinx
|
|
BuildRequires: python%{python3_pkgversion}-sphinx-theme-alabaster
|
|
%endif # rhel
|
|
|
|
%description doc
|
|
Documentation for %{srcname}, %{sum}
|
|
%endif # with_doc
|
|
|
|
%if 0%{?with_python2}
|
|
%package -n python2-%{srcname}
|
|
Summary: %{sum}
|
|
|
|
BuildRequires: python2-devel
|
|
BuildRequires: python2-setuptools
|
|
|
|
%if 0%{?fedora}
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
%if 0%{?with_doc}
|
|
Recommends: %{name}-doc
|
|
%endif # with_doc
|
|
%else # fedora
|
|
Provides: %{name} = %{version}-%{release}
|
|
%endif # fedora
|
|
|
|
%description -n python2-%{srcname}
|
|
This package contains a single module, which implements a platform independent
|
|
file locking mechanism for Python.
|
|
|
|
The lock includes a lock counter and is thread safe. This means, when locking
|
|
the same lock object twice, it will not block.
|
|
%endif # with_python2
|
|
|
|
%if 0%{?with_python3}
|
|
%package -n python%{python3_pkgversion}-%{srcname}
|
|
Summary: %{sum}
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
%if 0%{?fedora}
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
|
%if 0%{?with_doc}
|
|
Recommends: %{name}-doc
|
|
%endif # with_doc
|
|
%endif # fedora
|
|
|
|
%description -n python%{python3_pkgversion}-%{srcname}
|
|
This package contains a single module, which implements a platform independent
|
|
file locking mechanism for Python.
|
|
|
|
The lock includes a lock counter and is thread safe. This means, when locking
|
|
the same lock object twice, it will not block.
|
|
%endif # with_python3
|
|
|
|
%if 0%{?with_python3_other}
|
|
%package -n python%{python3_other_pkgversion}-%{srcname}
|
|
Summary: %{sum}
|
|
|
|
BuildRequires: python%{python3_other_pkgversion}-devel
|
|
BuildRequires: python%{python3_other_pkgversion}-setuptools
|
|
|
|
%if 0%{?fedora}
|
|
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{srcname}}
|
|
%if 0%{?with_doc}
|
|
Recommends: %{name}-doc
|
|
%endif # with_doc
|
|
%endif # fedora
|
|
|
|
%description -n python%{python3_other_pkgversion}-%{srcname}
|
|
This package contains a single module, which implements a platform independent
|
|
file locking mechanism for Python.
|
|
|
|
The lock includes a lock counter and is thread safe. This means, when locking
|
|
the same lock object twice, it will not block.
|
|
%endif # with_python3_other
|
|
|
|
%prep
|
|
%autosetup -n py-%{srcname}-%{commit}
|
|
|
|
sed -i '1{s|^#!\(/usr/bin/\(env \)\?\)\?python||}' %{srcname}.py
|
|
|
|
%build
|
|
%if 0%{?with_python2}
|
|
%py2_build
|
|
%endif # with_python2
|
|
|
|
%if 0%{?with_python3}
|
|
%py3_build
|
|
%endif # with_python3
|
|
|
|
%if 0%{?with_python3_other}
|
|
%py3_other_build
|
|
%endif # with_python3_other
|
|
|
|
%if 0%{?with_doc}
|
|
make -C docs html man
|
|
rm docs/build/html/.buildinfo
|
|
%endif # with_doc
|
|
|
|
%install
|
|
%if 0%{?with_python2}
|
|
%py2_install
|
|
%endif # with_python2
|
|
|
|
%if 0%{?with_python3}
|
|
%py3_install
|
|
%endif # with_python3
|
|
|
|
%if 0%{?with_python3_other}
|
|
%py3_other_install
|
|
%endif # with_python3_other
|
|
|
|
%if 0%{?with_doc}
|
|
install -p -m0644 -D docs/build/man/py-%{srcname}.1 %{buildroot}%{_mandir}/man1/py-%{srcname}.1
|
|
%endif # with_doc
|
|
|
|
%if 0%{?with_tests}
|
|
%check
|
|
%if 0%{?with_python2}
|
|
%{__python2} test.py
|
|
%endif # with_python2
|
|
|
|
%if 0%{?with_python3}
|
|
%{__python3} test.py
|
|
%endif # with_python3
|
|
|
|
%if 0%{?with_python3_other}
|
|
%{__python3_other} test.py
|
|
%endif # with_python3_other
|
|
%endif # with_tests
|
|
|
|
%if 0%{?with_doc}
|
|
%files doc
|
|
%doc docs/build/html
|
|
%license LICENSE.rst
|
|
%endif # with_doc
|
|
|
|
%if 0%{?with_python2}
|
|
%files -n python2-%{srcname}
|
|
%doc README.rst
|
|
%license LICENSE.rst
|
|
%if 0%{?with_doc}
|
|
%{_mandir}/man1/py-%{srcname}.1.gz
|
|
%endif # with_doc
|
|
%{python2_sitelib}/%{srcname}.py
|
|
%{python2_sitelib}/%{srcname}.py[co]
|
|
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
|
|
%endif # with_python2
|
|
|
|
%if 0%{?with_python3}
|
|
%files -n python%{python3_pkgversion}-%{srcname}
|
|
%doc README.rst
|
|
%license LICENSE.rst
|
|
%if 0%{?with_doc}
|
|
%{_mandir}/man1/py-%{srcname}.1.gz
|
|
%endif # with_doc
|
|
%{python3_sitelib}/%{srcname}.py
|
|
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
|
|
%{python3_sitelib}/__pycache__/%{srcname}*.py[co]
|
|
%endif # with_python3
|
|
|
|
%if 0%{?with_python3_other}
|
|
%files -n python%{python3_other_pkgversion}-%{srcname}
|
|
%doc README.rst
|
|
%license LICENSE.rst
|
|
%if 0%{?with_doc}
|
|
%{_mandir}/man1/py-%{srcname}.1.gz
|
|
%endif # with_doc
|
|
%{python3_other_sitelib}/%{srcname}.py
|
|
%{python3_other_sitelib}/%{srcname}-%{version}-py%{python3_other_version}.egg-info
|
|
%{python3_other_sitelib}/__pycache__/%{srcname}*.py[co]
|
|
%endif # with_python3_other
|
|
|
|
%changelog
|
|
* Tue Oct 30 2018 Scott K Logan <logans@cottsay.net> - 3.0.9-1
|
|
- Update to 3.0.9
|
|
- Add spec conditionals for python version targeting (rhbz#1632320)
|
|
- Fix theme package dependency (s/sphinx_rtd_theme/sphinx-theme-alabaster/)
|
|
|
|
* Fri Sep 14 2018 Scott K Logan <logans@cottsay.net> - 3.0.8-1
|
|
- Update to 3.0.8 (rhbz#1459712)
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.8-7
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.8-6
|
|
- Rebuilt for Python 3.7
|
|
|
|
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.8-5
|
|
- Update Python 2 dependency declarations to new packaging standards
|
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.8-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.8-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.8-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
* Sat Feb 04 2017 Scott K Logan <logans@cottsay.net> - 2.0.8-1
|
|
- Update to version 2.0.8
|
|
|
|
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.0.6-2
|
|
- Rebuild for Python 3.6
|
|
|
|
* Sun May 01 2016 Scott K Logan <logans@cottsay.net> - 2.0.6-1
|
|
- Initial package
|