%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Name: python-biopython
Version: 1.44
Release: 1%{?dist}
Summary: Python tools for computational molecular biology
Source0: http://biopython.org/DIST/biopython-%{version}.tar.gz
Patch0: biopython-setup_test.patch
License: MIT
Url: http://www.biopython.org/
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel
BuildRequires: python-reportlab
BuildRequires: mx
BuildRequires: python-numeric
BuildRequires: MySQL-python
BuildRequires: python-psycopg
Requires: python-reportlab
Requires: mx
Requires: python-numeric
Requires: MySQL-python
Requires: python-psycopg
Requires: wise2
%description
A set of freely available Python tools for computational molecular
biology.
%prep
%setup -q -n biopython-%{version}
%patch0 -p0
# remove all execute bits from documentation and fix line endings
find Scripts -type f -exec chmod -x {} 2>/dev/null ';'
find Doc -type f -exec chmod -x {} 2>/dev/null ';'
find Doc -type f -exec sed -i 's/\r//' {} 2>/dev/null ';'
# remove execute bits from Python modules
find Bio -type f -exec chmod -x {} 2>/dev/null ';'
# remove she-bang lines in .py files to keep rpmlint happy
find Bio -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/.*$/ d' {} 2>/dev/null ';'
# answer interactive question "yes" to build Bio.KDTree
%build
env CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build <<EOF
y
EOF
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT --install-data=%{_datadir}/python-biopython <<EOF
y
EOF
## disable tests for the moment
%check
%{?_with_check:%{__python} setup.py test --no-gui || :}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Doc Scripts
%doc CONTRIB DEPRECATED LICENSE NEWS README
%dir %{python_sitearch}/Bio
%{python_sitearch}/Bio/*
%dir %{python_sitearch}/Martel
%{python_sitearch}/Martel/*
%dir %{python_sitearch}/BioSQL
%{python_sitearch}/BioSQL/*
%changelog
* Sun Oct 28 2007 Alex Lancaster <alexl@users.sourceforge.net> 1.44-1
- Update to latest upstream (1.44).
* Mon Aug 27 2007 Alex Lancaster <alexl@users.sourceforge.net> 1.43-5
- Used "MIT" as short license name as the "Biopython License
Agreement" is the same as the CMU MIT variant.
* Mon Apr 25 2007 Alex Lancaster <alexl@users.sourceforge.net> 1.43-4
- Add wise2 Requires since the Wise biopython module uses the
command-line behind-the-scenes.
* Mon Apr 17 2007 Alex Lancaster <alexl@users.sourceforge.net> 1.43-3
- Use python_sitearch macro to enable x86_64 builds work.
* Mon Apr 16 2007 Alex Lancaster <alexl@users.sourceforge.net> 1.43-2
- Fix Source0 URL as per suggestion from Parag AN on #235989.
* Mon Apr 02 2007 Alex Lancaster <alexl@users.sourceforge.net> 1.43-1
- Initial Fedora package.