Blob Blame History Raw
%global srcname pyswip

Name:           python-%{srcname}
Version:        0.2.7
Release:        1%{?dist}
Summary:        Python-SWI-Prolog bridge

License:        MIT
URL:            https://github.com/yuce/pyswip
Source0:        https://github.com/yuce/pyswip/archive/v%{version}/%{srcname}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  pl-devel
BuildRequires:  python2-devel
BuildRequires:  python3-devel
BuildRequires:  python2-pytest
BuildRequires:  python3-pytest

%description
PySWIP is a Python - SWI-Prolog bridge enabling to query SWI-Prolog in your
Python programs. It features an (incomplete) SWI-Prolog foreign language
interface, a utility class that makes it easy querying with Prolog and also a
Pythonic interface.


%package     -n python2-%{srcname}
Summary:        %summary
# we need to require pl-devel because pyswip uses the unversioned libswipl.so
Requires:       pl-devel
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
PySWIP is a Python - SWI-Prolog bridge enabling to query SWI-Prolog in your
Python programs. It features an (incomplete) SWI-Prolog foreign language
interface, a utility class that makes it easy querying with Prolog and also a
Pythonic interface.


%package     -n python3-%{srcname}
Summary:        %summary
# we need to require pl-devel because pyswip uses the unversioned libswipl.so
Requires:       pl-devel
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
PySWIP is a Python - SWI-Prolog bridge enabling to query SWI-Prolog in your
Python programs. It features an (incomplete) SWI-Prolog foreign language
interface, a utility class that makes it easy querying with Prolog and also a
Pythonic interface.


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


%build
%py2_build
%py3_build


%install
%py2_install
%py3_install


%check
pytest-2 tests
pytest-3 tests

%files -n python2-%{srcname}
%license LICENSE
%doc README.md CHANGELOG.md
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info

%files -n python3-%{srcname}
%license LICENSE
%doc README.md CHANGELOG.md
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info


%changelog
* Sat Jun 09 2018 Till Hofmann <thofmann@fedoraproject.org> - 0.2.7-1
- Update to 0.2.7

* Mon Jun 04 2018 Till Hofmann <thofmann@fedoraproject.org> - 0.2.6-1
- Update to 0.2.6

* Fri May 25 2018 Till Hofmann <thofmann@fedoraproject.org> - 0.2.5-1
- Update to 0.2.5

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

* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.3-4.git72771d9
- Escape macros in %%changelog

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

* Mon Mar 13 2017 Till Hofmann <till.hofmann@posteo.de> - 0.2.3-2.git72771d9
- Don't glob %%{python_sitelib}/* but add files separately instead

* Sun Jan 15 2017 Till Hofmann <till.hofmann@posteo.de> - 0.2.3-1.git72771d9
- Initial package