064f5dc
%global pypi_name monotonic
064f5dc
064f5dc
%if 0%{?fedora}
064f5dc
%global with_python3 1
064f5dc
%endif
064f5dc
064f5dc
Name:           python-%{pypi_name}
Alan Pevec b1463a3
Version:        0.5
2dad8d2
Release:        2%{?dist}
064f5dc
Summary:        An implementation of time.monotonic() for Python 2 & < 3.3
064f5dc
064f5dc
# Missing license file from source package
064f5dc
# https://github.com/atdt/monotonic/pull/4
064f5dc
License:        ASL 2.0
064f5dc
URL:            https://github.com/atdt/%{pypi_name}
064f5dc
Source0:        https://pypi.python.org/packages/source/m/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
064f5dc
BuildArch:      noarch
064f5dc
 
064f5dc
BuildRequires:  python2-devel
064f5dc
BuildRequires:  python-setuptools
064f5dc
064f5dc
064f5dc
%description
064f5dc
This module provides a ``monotonic()`` function which
064f5dc
returns the
064f5dc
value (in fractional seconds) of a clock which never goes
064f5dc
backwards.
064f5dc
064f5dc
On Python 3.3 or newer, ``monotonic`` will be an alias of
064f5dc
``time.monotonic`` from the standard library. On older versions,
Alan Pevec f2b954c
it will fall back to an equivalent platform specific implementation.
064f5dc
064f5dc
8d4ae88
%if 0%{?with_python3}
064f5dc
%package -n python3-%{pypi_name}
064f5dc
Summary:        An implementation of time.monotonic() for Python 2 & < 3.3
064f5dc
064f5dc
BuildRequires:  python3-devel
064f5dc
BuildRequires:  python3-setuptools
064f5dc
064f5dc
%description -n python3-%{pypi_name}
064f5dc
This module provides a ``monotonic()`` function which
064f5dc
returns the
064f5dc
value (in fractional seconds) of a clock which never goes
064f5dc
backwards.
064f5dc
064f5dc
On Python 3.3 or newer, ``monotonic`` will be an alias of
064f5dc
``time.monotonic`` from the standard library. On older versions,
Alan Pevec f2b954c
it will fall back to an equivalent platform specific implementation.
064f5dc
%endif
064f5dc
064f5dc
064f5dc
%prep
064f5dc
%setup -q -n %{pypi_name}-%{version}
064f5dc
# Remove bundled egg-info
064f5dc
rm -rf %{pypi_name}.egg-info
064f5dc
064f5dc
%if 0%{?with_python3}
064f5dc
rm -rf %{py3dir}
064f5dc
cp -a . %{py3dir}
064f5dc
%endif
064f5dc
064f5dc
064f5dc
%build
064f5dc
%{__python2} setup.py build
064f5dc
8d4ae88
%if 0%{?with_python3}
064f5dc
pushd %{py3dir}
064f5dc
%{__python3} setup.py build
064f5dc
popd
064f5dc
%endif
064f5dc
064f5dc
064f5dc
%install
064f5dc
%{__python2} setup.py install --skip-build --root %{buildroot}
064f5dc
8d4ae88
%if 0%{?with_python3}
064f5dc
pushd %{py3dir}
064f5dc
%{__python3} setup.py install --skip-build --root %{buildroot}
064f5dc
popd
064f5dc
%endif
064f5dc
064f5dc
064f5dc
%files
064f5dc
#%license LICENSE
064f5dc
%{python2_sitelib}/%{pypi_name}.py*
064f5dc
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
064f5dc
8d4ae88
%if 0%{?with_python3}
064f5dc
%files -n python3-%{pypi_name}
064f5dc
#%license LICENSE
064f5dc
%{python3_sitelib}/__pycache__/%{pypi_name}.*
064f5dc
%{python3_sitelib}/%{pypi_name}.py
064f5dc
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
064f5dc
%endif
064f5dc
064f5dc
%changelog
2dad8d2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-2
2dad8d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2dad8d2
Alan Pevec b1463a3
* Tue Jan 19 2016 Alan Pevec <alan.pevec@redhat.com> 0.5-1
Alan Pevec b1463a3
- Update to 0.5
Alan Pevec b1463a3
c8cb890
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-2
c8cb890
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
c8cb890
Alan Pevec ac3c960
* Tue Aug 18 2015 Alan Pevec <alan.pevec@redhat.com> 0.3-1
Alan Pevec ac3c960
- Update to upstream 0.3
Alan Pevec ac3c960
064f5dc
* Thu Jun 18 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.1-1
064f5dc
- Initial package