~ubuntu-branches/ubuntu/trusty/qiime/trusty

« back to all changes in this revision

Viewing changes to debian/patches/fix_path_for_support_files

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2013-06-17 18:28:26 UTC
  • mfrom: (9.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20130617182826-376az5ad080a0sfe
Tags: 1.7.0+dfsg-1
Upload preparations done for BioLinux to Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Get QIIME to look in the right directory for support_files.
2
 
The default location is relative to the script which is
3
 
in a different location depending on the python version.
4
 
Author: Tim Booth <tbooth@ceh.ac.uk>
5
 
 
6
 
---
7
 
The information above should follow the Patch Tagging Guidelines, please
8
 
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
9
 
are templates for supplementary fields that you might want to add:
10
 
 
11
 
Origin: <vendor|upstream|other>, <url of original patch>
12
 
Bug: <url in upstream bugtracker>
13
 
Bug-Debian: http://bugs.debian.org/<bugnumber>
14
 
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
15
 
Forwarded: <no|not-needed|url proving that it has been forwarded>
16
 
Reviewed-By: <name and email of someone who approved the patch>
17
 
Last-Update: <YYYY-MM-DD>
18
 
 
19
 
--- qiime-1.5.0+repack.orig/scripts/plot_taxa_summary.py
20
 
+++ qiime-1.5.0+repack/scripts/plot_taxa_summary.py
21
 
@@ -219,8 +219,7 @@ def main():
22
 
         pass
23
 
         
24
 
     # move javascript file to javascript output directory
25
 
-    shutil.copyfile(os.path.join(qiime_dir,'qiime','support_files',\
26
 
-                    'js/overlib.js'),\
27
 
+    shutil.copyfile('/usr/lib/qiime/support_files/js/overlib.js',\
28
 
                     os.path.join(javascript_path,'overlib.js'))
29
 
 
30
 
     #make css output directory
31
 
@@ -231,8 +230,7 @@ def main():
32
 
         pass
33
 
         
34
 
     # move css file to css output directory
35
 
-    shutil.copyfile(os.path.join(qiime_dir,'qiime','support_files',\
36
 
-                    'css/qiime_style.css'),\
37
 
+    shutil.copyfile('/usr/lib/qiime/support_files/css/qiime_style.css',\
38
 
                     os.path.join(css_path,'qiime_style.css'))
39
 
 
40
 
     # verify all parameters are valid
41
 
--- qiime-1.5.0+repack.orig/scripts/make_otu_heatmap_html.py
42
 
+++ qiime-1.5.0+repack/scripts/make_otu_heatmap_html.py
43
 
@@ -137,7 +137,8 @@ def main():
44
 
 
45
 
     qiime_dir=get_qiime_project_dir()
46
 
 
47
 
-    js_path=os.path.join(qiime_dir,'qiime/support_files/js')
48
 
+    #js_path=os.path.join(qiime_dir,'qiime/support_files/js')
49
 
+    js_path='/usr/lib/qiime/support_files/js'
50
 
 
51
 
     shutil.copyfile(os.path.join(js_path,'overlib.js'), os.path.join(js_dir_path,'overlib.js'))
52
 
     shutil.copyfile(os.path.join(js_path,'otu_count_display.js'), os.path.join(js_dir_path,'otu_count_display.js'))
53
 
--- qiime-1.5.0+repack.orig/scripts/compare_3d_plots.py
54
 
+++ qiime-1.5.0+repack/scripts/compare_3d_plots.py
55
 
@@ -143,7 +143,8 @@ def main():
56
 
     
57
 
     qiime_dir=get_qiime_project_dir()
58
 
 
59
 
-    jar_path=os.path.join(qiime_dir,'qiime/support_files/jar/')
60
 
+    #jar_path=os.path.join(qiime_dir,'qiime/support_files/jar/')
61
 
+    jar_path='/usr/lib/qiime/support_files/jar/'
62
 
 
63
 
     data_dir_path = get_random_directory_name(output_dir=dir_path,
64
 
                                               return_absolute_path=False)    
65
 
--- qiime-1.5.0+repack.orig/scripts/make_distance_histograms.py
66
 
+++ qiime-1.5.0+repack/scripts/make_distance_histograms.py
67
 
@@ -142,7 +142,8 @@ def main():
68
 
     for color_info in groups_and_colors:
69
 
         field_to_colors[color_info[0]]=color_info[1:]
70
 
     
71
 
-    qiime_dir = get_qiime_project_dir()+'/qiime/support_files/'
72
 
+    #qiime_dir = get_qiime_project_dir()+'/qiime/support_files/'
73
 
+    qiime_dir='/usr/lib/qiime/support_files/'
74
 
         
75
 
     fields = opts.fields
76
 
     if fields is not None:
77
 
--- qiime-1.5.0+repack.orig/scripts/make_2d_plots.py
78
 
+++ qiime-1.5.0+repack/scripts/make_2d_plots.py
79
 
@@ -148,7 +148,8 @@ def main():
80
 
 
81
 
     qiime_dir=get_qiime_project_dir()
82
 
 
83
 
-    js_path=os.path.join(qiime_dir,'qiime','support_files','js')
84
 
+    #js_path=os.path.join(qiime_dir,'qiime','support_files','js')
85
 
+    js_path='/usr/lib/qiime/support_files/js'
86
 
 
87
 
     if opts.output_dir:
88
 
         if os.path.exists(opts.output_dir):
 
1
This may be a much simpler fix than patching every single mention
 
2
of support_files, but I'm not sure what else this function is used
 
3
to find?
 
4
 
 
5
--- a/qiime/util.py
 
6
+++ b/qiime/util.py
 
7
@@ -301,8 +301,9 @@
 
8
     # Get the directory containing util.py
 
9
     current_dir_path = dirname(current_file_path)
 
10
     # Return the directory containing the directory containing util.py
 
11
-    return dirname(current_dir_path)
 
12
-    
 
13
+    # In Debian what we actually want is /usr/lib/[qiime]
 
14
+    return "/usr/lib"
 
15
+
 
16
 def get_qiime_scripts_dir():
 
17
     """ Returns the QIIME scripts directory 
 
18