From 1305b2f09aaacea6e1364af18101bc246695ff81 Mon Sep 17 00:00:00 2001 From: alexlan Date: Apr 18 2007 06:38:32 +0000 Subject: Import FC-6 python-biopython. --- diff --git a/.cvsignore b/.cvsignore index e69de29..d73c5fe 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +biopython-1.43.tar.gz diff --git a/biopython-setup_test.patch b/biopython-setup_test.patch new file mode 100644 index 0000000..04f0489 --- /dev/null +++ b/biopython-setup_test.patch @@ -0,0 +1,65 @@ +Index: setup.py +=================================================================== +RCS file: /home/repository/biopython/biopython/setup.py,v +retrieving revision 1.116 +diff -u -p -r1.116 setup.py +--- setup.py 17 Mar 2007 19:21:04 -0000 1.116 ++++ setup.py 11 Apr 2007 03:37:48 -0000 +@@ -238,11 +238,18 @@ class test_biopython(Command): + + """ + description = "Automatically run the test suite for Biopython." +- user_options = [] # distutils complains if this is not here. +- def initialize_options(self): # distutils wants this +- pass +- def finalize_options(self): # this too ++ ++ user_options = [ ++ # provide the option to run tests in no-gui mode ++ ('no-gui', None, "Do not run in GUI mode") ++ ] ++ ++ def initialize_options(self): ++ self.no_gui = None ++ ++ def finalize_options(self): + pass ++ + def run(self): + this_dir = os.getcwd() + +@@ -250,7 +257,10 @@ class test_biopython(Command): + os.chdir("Tests") + sys.path.insert(0, '') + import run_tests +- run_tests.main([]) ++ if self.no_gui: ++ run_tests.main(['--no-gui']) ++ else: ++ run_tests.main([]) + + # change back to the current directory + os.chdir(this_dir) +Index: Tests/run_tests.py +=================================================================== +RCS file: /home/repository/biopython/biopython/Tests/run_tests.py,v +retrieving revision 1.8 +diff -u -p -r1.8 run_tests.py +--- Tests/run_tests.py 9 Mar 2007 23:36:43 -0000 1.8 ++++ Tests/run_tests.py 11 Apr 2007 03:37:48 -0000 +@@ -56,7 +56,7 @@ def main(argv): + + # get the command line options + try: +- opts, args = getopt.getopt(argv[1:], 'g', ++ opts, args = getopt.getopt(argv, 'g', + ["generate", "no-gui", "help"]) + except getopt.error, msg: + print msg +@@ -316,5 +316,5 @@ def convert_string_newlines(line): + return line + + if __name__ == "__main__": +- sys.exit(main(sys.argv)) ++ sys.exit(main(sys.argv[1:])) + diff --git a/python-biopython.spec b/python-biopython.spec new file mode 100644 index 0000000..b27c30e --- /dev/null +++ b/python-biopython.spec @@ -0,0 +1,84 @@ +%{!?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.43 +Release: 3%{?dist} +Summary: Python tools for computational molecular biology +Source0: http://biopython.org/DIST/biopython-%{version}.tar.gz +Patch0: biopython-setup_test.patch +License: Biopython License Agreement +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 + +%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 < 1.43-3 +- Use python_sitearch macro to enable x86_64 builds work. + +* Mon Apr 16 2007 Alex Lancaster 1.43-2 +- Fix Source0 URL as per suggestion from Parag AN on #235989. + +* Mon Apr 02 2007 Alex Lancaster 1.43-1 +- Initial Fedora package. + + diff --git a/sources b/sources index e69de29..d378292 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +3c275b321bb1db7d8bda764913aaedcd biopython-1.43.tar.gz