Package: python-pyds9 / 1.7-1

use-default-xpalib.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Author: Ole Streicher <debian@liska.ath.cx>
Description: Don't install and use the convienience copy provided in the
 source, but use the one installed by the "libxpa1" package.
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@
 
 # make command for xpa
 xpadir='xpa-2.1.15'
-def make(which):
+def _disabled_make(which):
     curdir=os.getcwd()
     srcDir=os.path.join(os.path.dirname(os.path.abspath(__file__)),xpadir)
     os.chdir(srcDir)
@@ -80,8 +80,4 @@
     author_email='saord@cfa.harvard.edu',
     url='http://hea-www.harvard.edu/saord/ds9/',
     py_modules=['ds9', 'xpa'],
-    data_files=[('', [xpadir+'/'+xpalib, xpadir+'/'+xpans])],
-    cmdclass = {'build_py': my_build_py, 	 \
-                'install_data': my_install_data, \
-                'clean': my_clean },
    )
--- a/xpa.py
+++ b/xpa.py
@@ -27,7 +27,7 @@
         return _fname
     return None
 
-_libpath=_find_shlib('xpa')
+_libpath='libxpa.so.1'
 if _libpath:
     libxpa=ctypes.cdll.LoadLibrary(_libpath)
     _ulist=platform.uname()
--- a/ds9.py
+++ b/ds9.py
@@ -93,18 +93,8 @@
     of ds9 is displayed.
     """
     if xpa.xpaaccess("xpans", None, 1) == None:
-        _cmd = False
-        # look in install directories for xpans
-        for _dir in sys.path:
-            _fname = os.path.join(_dir, ds9Globals["progs"][0])
-            if os.path.exists(_fname):
-                _cmd = True
-                break
-        # look in development directory
-        if not _cmd:
-            _fname = './xpa/' + ds9Globals["progs"][0]
-            if os.path.exists(_fname):
-                _cmd = True
+        _fname = ds9Globals["progs"][0]
+        _cmd = True
         if _cmd:
             # start up xpans
             subprocess.Popen([_fname, "-e"])