From 4e14e399b8514a476a2cc4fd7bab2dfabc4a61b4 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Feb 18 2014 02:58:29 +0000 Subject: Initial import (#1062786). --- diff --git a/.gitignore b/.gitignore index e69de29..c257470 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/openslide-python-0.5.1.tar.xz diff --git a/openslide-python.spec b/openslide-python.spec new file mode 100644 index 0000000..606650b --- /dev/null +++ b/openslide-python.spec @@ -0,0 +1,88 @@ +%if 0%{?fedora} > 12 +%global with_python3 1 +%endif + +Name: openslide-python +Version: 0.5.1 +Release: 1%{?dist} +Summary: Python bindings for the OpenSlide library + +Group: System Environment/Libraries +License: LGPLv2 +URL: http://openslide.org/ +Source0: https://github.com/openslide/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz + +BuildArch: noarch +BuildRequires: python2-devel +%if 0%{?with_python3} +BuildRequires: python3-devel +%endif # with_python3 + +Requires: openslide >= 3.4.0 +Requires: python-pillow + +%description +The OpenSlide library allows programs to access virtual slide files +regardless of the underlying image format. This package allows Python +programs to use OpenSlide. + + +%if 0%{?with_python3} +%package -n openslide-python3 +Summary: Python 3 bindings for the OpenSlide library +Requires: openslide >= 3.4.0 +Requires: python3-pillow + + +%description -n openslide-python3 +The OpenSlide library allows programs to access virtual slide files +regardless of the underlying image format. This package allows Python 3 +programs to use OpenSlide. +%endif # with_python3 + +%prep +%setup -q +# Examples include bundled jQuery and OpenSeadragon +rm -rf examples + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif # with_python3 + + +%build +%{__python2} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with_python3 + + +%install +%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +popd +%endif # with_python3 + + +%files +%doc CHANGELOG.txt LICENSE.txt lgpl-2.1.txt +%{python_sitelib}/* + + +%if 0%{?with_python3} +%files -n openslide-python3 +%doc CHANGELOG.txt LICENSE.txt lgpl-2.1.txt +%{python3_sitelib}/* +%endif # with_python3 + + +%changelog +* Tue Feb 11 2014 Benjamin Gilbert - 0.5.1-1 +- Initial version diff --git a/sources b/sources index e69de29..7f83a72 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b2f8232a67e141472aa8fa085b54e599 openslide-python-0.5.1.tar.xz