01fc1b7
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
01fc1b7
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
01fc1b7
01fc1b7
Name:             python-biopython
dd04c42
Version:          1.54
81148ac
Release:          1%{?dist}
01fc1b7
Summary:          Python tools for computational molecular biology
01fc1b7
Source0:          http://biopython.org/DIST/biopython-%{version}.tar.gz
81148ac
Patch0:           python-biopython-1.51-enable-flex.patch
4fe6601
License:          MIT
01fc1b7
Url:              http://www.biopython.org/
01fc1b7
Group:            Development/Libraries
01fc1b7
BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
01fc1b7
BuildRequires:    python-devel
81148ac
BuildRequires:    flex
01fc1b7
BuildRequires:    python-reportlab
0eb813a
BuildRequires:    numpy
01fc1b7
BuildRequires:    MySQL-python
0eb813a
BuildRequires:    python-psycopg2
01fc1b7
Requires:         python-reportlab
0eb813a
Requires:         numpy
01fc1b7
Requires:         MySQL-python
0eb813a
Requires:         python-psycopg2
3e49d58
Requires:         wise2
01fc1b7
01fc1b7
%description
01fc1b7
A set of freely available Python tools for computational molecular
01fc1b7
biology.
01fc1b7
01fc1b7
%prep
01fc1b7
%setup -q -n biopython-%{version}
81148ac
# enable build of Bio.PDB.mmCIF.MMCIFlex (requires flex)
81148ac
%patch0 -p0
01fc1b7
01fc1b7
# remove all execute bits from documentation and fix line endings
01fc1b7
find Scripts -type f -exec chmod -x {} 2>/dev/null ';'
01fc1b7
find Doc -type f -exec chmod -x {} 2>/dev/null ';'
01fc1b7
find Doc -type f -exec sed -i 's/\r//' {} 2>/dev/null ';'
01fc1b7
01fc1b7
# remove execute bits from Python modules
01fc1b7
find Bio -type f -exec chmod -x {} 2>/dev/null ';'
01fc1b7
# remove she-bang lines in .py files to keep rpmlint happy
01fc1b7
find Bio -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/.*$/ d' {} 2>/dev/null ';'
01fc1b7
01fc1b7
%build
0eb813a
env CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
01fc1b7
01fc1b7
%install
01fc1b7
rm -rf $RPM_BUILD_ROOT
0eb813a
%{__python} setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT --install-data=%{_datadir}/python-biopython
01fc1b7
01fc1b7
## disable tests for the moment
01fc1b7
%check
01fc1b7
%{?_with_check:%{__python} setup.py test --no-gui || :}
01fc1b7
01fc1b7
%clean
01fc1b7
rm -rf $RPM_BUILD_ROOT
01fc1b7
01fc1b7
%files
01fc1b7
%defattr(-,root,root,-)
01fc1b7
%doc Doc Scripts
01fc1b7
%doc CONTRIB DEPRECATED LICENSE NEWS README
1ee5433
%if 0%{?fedora} >= 9
1ee5433
%{python_sitearch}/*egg-info
1ee5433
%endif
5ec6566
%dir %{python_sitearch}/Bio
5ec6566
%{python_sitearch}/Bio/*
5ec6566
%dir %{python_sitearch}/BioSQL
5ec6566
%{python_sitearch}/BioSQL/*
01fc1b7
01fc1b7
%changelog
dd04c42
* Fri May 21 2010 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.54-1
dd04c42
- Update to upstream 1.54
dd04c42
dd04c42
* Tue Apr  6 2010 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.54-0.1.b
dd04c42
- Update to 1.54 beta
dd04c42
63e33f6
* Tue Dec 15 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.53-1
63e33f6
- Update to upstream 1.53
63e33f6
32835cf
* Thu Oct 15 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.52-1
32835cf
- Update to latest upstream (1.52)
32835cf
81148ac
* Tue Aug 18 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.51-1
81148ac
- Update to upstream 1.51
81148ac
- Drop mx {Build}Requires, no longer used upstream
81148ac
- Remove Martel modules, no longer distributed upstream
81148ac
- Add flex to BuildRequires, patch setup to build
81148ac
  Bio.PDB.mmCIF.MMCIFlex as per upstream:
81148ac
  http://bugzilla.open-bio.org/show_bug.cgi?id=2619
81148ac
9be8571
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.49-3
9be8571
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
9be8571
6f9b02e
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.49-2
6f9b02e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6f9b02e
0eb813a
* Mon Dec  1 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.49-1
0eb813a
- Update to latest upstream (1.49) uses numpy and new API for psycopg2
0eb813a
- [Build]Requires python-numeric -> numpy 
0eb813a
- [Build]Requires python-psycopg -> python-psycopg2
0eb813a
- Remove interactive question hack, no longer needed
0eb813a
72d1d93
* Sun Nov 30 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.48-3
72d1d93
- Temporarily disable python-psycopg dependency until it is rebuilt
72d1d93
  for Python 2.6
72d1d93
bfa6725
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.48-2
bfa6725
- Rebuild for Python 2.6
bfa6725
c6c3d03
* Mon Sep 29 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.48-1
c6c3d03
- Update to latest upstream (1.48)
c6c3d03
dd62f71
* Fri Jul  4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.47-1
dd62f71
- Update to latest upstream (1.47)
dd62f71
9f01ebf
* Sun Mar 23 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.45-1
9f01ebf
- Update to latest upstream (1.45)
9f01ebf
fe75157
* Sat Feb  9 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 1.44-4
fe75157
- rebuilt for GCC 4.3 as requested by Fedora Release Engineering
fe75157
1ee5433
* Thu Dec 13 2007 Alex Lancaster <alexlan[AT]fedoraproject.org> 1.44-3
1ee5433
- Include eggs in file list for F9+
1ee5433
1ee5433
* Sun Oct 28 2007 Alex Lancaster <alexlan[AT]fedoraproject.org> 1.44-2
89847d0
- Drop patch to setup.py, applied upstream
89847d0
1ee5433
* Sun Oct 28 2007 Alex Lancaster <alexlan[AT]fedoraproject.org> 1.44-1
3757f16
- Update to latest upstream (1.44).
3757f16
1ee5433
* Mon Aug 27 2007 Alex Lancaster <alexlan[AT]fedoraproject.org> 1.43-5
4fe6601
- Used "MIT" as short license name as the "Biopython License
4fe6601
  Agreement" is the same as the CMU MIT variant.
4fe6601
1ee5433
* Mon Apr 25 2007 Alex Lancaster <alexlan[AT]fedoraproject.org> 1.43-4
3e49d58
- Add wise2 Requires since the Wise biopython module uses the
3e49d58
  command-line behind-the-scenes.
3e49d58
1ee5433
* Mon Apr 17 2007 Alex Lancaster <alexlan[AT]fedoraproject.org> 1.43-3
5ec6566
- Use python_sitearch macro to enable x86_64 builds work.
5ec6566
1ee5433
* Mon Apr 16 2007 Alex Lancaster <alexlan[AT]fedoraproject.org> 1.43-2
01fc1b7
- Fix Source0 URL as per suggestion from Parag AN on #235989.
01fc1b7
1ee5433
* Mon Apr 02 2007 Alex Lancaster <alexlan[AT]fedoraproject.org> 1.43-1
01fc1b7
- Initial Fedora package.
01fc1b7
01fc1b7