Blob Blame History Raw
%global srcname astral

Name:           python-%{srcname}
Version:        1.6.1
Release:        1%{?dist}
Summary:        Calculations for the position of the sun and moon

License:        ASL 2.0
URL:            http://astral.readthedocs.io
Source0:        https://github.com/sffjunkie/astral/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python3-devel
BuildRequires:  pytz
BuildRequires:  python3-pytz
BuildRequires:  python2-pytest
BuildRequires:  python3-pytest

%description
astral is a Python module which calculates including:

- Times for various positions of the sun: dawn, sunrise, solar noon,
  sunset, dusk, solar elevation, solar azimuth and rahukaalam.
- The phase of the moon.

%package -n python2-%{srcname}
Summary:        %{summary}
Requires:       pytz
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
astral is a Python module which calculates including:

- Times for various positions of the sun: dawn, sunrise, solar noon,
  sunset, dusk, solar elevation, solar azimuth and rahukaalam.
- The phase of the moon.

%package -n python3-%{srcname}
Summary:        %{summary}
Requires:       python3-pytz
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
astral is a Python module which calculates including:

- Times for various positions of the sun: dawn, sunrise, solar noon,
  sunset, dusk, solar elevation, solar azimuth and rahukaalam.
- The phase of the moon.

%prep
%autosetup -n %{srcname}-%{version}
sed -i "s|\r||g" README.rst

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

#%check
#pushd src/test
#PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -m "not webtest"
#PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -m "not webtest and not py2only"
#popd

%files -n python2-%{srcname}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{srcname}.py*
%{python2_sitelib}/%{srcname}*.egg-info

%files -n python3-%{srcname}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{srcname}.py*
%{python3_sitelib}/%{srcname}*.egg-info
%{python3_sitelib}/__pycache__/*

%changelog
* Fri May 04 2018 Fabian Affolter <mail@fabian-affolter.ch> - 1.6.1-1
- Update to latest upstream release 1.6.1 (rhbz#1574748)

* Fri Feb 23 2018 Fabian Affolter <mail@fabian-affolter.ch> - 1.6-1
- Update to latest upstream release 1.6

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Jan 29 2018 Fabian Affolter <mail@fabian-affolter.ch> - 1.5-1
- Update to latest upstream release 1.5

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sun Mar 12 2017 Fabian Affolter <mail@fabian-affolter.ch> - 1.4-1
- Update to latest upstream release 1.4

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Sun Feb 05 2017 Fabian Affolter <mail@fabian-affolter.ch> - 1.3.4-1
- Update to latest upstream release 1.3.4

* Sat Jan 21 2017 Fabian Affolter <mail@fabian-affolter.ch> - 1.3.3-1
- Update to latest upstream release 1.3.3

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.3.2-3
- Rebuild for Python 3.6

* Mon Nov 21 2016 Fabian Affolter <mail@fabian-affolter.ch> - 1.3.2-2
- Add license to py2 as well
- Update variable

* Mon Nov 21 2016 Fabian Affolter <mail@fabian-affolter.ch> - 1.3.2-1
- Add license file
- Run test without third party interaction
- Update to latest upstream release 1.3.2

* Mon Nov 14 2016 Fabian Affolter <mail@fabian-affolter.ch> - 2.7.0-1
- Initial version