|
|
|
@ -1,23 +1,20 @@
|
|
|
|
|
%{?!_without_doc:%global with_doc 1}
|
|
|
|
|
%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || (0%{?fedora} < 30 && 0%{?rhel} < 8)}
|
|
|
|
|
%{?!_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
|
|
|
|
|
Version: 3.0.10
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: %{sum}
|
|
|
|
|
Summary: A platform independent file lock
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
Source0: https://github.com/benediktschmitt/py-%{srcname}/archive/v%{version}/py-%{srcname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
@ -30,23 +27,23 @@ the same lock object twice, it will not block.
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_doc}
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{srcname}, %{sum}
|
|
|
|
|
Summary: Documentation for %{srcname}, %{summary}
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
|
|
|
|
BuildRequires: python2-sphinx
|
|
|
|
|
BuildRequires: python2-sphinx-theme-alabaster
|
|
|
|
|
%else # rhel
|
|
|
|
|
%if !0%{?rhel} || 0%{?rhel} >= 8
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-sphinx
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-sphinx-theme-alabaster
|
|
|
|
|
%else # rhel
|
|
|
|
|
BuildRequires: python2-sphinx
|
|
|
|
|
BuildRequires: python2-sphinx-theme-alabaster
|
|
|
|
|
%endif # rhel
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for %{srcname}, %{sum}
|
|
|
|
|
%{summary}
|
|
|
|
|
%endif # with_doc
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python2}
|
|
|
|
|
%package -n python2-%{srcname}
|
|
|
|
|
Summary: %{sum}
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
@ -70,7 +67,7 @@ the same lock object twice, it will not block.
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
|
Summary: %{sum}
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
@ -92,7 +89,7 @@ the same lock object twice, it will not block.
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3_other}
|
|
|
|
|
%package -n python%{python3_other_pkgversion}-%{srcname}
|
|
|
|
|
Summary: %{sum}
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_other_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_other_pkgversion}-setuptools
|
|
|
|
@ -113,9 +110,7 @@ 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
|
|
|
|
|
%autosetup -p1 -n py-%{srcname}-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if 0%{?with_python2}
|
|
|
|
@ -169,47 +164,50 @@ install -p -m0644 -D docs/build/man/py-%{srcname}.1 %{buildroot}%{_mandir}/man1/
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_doc}
|
|
|
|
|
%files doc
|
|
|
|
|
%doc docs/build/html
|
|
|
|
|
%license LICENSE.rst
|
|
|
|
|
%doc docs/build/html
|
|
|
|
|
%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
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%{python2_sitelib}/%{srcname}.py
|
|
|
|
|
%{python2_sitelib}/%{srcname}.py[co]
|
|
|
|
|
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
|
|
|
|
|
%if 0%{?with_doc}
|
|
|
|
|
%{_mandir}/man1/py-%{srcname}.1.gz
|
|
|
|
|
%endif # with_doc
|
|
|
|
|
%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
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%{python3_sitelib}/%{srcname}.py
|
|
|
|
|
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
|
|
|
|
|
%{python3_sitelib}/__pycache__/%{srcname}*.py[co]
|
|
|
|
|
%if 0%{?with_doc}
|
|
|
|
|
%{_mandir}/man1/py-%{srcname}.1.gz
|
|
|
|
|
%endif # with_doc
|
|
|
|
|
%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
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%{python3_other_sitelib}/%{srcname}.py
|
|
|
|
|
%{python3_other_sitelib}/%{srcname}-%{version}-py%{python3_other_version}.egg-info
|
|
|
|
|
%{python3_other_sitelib}/__pycache__/%{srcname}*.py[co]
|
|
|
|
|
%if 0%{?with_doc}
|
|
|
|
|
%{_mandir}/man1/py-%{srcname}.1.gz
|
|
|
|
|
%endif # with_doc
|
|
|
|
|
%endif # with_python3_other
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Nov 16 2018 Scott K Logan <logans@cottsay.net> - 3.0.10-1
|
|
|
|
|
- Update to 3.0.10
|
|
|
|
|
|
|
|
|
|
* 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)
|
|
|
|
|