|
|
@ -1,19 +1,30 @@
|
|
|
|
%{?!_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}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global srcname filelock
|
|
|
|
%global srcname filelock
|
|
|
|
|
|
|
|
%bcond_without docs
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
Name: python-%{srcname}
|
|
|
|
Version: 3.0.12
|
|
|
|
Version: 3.3.1
|
|
|
|
Release: 12%{?dist}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: A platform independent file lock
|
|
|
|
Summary: A platform independent file lock
|
|
|
|
|
|
|
|
|
|
|
|
License: Unlicense
|
|
|
|
License: Unlicense
|
|
|
|
URL: https://github.com/benediktschmitt/py-%{srcname}
|
|
|
|
URL: https://github.com/tox-dev/py-%{srcname}
|
|
|
|
Source0: https://github.com/benediktschmitt/py-%{srcname}/archive/v%{version}/py-%{srcname}-%{version}.tar.gz
|
|
|
|
Source0: %{pypi_source %{srcname}}
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
|
|
|
|
|
|
|
# We cannot install extra dependencies because there are some
|
|
|
|
|
|
|
|
# we do not have in Fedora like covdefaults in testing or furo in docs.
|
|
|
|
|
|
|
|
# Test dependencies
|
|
|
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
|
|
|
BuildRequires: python3-pytest-timeout
|
|
|
|
|
|
|
|
%if %{with docs}
|
|
|
|
|
|
|
|
# Doc dependencies
|
|
|
|
|
|
|
|
BuildRequires: python3-sphinx
|
|
|
|
|
|
|
|
BuildRequires: python3-sphinx-autodoc-typehints
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
%description
|
|
|
|
This package contains a single module, which implements a platform independent
|
|
|
|
This package contains a single module, which implements a platform independent
|
|
|
|
file locking mechanism for Python.
|
|
|
|
file locking mechanism for Python.
|
|
|
@ -21,47 +32,16 @@ file locking mechanism for Python.
|
|
|
|
The lock includes a lock counter and is thread safe. This means, when locking
|
|
|
|
The lock includes a lock counter and is thread safe. This means, when locking
|
|
|
|
the same lock object twice, it will not block.
|
|
|
|
the same lock object twice, it will not block.
|
|
|
|
|
|
|
|
|
|
|
|
%bcond_without docs
|
|
|
|
|
|
|
|
%if %{with docs}
|
|
|
|
%if %{with docs}
|
|
|
|
%package doc
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for %{srcname}, %{summary}
|
|
|
|
Summary: Documentation for %{srcname}, %{summary}
|
|
|
|
BuildRequires: make
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-sphinx
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-sphinx-theme-alabaster
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
%description doc
|
|
|
|
%{summary}
|
|
|
|
%{summary}
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python2}
|
|
|
|
|
|
|
|
%package -n python2-%{srcname}
|
|
|
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
|
|
|
Conflicts: python%{python3_pkgversion}-%{srcname} < %{version}-%{release}
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
|
|
|
Suggests: %{name}-doc
|
|
|
|
|
|
|
|
%endif # with_doc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%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}
|
|
|
|
%package -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
Summary: %{summary}
|
|
|
|
Summary: %{summary}
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
|
|
|
Conflicts: python2-%{srcname} < %{version}-%{release}
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
%if 0%{?fedora}
|
|
|
|
Suggests: %{name}-doc
|
|
|
|
Suggests: %{name}-doc
|
|
|
@ -73,82 +53,56 @@ file locking mechanism for Python.
|
|
|
|
|
|
|
|
|
|
|
|
The lock includes a lock counter and is thread safe. This means, when locking
|
|
|
|
The lock includes a lock counter and is thread safe. This means, when locking
|
|
|
|
the same lock object twice, it will not block.
|
|
|
|
the same lock object twice, it will not block.
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n py-%{srcname}-%{version}
|
|
|
|
%autosetup -n %{srcname}-%{version}
|
|
|
|
|
|
|
|
# furo theme is not available in Fedora
|
|
|
|
|
|
|
|
sed -i "/html_theme =.*/d" docs/conf.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
|
|
|
%pyproject_buildrequires -r
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
%if 0%{?with_python2}
|
|
|
|
%pyproject_wheel
|
|
|
|
%py2_build
|
|
|
|
|
|
|
|
%endif # with_python2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with docs}
|
|
|
|
%if %{with docs}
|
|
|
|
%make_build -C docs html man SPHINXBUILD=sphinx-build-%{python3_version}
|
|
|
|
pushd docs
|
|
|
|
rm docs/build/html/.buildinfo
|
|
|
|
PYTHONPATH=../src sphinx-build ./ html --color -b html
|
|
|
|
|
|
|
|
PYTHONPATH=../src sphinx-build ./ man --color -b man
|
|
|
|
|
|
|
|
rm html/.buildinfo
|
|
|
|
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
%if 0%{?with_python2}
|
|
|
|
%pyproject_install
|
|
|
|
%py2_install
|
|
|
|
%pyproject_save_files %{srcname}
|
|
|
|
%endif # with_python2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with docs}
|
|
|
|
%if %{with docs}
|
|
|
|
install -p -m0644 -D docs/build/man/py-%{srcname}.1 %{buildroot}%{_mandir}/man1/py-%{srcname}.1
|
|
|
|
install -p -m0644 -D docs/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
%if 0%{?with_python2}
|
|
|
|
%pytest
|
|
|
|
%{__python2} test.py
|
|
|
|
|
|
|
|
%endif # with_python2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
|
|
|
%{__python3} test.py
|
|
|
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with docs}
|
|
|
|
%if %{with docs}
|
|
|
|
%files doc
|
|
|
|
%files doc
|
|
|
|
%license LICENSE
|
|
|
|
%license LICENSE
|
|
|
|
%doc docs/build/html
|
|
|
|
%doc docs/html
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python2}
|
|
|
|
%files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files}
|
|
|
|
%files -n python2-%{srcname}
|
|
|
|
|
|
|
|
%license LICENSE
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%doc README.md
|
|
|
|
%{python2_sitelib}/%{srcname}.py
|
|
|
|
|
|
|
|
%{python2_sitelib}/%{srcname}.py[co]
|
|
|
|
|
|
|
|
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
|
|
|
|
|
|
|
|
%{_mandir}/man1/py-%{srcname}.1.gz
|
|
|
|
|
|
|
|
%endif # with_python2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%doc README.md
|
|
|
|
|
|
|
|
%{python3_sitelib}/%{srcname}.py
|
|
|
|
|
|
|
|
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
|
|
|
|
|
|
|
|
%{python3_sitelib}/__pycache__/%{srcname}*.py[co]
|
|
|
|
|
|
|
|
%if %{with docs}
|
|
|
|
%if %{with docs}
|
|
|
|
%{_mandir}/man1/py-%{srcname}.1.gz
|
|
|
|
%{_mandir}/man1/%{srcname}.1.gz
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Mon Oct 25 2021 Lumír Balhar <lbalhar@redhat.com> - 3.3.1-1
|
|
|
|
|
|
|
|
- Update to 3.3.1, drop Python 2 support
|
|
|
|
|
|
|
|
Resolves: rhbz#2008102
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.12-12
|
|
|
|
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.12-12
|
|
|
|
- Second attempt - Rebuilt for
|
|
|
|
- Second attempt - Rebuilt for
|
|
|
|
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|