Skip to content

Commit fe76798

Browse files
author
Matthieu Bec
committed
probe headers location
fix missing usock
1 parent 816e4bc commit fe76798

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

README

+10-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ git clone git://github.com/dhmunro/yorick.git
1010
sudo python setup.py install
1111

1212
- rpm style:
13-
python setup.py bdist_rpm
14-
sudo yum install -y dist/python-gist-*.`uname -m`.rpm
13+
14+
sudo dnf install \
15+
python3-devel \
16+
python3-numpy \
17+
python3-numpy-f2py \
18+
libX11-devel \
19+
libXft-devel
20+
21+
python3 setup.py bdist_rpm
22+
sudo yum install -y dist/python-gist3-*.`uname -m`.rpm
1523

1624
OSX
1725
---

gist/Mplot.py

+15-5
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# directory for storing temporary *.gp and *.gs files
4949
_user_path = os.path.join(os.environ['HOME'],'.gist')
5050

51-
def histogram(data,nbins=80,range=None,ntype=0,bar=1,bwidth=0.8,bcolor='fg'):
51+
def histogram(data,nbins=80,range=None,ntype=0,bar=1,bwidth=0.8,bcolor='fg',rval=False):
5252
'''Plot a histogram.
5353
5454
Returns an array (nbins,2) of bin values,count.
@@ -83,10 +83,16 @@ def histogram(data,nbins=80,range=None,ntype=0,bar=1,bwidth=0.8,bcolor='fg'):
8383
barplot(arr[:,0],arr[:,1],width=bwidth,color=bcolor)
8484
else:
8585
plot(arr[:,0],arr[:,1])
86-
return arr
86+
if rval: return arr
8787

8888
def barplot(x,y,width=0.8,color='fg', horiz=False):
8989
'''Plot a barplot.
90+
91+
X X
92+
X X X
93+
X X X X X X X
94+
95+
SEE ALSO: stem, stairplot
9096
9197
x -- Centers of bars
9298
x -- Heights of bars
@@ -768,8 +774,10 @@ def stem(y, x=None, linetype='b-', mtype='mo', shift=0.013):
768774
y,x -- data points
769775
linetype -- type,color,marker,mark for lines
770776
mtype -- type,color,marker,mark for marker
777+
778+
EXAMPLE: stem(np.random.rand(10))
771779
772-
SEE ALSO: stairplot
780+
SEE ALSO: stairplot, barplot
773781
'''
774782
y0 = numpy.zeros(len(y),y.dtype.char)
775783
y1 = y
@@ -894,7 +902,7 @@ def twoplane(DATA,slice1,slice2,dx=[1,1,1],cmin=None,cmax=None,xb=None,xe=None,
894902
xwidth = rescale * xwidth
895903
height1 = rescale * height1
896904
totalheight = totalheight * rescale
897-
print((xwidth, height1))
905+
print(xwidth, height1)
898906
else:
899907
print(xwidth)
900908
ystart = 0.5 - totalheight / 2
@@ -1084,7 +1092,7 @@ def stairplot(a,*arg,**kwd):
10841092
| |_| |_
10851093
_| |_
10861094
1087-
SEE ALSO: stem
1095+
SEE ALSO: stem, barplot
10881096
'''
10891097
if type(a)==numpy.ndarray and len(a.shape)==2:
10901098
xs=a[:,0]
@@ -1352,3 +1360,5 @@ def colorbar (minz, maxz, ncol = 255, ymax=0.85, ymin=0.44, xmin0=0.62, xmax0=0.
13521360
if zlabel:
13531361
ymidpt = (ymax+ymin)/2.0
13541362
plt(zlabel, xmin0, ymidpt, color=color,font=font, justify='CB', height=fontsize, orient=1)
1363+
1364+

setup.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
from distutils.core import Distribution, Command
1212
from distutils.command.build import build
1313
from distutils import log
14-
import numpy.distutils.system_info # pkg_config
14+
import numpy
15+
import numpy.distutils.system_info
1516

1617
gistsource = glob.glob('yorick/gist/*.c')
1718
gistsource.pop(gistsource.index('yorick/gist/browser.c'))
@@ -25,6 +26,7 @@
2526
'yorick/play/unix/handler.c',
2627
'yorick/play/unix/pathnm.c',
2728
#'yorick/play/unix/pmain.c',
29+
'yorick/play/unix/usock.c',
2830
'yorick/play/unix/slinks.c',
2931
'yorick/play/unix/stdinit.c',
3032
'yorick/play/unix/timeu.c',
@@ -91,9 +93,7 @@
9193

9294
libraries = x11_info.get('libraries',['X11'])
9395

94-
if sys.platform == 'darwin':
95-
import numpy
96-
include_dirs.extend([numpy.get_include()])
96+
include_dirs.extend([numpy.get_include()])
9797

9898
# sources
9999
sources = unixsource + x11source + anysource + gistsource

0 commit comments

Comments
 (0)