Blob Blame History Raw
%global srcname snuggs

Name:           python-%{srcname}
Version:        1.4.3
Release:        1%{?dist}
Summary:        Snuggs are S-expressions for Numpy

License:        MIT
URL:            https://github.com/mapbox/snuggs
Source0:        %pypi_source

BuildArch:      noarch

%global _description \
Snuggs are S-expressions for NumPy. Snuggs wraps NumPy in expressions with the \
following syntax: expression "(" (operator | function) *arg ")" where \
arg = expression | name | number | string

%description %{_description}


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

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python2-pytest
BuildRequires:  python2-click
BuildRequires:  python2-numpy
BuildRequires:  python2-pyparsing

Requires:       python2-click
Requires:       python2-numpy
Requires:       python2-pyparsing

%description -n python2-%{srcname} %{_description}


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

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pytest
BuildRequires:  python3-click
BuildRequires:  python3-numpy
BuildRequires:  python3-pyparsing

Requires:       python3-click
Requires:       python3-numpy
Requires:       python3-pyparsing
%description -n python3-%{srcname} %{_description}


%prep
%autosetup -n %{srcname}-%{version}

# Remove bundled egg-info
rm -rf %{srcname}.egg-info PKG-INFO


%build
%py2_build
%py3_build


%install
%py2_install
%py3_install


%check
pytest-3 -v
pytest-2 -v


%files -n python2-%{srcname}
%doc README.rst AUTHORS.txt CHANGES.txt
%license LICENSE
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info

%files -n python3-%{srcname}
%doc README.rst AUTHORS.txt CHANGES.txt
%license LICENSE
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info


%changelog
* Mon Feb 25 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.3-1
- Update to latest version

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 1.4.2-2
- Rebuilt for Python 3.7

* Thu Jun 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-1
- Update to latest version

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

* Sat Jan 13 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.1-1
- Initial package.