Re: NEW: graphics/py-pyx

2007-12-24 Thread Laurence Tratt
On Sun, Dec 23, 2007 at 01:02:36PM -0500, Mike Erdely wrote:

>>> I think it would be nice to add some (all?) of the files under examples/,
>>> especially since the docs reference them.
>> Good point. I've now updated the port to install the example files.
> Did you try this with USE_SYSTRACE=Yes?  "make fake" fails for me.
> It tries to copy a file to /etc.

Ouch, that's an evil one - it only writes to /etc if that file isn't already
there, and thus bypasses USE_SYSTRACE if you've already run a test install.
Well spotted! pyxrc is now installed into share/examples/pyx as it's not
actually needed for pyx to run correctly (it just contains a list of the
run-time defaults).

Please find an update at:

  http://tratt.net/laurie/obsd/ports/py-pyx.tar.gz


Laurie
-- 
http://tratt.net/laurie/ -- Personal
http://convergepl.org/   -- The Converge programming language



Re: NEW: graphics/py-pyx

2007-12-23 Thread Mike Erdely
On Sun, Dec 23, 2007 at 05:35:45PM +0001, Laurence Tratt wrote:
> On Fri, Dec 21, 2007 at 08:21:33AM -0600, Will Maier wrote:
> > I think it would be nice to add some (all?) of the files under examples/,
> > especially since the docs reference them.
> 
> Good point. I've now updated the port to install the example files. As
> before it's at:
> 
>   http://tratt.net/laurie/obsd/ports/py-pyx.tar.gz

Did you try this with USE_SYSTRACE=Yes?  "make fake" fails for me.
It tries to copy a file to /etc.

-ME



Re: NEW: graphics/py-pyx

2007-12-23 Thread Laurence Tratt
On Fri, Dec 21, 2007 at 08:21:33AM -0600, Will Maier wrote:

>> Tested on amd64 and i386, both -current. Many thanks to Eric Faurot who
>> put a lot of work into tracking down a nasty bug in PyX. I think this port
>> has received enough testing that it can now be put into ports.
> The port passes regress on i386 here. The do-regress target looks odd to
> me, but I see the other examples in the tree and understand what it does.
>
> I think it would be nice to add some (all?) of the files under examples/,
> especially since the docs reference them.

Good point. I've now updated the port to install the example files. As
before it's at:

  http://tratt.net/laurie/obsd/ports/py-pyx.tar.gz


Laurie
-- 
http://tratt.net/laurie/ -- Personal
http://convergepl.org/   -- The Converge programming language



Re: NEW: graphics/py-pyx

2007-12-21 Thread Will Maier
On Wed, Dec 19, 2007 at 12:06:41AM +, Laurence Tratt wrote:
> Tested on amd64 and i386, both -current. Many thanks to Eric
> Faurot who put a lot of work into tracking down a nasty bug in
> PyX. I think this port has received enough testing that it can now
> be put into ports.

The port passes regress on i386 here. The do-regress target looks
odd to me, but I see the other examples in the tree and understand
what it does.

I think it would be nice to add some (all?) of the files under
examples/, especially since the docs reference them.

-- 

o--{ Will Maier }--o
| web:...http://www.lfod.us/ | [EMAIL PROTECTED] |
*--[ BSD Unix: Live Free or Die ]--*



Re: NEW: graphics/py-pyx

2007-12-01 Thread Laurence Tratt
On Fri, Nov 30, 2007 at 07:30:13PM +0100, Eric Faurot wrote:

> The attached tarball works fine on both amd64 and macppc here. The problem
> was an interrupted read, and a thread starting too early. I have added a
> regress target that runs all the examples, except one (months.py) which is
> not even complete.

This works well for me too on amd64 -current and I think is now ready for
commit. My thanks to Eric for hunting down the intermittent error that
effected my initial port.


Laurie
-- 
http://tratt.net/laurie/ -- Personal
http://convergepl.org/   -- The Converge programming language



Re: NEW: graphics/py-pyx

2007-11-30 Thread Eric Faurot
Hi,

The attached tarball works fine on both amd64 and macppc here.
The problem was an interrupted read, and a thread starting too
early. I have added a regress target that runs all the examples,
except one (months.py) which is not even complete.

Please test, comments and ok.

Eric.


py-pyx.tgz
Description: Unix tar archive


Re: NEW: graphics/py-pyx

2007-11-20 Thread Eric Faurot
Hi,

On Mon, 19 Nov 2007 16:01:21 +
Laurence Tratt <[EMAIL PROTECTED]> wrote:

> I have made available a port of the PyX Python graphics creation library at:
> 
>   http://tratt.net/laurie/obsd/ports/py-pyx.tar.gz  
> 
> From the blurb:
> 
>   PyX is a Python package for the creation of PostScript and PDF files. It
>   combines an abstraction of the PostScript drawing model with a TeX/LaTeX
>   interface. Complex tasks like 2d and 3d plots in publication-ready quality
>   are built out of these primitives.
> 
> Basically, it creates graphics, and farms them out to TeX for rendering
> (with all the associated goodies that implies). It's not perfect (it does
> die occasionally when calling TeX), but it's mostly OK; the results it
> produces are of excellent quality, particularly when compared to the often
> rather random output from py-matplotlib.
> 
> Tested on amd64 and i386, both -current. I welcome reports from other
> platforms.

I am testing it on macppc. I often get the following error with
the provided examples:


$ python2.5 changesymbol.py 
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/threading.py", line 460, in __bootstrap
self.run()
  File 
"/usr/ports/graphics/py-pyx/w-py-pyx-0.10/fake-macppc/usr/local/lib/python2.5/site-packages/pyx/text.py",
 line 639, in run
read = self.pipe.readline() # read again
IOError: [Errno 4] Interrupted system call

/usr/local/lib/python2.5/site-packages/pyx/text.py:850: UserWarning: still 
waiting for tex after 5 (of 60) seconds...
  warnings.warn("still waiting for %s after %i (of %i) seconds..." %
(self.mode, waited, self.waitfortex))
...


It seems to finally work after several attempts (running the program 3 or 4
times). It is really annoying. I am almost sure it is due to some thread
misuse. There is probably a race condition in the texrunner setup: delaying
the threaded pipe reader loop by one second (arbitrarily) seems to make
everything work fine. I have not investigated further.

I think this should be fixed before the port makes it to the tree.
Laurence, would you have a look a it? Otherwise I will do it but not
before this WE at least.


Eric.