the Fink project is an effort to port
popular Unix programs to Mac OS X
Info2: <<
Package: relax-py%type_pkg[python]
Version: 1.3.15
Revision: 1
Type: python (2.6 2.7)
Source: http://download.gna.org/relax/relax-%v.src.tar.bz2
Source-MD5: 74790cfd285c2437046e98d9241671cd
SourceDirectory: relax-%v
Depends: python%type_pkg[python], numpy-py%type_pkg[python], scipy-py%type_pkg[python], wxgtk2.8-py%type_pkg[python] (>= 2.8.12)
BuildDepends: python%type_pkg[python], scons, numpy-py%type_pkg[python], scipy-py%type_pkg[python], wxgtk2.8-py%type_pkg[python] (>= 2.8.12), fink (>= 0.24.12)
Conflicts: relax-py24, relax-py25, relax-py26, relax-py27
Replaces: relax-py24, relax-py25, relax-py26, relax-py27
PatchFile: relax-py.patch
PatchFile-MD5: d49015c800ac3172aa4f6a9032ad6111
PatchScript: <<
#!/bin/sh -ev
sed 's|python2.X|python%type_raw[python]|g' < %{PatchFile} |sed 's|FINK_PREFIX|%p|g' | sed 's|FINK_INSTALL_DIR|%i|g' | sed 's|relax-py2X|relax-py%type_pkg[python]|g' | patch -p1
perl -pi -e "s|'i386', 'ppc', 'x86_64'|'%m'|g" ./sconstruct
if [ "%m" == "x86_64" ] ; then
perl -pi -e "s|cflags = '-I'|cflags = '-O3 -ffast-math -funroll-loops -I'|g" ./sconstruct
perl -pi -e "s|'-bundle',|'-m64', '-bundle',|g" ./sconstruct
else
perl -pi -e "s|cflags = '-I'|cflags = '-O3 -ffast-math -funroll-loops -I'|g" ./sconstruct
perl -pi -e "s|'-bundle',|'-m32', '-bundle',|g" ./sconstruct
fi
<<
# running relax compiles the scripts
InfoTest: TestScript:./relax --test-suite;exit 0
CompileScript: <<
%p/bin/python%type_raw[python] %p/bin/scons
<<
InstallScript: <<
mkdir -p %i/lib
mkdir -p %i/bin
%p/bin/python%type_raw[python] %p/bin/scons install
/usr/bin/find %i/lib/relax-py%type_pkg[python] -name '*.pyc' -delete
/usr/bin/find %i/lib/relax-py%type_pkg[python] -name '*.pyo' -delete
rm %i/bin/relax
<<
PostInstScript: <<
update-alternatives --install %p/bin/relax relax %p/lib/relax-py%type_pkg[python]/relax %type_pkg[python]
%p/bin/python%type_raw[python] -O %p/lib/python%type_raw[python]/compileall.py -q %p/lib/relax-py%type_pkg[python]
cd %p/lib/relax-py%type_pkg[python]
perl -pi -e 's|%i|%p|g' ./sconstruct
relax --test
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
update-alternatives --remove relax %p/lib/relax-py%type_pkg[python]/relax
fi
/usr/bin/find %p/lib/relax-py%type_pkg[python] -name '*.pyc' -delete
/usr/bin/find %p/lib/relax-py%type_pkg[python] -name '*.pyo' -delete
<<
Description: Protein dynamics by NMR relax. data analysis
License: GPL
Homepage: http://www.nmr-relax.com/
Maintainer: None
<<
diff -uNr relax-1.3.14/relax relax-1.3.14.fink/relax
--- relax-1.3.14/relax 2012-03-19 12:05:34.000000000 -0400
+++ relax-1.3.14.fink/relax 2012-04-07 15:02:12.000000000 -0400
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python2.X
# Import the relax module.
import relax
diff -uNr relax-1.3.14/scons/install.py relax-1.3.14.fink/scons/install.py
--- relax-1.3.14/scons/install.py 2012-03-19 12:05:01.000000000 -0400
+++ relax-1.3.14.fink/scons/install.py 2012-04-07 15:02:12.000000000 -0400
@@ -112,8 +112,8 @@
###############
# Run relax to create the *.pyc files.
- print("\nRunning relax to create the byte-compiled *.pyc files.")
- system(env['SYMLINK'] + " --test")
+ # print("\nRunning relax to create the byte-compiled *.pyc files.")
+ # system(env['SYMLINK'] + " --test")
# Final print out.
print("\n\n\n")
diff -uNr relax-1.3.14/sconstruct relax-1.3.14.fink/sconstruct
--- relax-1.3.14/sconstruct 2012-03-19 12:05:34.000000000 -0400
+++ relax-1.3.14.fink/sconstruct 2012-04-07 15:02:12.000000000 -0400
@@ -99,7 +99,7 @@
SYS = SYSTEM
# Mac OS X installation path.
- INSTALL_PATH = sys.prefix + sep + 'local'
+ INSTALL_PATH = 'FINK_INSTALL_DIR' + sep + 'lib'
# All other operating systems.
@@ -116,10 +116,10 @@
###############
# Relax installation directory.
-RELAX_PATH = INSTALL_PATH + sep + 'relax'
+RELAX_PATH = INSTALL_PATH + sep + 'relax-py2X'
# Installation path for binaries.
-BIN_PATH = INSTALL_PATH + sep + 'bin'
+BIN_PATH = 'FINK_INSTALL_DIR' + sep + 'bin'
# Symbolic link installation path.
SYMLINK = BIN_PATH + sep + 'relax'
@@ -497,11 +497,11 @@
'relax_fit.c']
# Construct the python include path (for Python.h).
- py_include_minpath = sys.prefix + path.sep + 'include'
+ py_include_minpath = 'FINK_PREFIX' + path.sep + 'include'
py_include_fullpath = py_include_minpath + path.sep + 'python' + `sys.version_info[0]` + '.' + `sys.version_info[1]`
# Construct the python bin path.
- py_bin_minpath = sys.prefix + path.sep + 'bin'
+ py_bin_minpath = 'FINK_PREFIX' + path.sep + 'bin'
py_bin_fullpath = py_bin_minpath + path.sep + 'python' + `sys.version_info[0]` + '.' + `sys.version_info[1]`
# Get the numpy include path (for numpy/arrayobject.h).
--- 1.3/info.py 2012/04/30 18:52:39 15862
+++ 1.3/info.py 2012/05/02 09:11:09 15863
@@ -436,6 +436,33 @@
except:
path.append('')
+ # XML.
+ package.append('xml')
+ try:
+ import xml
+ status.append(True)
+ except:
+ status.append(False)
+ try:
+ version.append(xml.__version__)
+ path.append(xml.__file__)
+ except:
+ version.append('')
+ path.append('')
+
+ # XML minidom.
+ package.append('xml.dom.minidom')
+ version.append('')
+ try:
+ import xml.dom.minidom
+ status.append(True)
+ except:
+ status.append(False)
+ try:
+ path.append(xml.dom.minidom.__file__)
+ except:
+ path.append('')
+
# Format the data.
fmt_package = "%%-%ss" % (self.format_max_width(package) + 2)
fmt_status = "%%-%ss" % (self.format_max_width(status) + 2)
--- 1.3/info.py 2012/05/02 09:11:09 15863
+++ 1.3/info.py 2012/05/02 09:16:55 15864
@@ -443,11 +443,13 @@
status.append(True)
except:
status.append(False)
- try:
+ if status[-1] and hasattr(xml, '__version__'):
version.append(xml.__version__)
- path.append(xml.__file__)
- except:
+ else:
version.append('')
+ if status[-1] and hasattr(xml, '__file__'):
+ path.append(xml.__file__)
+ else:
path.append('')
# XML minidom.
--- 1.3/dep_check.py 2012/05/02 09:16:55 15864
+++ 1.3/dep_check.py 2012/05/02 09:42:43 15865
@@ -1,6 +1,6 @@
###############################################################################
# #
-# Copyright (C) 2008-2010 Edward d'Auvergne #
+# Copyright (C) 2008-2012 Edward d'Auvergne #
# #
# This file is part of the program relax. #
# #
@@ -173,6 +173,25 @@
except ImportError, message:
pymol_module = False
+# XML.
+try:
+ import xml
+ xml_module = True
+except ImportError, message:
+ xml_module = False
+if xml_module:
+ # The XML version mess!
+ if hasattr(xml, '_MINIMUM_XMLPLUS_VERSION'):
+ xml_version = "%s.%s.%s" % xml._MINIMUM_XMLPLUS_VERSION
+ xml_type = 'internal'
+ elif hasattr(xml, '__version__'):
+ xml_version = xml.__version__
+ xml_type = 'PyXML'
+ else:
+ xml_version = ''
+ xml_type = ''
+
+
# Compiled C modules.
#####################
--- 1.3/info.py 2012/05/02 09:42:43 15865
+++ 1.3/info.py 2012/05/02 09:43:09 15866
@@ -438,18 +438,12 @@
# XML.
package.append('xml')
- try:
- import xml
- status.append(True)
- except:
- status.append(False)
- if status[-1] and hasattr(xml, '__version__'):
- version.append(xml.__version__)
+ status.append(dep_check.xml_module)
+ if dep_check.xml_module:
+ version.append("%s (%s)" % (dep_check.xml_version, dep_check.xml_type))
+ path.append(dep_check.xml.__file__)
else:
version.append('')
- if status[-1] and hasattr(xml, '__file__'):
- path.append(xml.__file__)
- else:
path.append('')
# XML minidom.
--- 1.3/test_suite/system_tests/model_free.py 2012/05/02 09:43:09 15866
+++ 1.3/test_suite/system_tests/model_free.py 2012/05/02 09:46:30 15867
@@ -32,6 +32,7 @@
# relax module imports.
from base_classes import SystemTestCase
from data import Relax_data_store; ds = Relax_data_store()
+import dep_check
from generic_fns import pipes
from generic_fns.mol_res_spin import spin_loop
from physical_constants import N15_CSA, NH_BOND_LENGTH
@@ -2502,7 +2503,7 @@
# Read the 1.3 results file, extract the data, then close it again.
a, b, c = platform.python_version_tuple()
- if int(a) >= 2 and int(b) >= 7 and int(c) >= 3:
+ if dep_check.xml_type == 'internal' and int(a) >= 2 and int(b) >= 7 and int(c) >= 3:
file = open_read_file(file_name='final_results_trunc_1.3_new', dir=path)
else:
file = open_read_file(file_name='final_results_trunc_1.3', dir=path)