[med-svn] [partitionfinder] 08/13: Add patch to fix path lookups

Kevin Murray daube-guest at moszumanska.debian.org
Sat Feb 6 19:45:46 UTC 2016


This is an automated email from the git hooks/post-receive script.

daube-guest pushed a commit to branch master
in repository partitionfinder.

commit 8fd99a7e927cf243b0a56e71307f940de8589421
Author: Kevin Murray <spam at kdmurray.id.au>
Date:   Sat Feb 6 14:11:04 2016 +0100

    Add patch to fix path lookups
    
    remove unused patch and use python as executor of scripts
---
 debian/PartitionFinder                             |  2 +-
 debian/PartitionFinderProtein                      |  2 +-
 .../0001-Add-crunchbangs-and-chmod-x-scripts.patch | 33 ---------------
 ...-raxml-path-locate-binaries-under-usr-bin.patch | 49 ++++++++++++++++++++++
 debian/patches/series                              |  2 +-
 5 files changed, 52 insertions(+), 36 deletions(-)

diff --git a/debian/PartitionFinder b/debian/PartitionFinder
index 70e072c..0b399a9 100644
--- a/debian/PartitionFinder
+++ b/debian/PartitionFinder
@@ -1,3 +1,3 @@
 #!/bin/sh -e
 
-PYTHONPATH=/USRLIB/partitionfiner /USRLIB/partitionfinder/PartitionFinder.py $@
+PYTHONPATH=/USRLIB/partitionfiner python /USRLIB/partitionfinder/PartitionFinder.py $@
diff --git a/debian/PartitionFinderProtein b/debian/PartitionFinderProtein
index 6477627..ade91e9 100644
--- a/debian/PartitionFinderProtein
+++ b/debian/PartitionFinderProtein
@@ -1,3 +1,3 @@
 #!/bin/sh -e
 
-PYTHONPATH=/USRLIB/partitionfiner /USRLIB/partitionfinder/PartitionFinderProtein.py $@
+PYTHONPATH=/USRLIB/partitionfiner python /USRLIB/partitionfinder/PartitionFinderProtein.py $@
diff --git a/debian/patches/0001-Add-crunchbangs-and-chmod-x-scripts.patch b/debian/patches/0001-Add-crunchbangs-and-chmod-x-scripts.patch
deleted file mode 100644
index 3246a1f..0000000
--- a/debian/patches/0001-Add-crunchbangs-and-chmod-x-scripts.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Kevin Murray <spam at kdmurray.id.au>
-Date: Tue, 10 Nov 2015 20:34:26 +1100
-Subject: Add crunchbangs and chmod +x scripts
-
----
- PartitionFinder.py        | 1 +
- PartitionFinderProtein.py | 1 +
- 2 files changed, 2 insertions(+)
- mode change 100644 => 100755 PartitionFinder.py
- mode change 100644 => 100755 PartitionFinderProtein.py
-
-diff --git a/PartitionFinder.py b/PartitionFinder.py
-old mode 100644
-new mode 100755
-index 6ef5fbc..f83508a
---- a/PartitionFinder.py
-+++ b/PartitionFinder.py
-@@ -1,3 +1,4 @@
-+#!/usr/bin/python2.7
- # Copyright (C) 2012 Robert Lanfear and Brett Calcott
- #
- # This program is free software: you can redistribute it and/or modify it under
-diff --git a/PartitionFinderProtein.py b/PartitionFinderProtein.py
-old mode 100644
-new mode 100755
-index 2c5517d..27fb759
---- a/PartitionFinderProtein.py
-+++ b/PartitionFinderProtein.py
-@@ -1,3 +1,4 @@
-+#!/usr/bin/python2.7
- # Copyright (C) 2012 Robert Lanfear and Brett Calcott
- #
- # This program is free software: you can redistribute it and/or modify it under
diff --git a/debian/patches/0001-Fix-raxml-path-locate-binaries-under-usr-bin.patch b/debian/patches/0001-Fix-raxml-path-locate-binaries-under-usr-bin.patch
new file mode 100644
index 0000000..8a7de02
--- /dev/null
+++ b/debian/patches/0001-Fix-raxml-path-locate-binaries-under-usr-bin.patch
@@ -0,0 +1,49 @@
+From: Kevin Murray <spam at kdmurray.id.au>
+Date: Sat, 6 Feb 2016 14:09:43 +0100
+Subject: Fix raxml path, locate binaries under /usr/bin
+
+---
+ partfinder/raxml.py |  2 +-
+ partfinder/util.py  | 16 ++--------------
+ 2 files changed, 3 insertions(+), 15 deletions(-)
+
+diff --git a/partfinder/raxml.py b/partfinder/raxml.py
+index a3edb93..364240e 100644
+--- a/partfinder/raxml.py
++++ b/partfinder/raxml.py
+@@ -37,7 +37,7 @@ _dna_letters = "ATCG"
+ # This is set as the binary name because the previously compiled raxml had a
+ # bug when calculating site likelihoods, this needs to be changed back to
+ # "raxml" once a newer version without the bug is compiled.
+-_binary_name = 'raxml'
++_binary_name = 'raxmlHPC'
+ if sys.platform == 'win32':
+     _binary_name += ".exe"
+ _raxml_binary = None
+diff --git a/partfinder/util.py b/partfinder/util.py
+index 834b251..81b3b4c 100644
+--- a/partfinder/util.py
++++ b/partfinder/util.py
+@@ -47,20 +47,8 @@ your alignment. Please check and try again.
+ 
+ def find_program(binary_name):
+     """Locate the binary ..."""
+-    pth = os.path.abspath(__file__)
+-
+-    # Split off the name and the directory...
+-    pth, notused = os.path.split(pth)
+-    pth, notused = os.path.split(pth)
+-    pth = os.path.join(pth, "programs", binary_name)
+-    pth = os.path.normpath(pth)
+-
+-    log.debug("Checking for program %s", binary_name)
+-    if not os.path.exists(pth) or not os.path.isfile(pth):
+-        log.error("No such file: '%s'", pth)
+-        raise PartitionFinderError
+-    log.debug("Found program %s at '%s'", binary_name, pth)
+-    return pth
++    # No, this is Debian. We know where the binary is.
++    return os.path.join('/usr/bin', binary_name)
+ 
+ 
+ def run_program(binary, command):
diff --git a/debian/patches/series b/debian/patches/series
index 8ad3202..b712fb0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-0001-Add-crunchbangs-and-chmod-x-scripts.patch
+0001-Fix-raxml-path-locate-binaries-under-usr-bin.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/partitionfinder.git



More information about the debian-med-commit mailing list