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-filelock/python-filelock.spec

132 lines
4.0 KiB

%global commit 0980867d17db4a3e1b20d588b680582cbbf7e778
8 years ago
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global srcname filelock
%global sum A platform independent file lock
Name: python-%{srcname}
Version: 3.0.8
Release: 1%{?dist}
8 years ago
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
8 years ago
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.
%package doc
Summary: Documentation for %{srcname}, %{sum}
BuildRequires: python2-sphinx
BuildRequires: python2-sphinx_rtd_theme
8 years ago
%description doc
Documentation for %{srcname}, %{sum}
%package -n python2-%{srcname}
Summary: %{sum}
BuildRequires: python2-devel
%{?python_provide:%python_provide python2-%{srcname}}
Recommends: %{name}-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.
%package -n python3-%{srcname}
Summary: %{sum}
BuildRequires: python3-devel
%{?python_provide:%python_provide python3-%{srcname}}
Recommends: %{name}-doc
%description -n python3-%{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.
%prep
%autosetup -n py-%{srcname}-%{commit}
sed -i '1{s|^#!\(/usr/bin/\(env \)\?\)\?python||}' %{srcname}.py
8 years ago
%build
%py2_build
%py3_build
make -C docs html man SPHINXBUILD=sphinx-build-2
8 years ago
rm docs/build/html/.buildinfo
%install
%py2_install
%py3_install
install -p -m0644 -D docs/build/man/py-%{srcname}.1 %{buildroot}%{_mandir}/man1/py-%{srcname}.1
%check
%{__python2} test.py
%{__python3} test.py
%files doc
%doc docs/build/html
%license LICENSE.rst
%files -n python2-%{srcname}
%doc README.rst
%license LICENSE.rst
%{_mandir}/man1/py-%{srcname}.1.gz
%{python2_sitelib}/%{srcname}.py
%{python2_sitelib}/%{srcname}.py[co]
%{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info
%files -n python3-%{srcname}
%doc README.rst
%license LICENSE.rst
%{_mandir}/man1/py-%{srcname}.1.gz
%{python3_sitelib}/%{srcname}.py
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
%{python3_sitelib}/__pycache__/%{srcname}*.py[co]
%changelog
* 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
8 years ago
* Sun May 01 2016 Scott K Logan <logans@cottsay.net> - 2.0.6-1
- Initial package