63d7f32
63d7f32
# 24 picked since that's when the package was updated to contain a version
63d7f32
# capable of python3.  If we're willing to push the update to older Fedora
63d7f32
# releases, the python3 package can go to older releases as well.
63d7f32
%if 0%{?fedora} >= 23
63d7f32
%global with_python3 1
63d7f32
%else
63d7f32
%global with_python3 0
63d7f32
%endif
5754a77
5754a77
Name:           python-daemon
03042a1
Version:        2.1.2
0874e1e
Release:        3%{?dist}
5754a77
Summary:        Library to implement a well-behaved Unix daemon process
5754a77
5754a77
Group:          Development/Languages
63d7f32
# Some build scripts and test franework are licensed GPLv3+ but htose aren't shipped
63d7f32
License:        ASL2.0
5754a77
URL:            http://pypi.python.org/pypi/python-daemon/
03042a1
Source0:        https://pagure.io/releases/python-daemon/python-daemon-%{version}.tar.gz
5754a77
5754a77
BuildArch:      noarch
5754a77
BuildRequires:  python-devel, python-setuptools
63d7f32
BuildRequires:  python-testscenarios
63d7f32
BuildRequires:  python-lockfile
63d7f32
BuildRequires:  python-mock
63d7f32
BuildRequires:  python-docutils
63d7f32
%if 0%{?with_python3}
63d7f32
BuildRequires:  python3-devel, python3-setuptools
63d7f32
BuildRequires:  python3-testscenarios
63d7f32
BuildRequires:  python3-docutils
63d7f32
BuildRequires:  python3-lockfile
63d7f32
BuildRequires:  python3-mock
63d7f32
BuildRequires:  python3-testtools
63d7f32
%endif
eccd1b7
Requires:       python-lockfile
5754a77
5754a77
%description
5754a77
This library implements the well-behaved daemon specification of PEP 3143,
5754a77
"Standard daemon process library".
5754a77
63d7f32
This is the python2 version of the library.
63d7f32
63d7f32
%if 0%{?with_python3}
63d7f32
%package -n python3-daemon
63d7f32
Summary:        Library to implement a well-behaved Unix daemon process
63d7f32
Requires:       python3-lockfile
63d7f32
63d7f32
%description -n python3-daemon
63d7f32
This library implements the well-behaved daemon specification of PEP 3143,
63d7f32
"Standard daemon process library".
63d7f32
63d7f32
This is the python3 version of the library.
63d7f32
%endif
63d7f32
5754a77
%prep
5754a77
%setup -q
5754a77
63d7f32
%if 0%{?with_python3}
63d7f32
rm -rf %{py3dir}
63d7f32
cp -ar . %{py3dir}
63d7f32
%endif
5754a77
5754a77
%build
63d7f32
%{__python2} setup.py build
5754a77
63d7f32
%if 0%{?with_python3}
63d7f32
pushd %{py3dir}
63d7f32
%{__python3} setup.py build
63d7f32
popd
63d7f32
%endif
5754a77
5754a77
%install
63d7f32
%{__python2} setup.py install --skip-build --root %{buildroot}
63d7f32
rm -fr %{buildroot}%{python2_sitelib}/tests
63d7f32
63d7f32
%if 0%{?with_python3}
63d7f32
pushd %{py3dir}
63d7f32
%{__python3} setup.py install --skip-build --root %{buildroot}
63d7f32
rm -fr %{buildroot}%{python3_sitelib}/tests
63d7f32
popd
63d7f32
%endif
5754a77
5754a77
5fb322f
# Test suite requires minimock and lockfile
Thomas Spura 29997eb
%check
63d7f32
PYTHONPATH=$(pwd) %{__python2} -m unittest discover
63d7f32
63d7f32
%if 0%{?with_python3}
63d7f32
pushd %{py3dir}
63d7f32
PYTHONPATH=$(pwd) %{__python3} -m unittest discover
63d7f32
%endif
5754a77
5754a77
%files
63d7f32
%license LICENSE.ASF-2
63d7f32
%{python2_sitelib}/daemon/
63d7f32
%{python2_sitelib}/python_daemon-%{version}-py%{python2_version}.egg-info/
63d7f32
63d7f32
%if 0%{?with_python3}
63d7f32
%files -n python3-daemon
63d7f32
%license LICENSE.ASF-2
63d7f32
%{python3_sitelib}/daemon/
63d7f32
%{python3_sitelib}/python_daemon-%{version}-py%{python3_version}.egg-info/
63d7f32
%endif
5754a77
5754a77
%changelog
0874e1e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-3
0874e1e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0874e1e
7eb418c
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 2.1.2-2
7eb418c
- Rebuild for Python 3.6
7eb418c
03042a1
* Wed Nov 09 2016 Kevin Fenzi <kevin@scrye.com> - 2.1.2-1
03042a1
- Update to 2.1.2. Fixes bug #1389593
03042a1
311fc7b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
311fc7b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
311fc7b
8179d3b
* Sun Apr 10 2016 Kevin Fenzi <kevin@scrye.com> - 2.1.1-1
8179d3b
- Update to 2.1.1. Fixes bug #1234933
8179d3b
0f6e328
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
0f6e328
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0f6e328
59f1a5d
* Mon Nov 30 2015 Toshio Kuratomi <toshio@fedoraproject.org> - - 2.1.0-1
63d7f32
- Update to newer upstream.
63d7f32
- Create a python3 subpackage since upstream supports it
63d7f32
- Note that newer upstream has relicensed to Apache 2.0
63d7f32
04d9875
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-8
04d9875
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
04d9875
Thomas Spura 29997eb
* Mon Aug  4 2014 Thomas Spura <tomspur@fedoraproject.org> - 1.6-7
Thomas Spura 29997eb
- enable tests again as lockfile was fixed
Thomas Spura 29997eb
ad801a7
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-6
ad801a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ad801a7
fd7b347
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-5
fd7b347
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
fd7b347
ab18b5c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
ab18b5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ab18b5c
f4a5fa5
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-3
f4a5fa5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f4a5fa5
eb98d2a
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-2
eb98d2a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
eb98d2a
5fe46e8
* Thu Jul 14 2011 Kushal Das <kushal@fedoraproject.org> - 1.6-1
5fe46e8
- New release of source
5fe46e8
6673058
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-3
6673058
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
6673058
a1ea778
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.5.2-2
a1ea778
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
a1ea778
e44690d
* Wed Dec 23 2009 Thomas Spura <tomspur@fedoraproject.org> - 1.5.2-1
a66175e
- add missing BR: python-nose
eccd1b7
- also add lockfile as R (bug #513546)
e44690d
- update to 1.5.2
e44690d
626942a
* Wed Dec 23 2009 Thomas Spura <tomspur@fedoraproject.org> - 1.5.1-2
626942a
- add missing BR: minimock and lockfile -> testsuite works again
626942a
- remove patch, use sed instead
626942a
5fb322f
* Wed Oct 07 2009 Luke Macken <lmacken@redhat.com> - 1.5.1-1
5fb322f
- Update to 1.5.1
5fb322f
- Remove conflicting files (#512760)
5fb322f
3918057
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-2
3918057
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
3918057
5754a77
* Wed Jun 24 2009 Kushal Das <kushal@fedoraproject.org> 1.4.6-1
5754a77
- Initial release
5754a77