[12472] | 1 | %global srcname pid |
---|
| 2 | |
---|
| 3 | %global common_description %{expand: |
---|
| 4 | pid provides a PidFile class that manages PID files. PidFile features: |
---|
| 5 | - stale detection |
---|
| 6 | - locking using fcntl |
---|
| 7 | - chmod (default is 0o644) |
---|
| 8 | - chown |
---|
| 9 | - custom exceptions |
---|
| 10 | |
---|
| 11 | PidFile can also be used as a context manager or a decorator.} |
---|
| 12 | |
---|
| 13 | %bcond_with python2 |
---|
| 14 | # nose is too old |
---|
| 15 | %bcond_with python2_tests |
---|
| 16 | |
---|
| 17 | %bcond_without python3 |
---|
| 18 | %bcond_with python3_tests |
---|
| 19 | |
---|
| 20 | Name: python-%{srcname} |
---|
| 21 | Version: 3.0.4 |
---|
| 22 | Release: 1%{?_dist_release} |
---|
| 23 | Summary: PID file management library |
---|
| 24 | Group: programming |
---|
| 25 | Vendor: Project Vine |
---|
| 26 | Distribution: Vine Linux |
---|
| 27 | |
---|
| 28 | License: ASL 2.0 |
---|
| 29 | URL: https://github.com/trbs/pid |
---|
| 30 | Source0: https://github.com/trbs/pid/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz |
---|
| 31 | |
---|
| 32 | BuildArch: noarch |
---|
| 33 | |
---|
| 34 | %description %{common_description} |
---|
| 35 | |
---|
| 36 | %if %{with python2} |
---|
| 37 | BuildRequires: python-devel |
---|
| 38 | BuildRequires: python-setuptools |
---|
| 39 | BuildRequires: python-rpm-macros |
---|
| 40 | %if %{with python2_tests} |
---|
| 41 | BuildRequires: python-nose >= 1.0 |
---|
| 42 | BuildRequires: python-mock |
---|
| 43 | %endif |
---|
| 44 | |
---|
| 45 | %{?python_provide:%python_provide python2-%{srcname}} |
---|
| 46 | |
---|
| 47 | %endif |
---|
| 48 | |
---|
| 49 | %if %{with python3} |
---|
| 50 | %package -n python3-%{srcname} |
---|
| 51 | Summary: %{summary} |
---|
| 52 | Group: programming |
---|
| 53 | |
---|
| 54 | BuildRequires: python3-devel |
---|
| 55 | BuildRequires: python3-setuptools |
---|
| 56 | BuildRequires: python3-rpm-macros |
---|
| 57 | %if %{with python3_tests} |
---|
| 58 | BuildRequires: python3-nose >= 1.0 |
---|
| 59 | %endif |
---|
| 60 | |
---|
| 61 | %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} |
---|
| 62 | |
---|
| 63 | %description -n python%{python3_pkgversion}-%{srcname} %{common_description} |
---|
| 64 | %endif |
---|
| 65 | |
---|
| 66 | %prep |
---|
| 67 | # This needs to have a blank line after because of a bug in the EL6 macros |
---|
| 68 | %autosetup -p1 -n %{srcname}-%{version} |
---|
| 69 | |
---|
| 70 | rm -rf %{srcname}.egg-info |
---|
| 71 | |
---|
| 72 | %build |
---|
| 73 | %if %{with python2} |
---|
| 74 | %py_build |
---|
| 75 | %endif |
---|
| 76 | %if %{with python3} |
---|
| 77 | %py3_build |
---|
| 78 | %endif |
---|
| 79 | |
---|
| 80 | %install |
---|
| 81 | %if %{with python2} |
---|
| 82 | %py_install |
---|
| 83 | %endif |
---|
| 84 | %if %{with python3} |
---|
| 85 | %py3_install |
---|
| 86 | %endif |
---|
| 87 | |
---|
| 88 | %check |
---|
| 89 | %if %{with python2_tests} |
---|
| 90 | PYTHONPATH=%{buildroot}%{python_sitelib} nosetests-%{python_version} --verbose |
---|
| 91 | %endif |
---|
| 92 | %if %{with python3_tests} |
---|
| 93 | PYTHONPATH=%{buildroot}%{python3_sitelib} nosetests-%{python3_version} --verbose |
---|
| 94 | %endif |
---|
| 95 | |
---|
| 96 | %if %{with python2} |
---|
| 97 | %files |
---|
| 98 | %license LICENSE |
---|
| 99 | %doc AUTHORS CHANGELOG README.rst |
---|
| 100 | %{python_sitelib}/%{srcname} |
---|
| 101 | %{python_sitelib}/%{srcname}-%{version}-*.egg-info |
---|
| 102 | %endif |
---|
| 103 | |
---|
| 104 | %if %{with python3} |
---|
| 105 | %files -n python%{python3_pkgversion}-%{srcname} |
---|
| 106 | %license LICENSE |
---|
| 107 | %doc AUTHORS CHANGELOG README.rst |
---|
| 108 | %{python3_sitelib}/%{srcname} |
---|
| 109 | %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info |
---|
| 110 | %endif |
---|
| 111 | |
---|
| 112 | %changelog |
---|
| 113 | * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.4-1 |
---|
| 114 | - new upstream release. |
---|
| 115 | |
---|
| 116 | * Mon Sep 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.2.3-5 |
---|
| 117 | - initial build for Vine Linux. |
---|
| 118 | |
---|
| 119 | * Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 2.2.3-4 |
---|
| 120 | - Rebuilt for Python 3.8 |
---|
| 121 | |
---|
| 122 | * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-3 |
---|
| 123 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
---|
| 124 | |
---|
| 125 | * Fri Mar 08 2019 Troy Dawson <tdawson@redhat.com> - 2.2.3-2 |
---|
| 126 | - Rebuilt to change main python from 3.4 to 3.6 |
---|
| 127 | |
---|
| 128 | * Tue Mar 05 2019 Carl George <carl@george.computer> - 2.2.3-1 |
---|
| 129 | - Latest upstream |
---|
| 130 | - Build python3 subpackage on el6 |
---|
| 131 | - Run tests correctly |
---|
| 132 | |
---|
| 133 | * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-10 |
---|
| 134 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
---|
| 135 | |
---|
| 136 | * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-9 |
---|
| 137 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
---|
| 138 | |
---|
| 139 | * Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.1.1-8 |
---|
| 140 | - Rebuilt for Python 3.7 |
---|
| 141 | |
---|
| 142 | * Thu Mar 22 2018 David Shea <dshea@redhat.com> - 2.1.1-7 |
---|
| 143 | - Remove the python2 package |
---|
| 144 | |
---|
| 145 | * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-6 |
---|
| 146 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
---|
| 147 | |
---|
| 148 | * Sat Jan 27 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.1.1-5 |
---|
| 149 | - Update Python 2 dependency declarations to new packaging standards |
---|
| 150 | (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) |
---|
| 151 | |
---|
| 152 | * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-4 |
---|
| 153 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild |
---|
| 154 | |
---|
| 155 | * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-3 |
---|
| 156 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild |
---|
| 157 | |
---|
| 158 | * Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 2.1.1-2 |
---|
| 159 | - Rebuild for Python 3.6 |
---|
| 160 | |
---|
| 161 | * Tue Nov 29 2016 David Shea <dshea@redhat.com> - 2.1.1-1 |
---|
| 162 | - Update to 2.1.1, which adds an optional allow_samepid parameter |
---|
| 163 | |
---|
| 164 | * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-5 |
---|
| 165 | - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages |
---|
| 166 | |
---|
| 167 | * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-4 |
---|
| 168 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild |
---|
| 169 | |
---|
| 170 | * Tue Nov 03 2015 Robert Kuska <rkuska@redhat.com> - 2.0.1-3 |
---|
| 171 | - Rebuilt for Python3.5 rebuild |
---|
| 172 | |
---|
| 173 | * Wed Aug 05 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.0.1-2 |
---|
| 174 | - Update to modern python packaging guidelines |
---|
| 175 | |
---|
| 176 | * Tue Aug 4 2015 David Shea <dshea@redhat.com> - 2.0.1-1 |
---|
| 177 | - Initial package |
---|