From 2c40efbc85b3a08946dcf6909111c7447b61507a Mon Sep 17 00:00:00 2001 From: Till Hofmann Date: Mar 14 2017 09:22:03 +0000 Subject: Initial import (#1413374) --- diff --git a/.gitignore b/.gitignore index e69de29..f07ce09 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pyswip-72771d9f693928f4b58394441aa4e927be8e833c.tar.gz diff --git a/python-pyswip.spec b/python-pyswip.spec new file mode 100644 index 0000000..7c58255 --- /dev/null +++ b/python-pyswip.spec @@ -0,0 +1,92 @@ +%global commit 72771d9f693928f4b58394441aa4e927be8e833c +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global checkout git%{shortcommit} +%global srcname pyswip + +Name: python-%{srcname} +Version: 0.2.3 +Release: 2.%{checkout}%{?dist} +Summary: Python-SWI-Prolog bridge + +License: MIT +URL: https://github.com/yuce/pyswip +Source0: https://github.com/yuce/pyswip/archive/%{commit}/%{srcname}-%{commit}.tar.gz + +BuildArch: noarch +BuildRequires: pl-devel +BuildRequires: python2-devel +BuildRequires: python3-devel + +%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}-%{commit} + + +%build +%py2_build +%py3_build + + +%install +%py2_install +%py3_install + + +%check +pushd test +# Python2 tests fail, see https://github.com/yuce/pyswip/issues/7 +#./runtests +./runtests3 + + +%files -n python2-%{srcname} +%license COPYING +%doc README.md CHANGELOG +%{python2_sitelib}/%{srcname} +%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info + +%files -n python3-%{srcname} +%license COPYING +%doc README.md CHANGELOG +%{python3_sitelib}/%{srcname} +%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info + + +%changelog +* Mon Mar 13 2017 Till Hofmann - 0.2.3-2.git72771d9 +- Don't glob %{python_sitelib}/* but add files separately instead + +* Sun Jan 15 2017 Till Hofmann - 0.2.3-1.git72771d9 +- Initial package diff --git a/sources b/sources index e69de29..602b69f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (pyswip-72771d9f693928f4b58394441aa4e927be8e833c.tar.gz) = a0d3337439ffbedd2c082f64b22079eddc14458335f708fabd64390b4c429c57c3c322b5c29bba1e468363d10413e1501f61d26afc1295b87a7006f0f82dd1cc