Re: calling extension's autoconf/make from distutils

2007-09-21 Thread Gary Jefferson
On Sep 20, 10:43 pm, Gary Jefferson <[EMAIL PROTECTED]> wrote: > I've got a python extension that comes with its own standard autoconf/ > automake system, and I can "python setup.py build" just fine with it > as long as I have previously done "./configure"

calling extension's autoconf/make from distutils

2007-09-20 Thread Gary Jefferson
I've got a python extension that comes with its own standard autoconf/ automake system, and I can "python setup.py build" just fine with it as long as I have previously done "./configure" in that directory. However, 'python setup.py bdist_rpm' can't hope to have done './ configure' first, as it un

Re: distutils, extensions, and missing headers

2007-09-20 Thread Gary Jefferson
On Sep 20, 12:08 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Gary Jefferson wrote: > > On Sep 20, 1:22 am, Robert Kern <[EMAIL PROTECTED]> wrote: > >> Use the "headers" keyword to setup() to list theheaderfiles you want > >> installed. > >

Re: distutils, extensions, and missing headers

2007-09-20 Thread Gary Jefferson
Robert, thanks for the help! On Sep 20, 1:22 am, Robert Kern <[EMAIL PROTECTED]> wrote: > > Use the "headers" keyword to setup() to list the header files you want > installed. I've tried "headers=['header1.h', 'header2.h']" in setup() as well as in Extension(), and neither seem to get the fil

distutils, extensions, and missing headers

2007-09-19 Thread Gary Jefferson
My setup.py (with extension) seems to work great for build and install, but for bdist_rpm, compilation of the extension fails because some of the headers needed to build the extension aren't in the bdist tarball. I've tried adding a 'depends=[]' to the Extension definition with these header files

Re: selective logger disable/enable

2007-01-25 Thread Gary Jefferson
Gary Jefferson wrote: > So maybe I don't have all this figured out quite as well as I thought. > What I really want to do is set an environment variable, MYDEBUG, which > contains a list of wildcarded logger names, such as "a.*.c a.d" (which > becomes ['a.*.c'

Re: logging module and doctest

2007-01-25 Thread Gary Jefferson
Peter Otten wrote: > Peter Otten wrote: > > > Gary Jefferson wrote: > > > >> I've written a logging.filter and would like to use doctest on it > >> (using a StreamHandler for stdout), but this doesn't seem possible. > >> Output from the

Re: selective logger disable/enable

2007-01-24 Thread Gary Jefferson
So maybe I don't have all this figured out quite as well as I thought. What I really want to do is set an environment variable, MYDEBUG, which contains a list of wildcarded logger names, such as "a.*.c a.d" (which becomes ['a.*.c', 'a.d'], and then selectively crank the loglevel up to DEBUG for tho

logging module and doctest

2007-01-24 Thread Gary Jefferson
I've written a logging.filter and would like to use doctest on it (using a StreamHandler for stdout), but this doesn't seem possible. Output from the logger seems to disappear (running the doctest strings through the interpreter as-is yields expected results). I assume this is because doctest does

Re: selective logger disable/enable

2007-01-22 Thread Gary Jefferson
Vinay Sajip wrote: > > BTW I would also advise reading PEP-282 to understand more about the > logging approach. You've been most helpful, Vinay. The PEP section on Filters states that I can do what I've been trying to do with filters, but doesn't provide enough information to do it (or, at leas

Re: selective logger disable/enable

2007-01-21 Thread Gary Jefferson
Vinay Sajip wrote: > > I don't know enough about your target environment and application to > necessarily give you the best advice, but I'll make some general > comments which I hope are useful. You seem to be thinking that loggers > are binary - i.e. you turn them on or off. But they can be contr

Re: selective logger disable/enable

2007-01-20 Thread Gary Jefferson
Vinay Sajip wrote: > > The documentation for Logger - see > > http://docs.python.org/lib/node406.html > > - shows that there are addFilter() and removeFilter() methods on the > Logger class which you can use to add or remove filters from individual > Logger instances. From the above page (entitled

selective logger disable/enable

2007-01-18 Thread Gary Jefferson
Suppose I have 3 modules that belong to a project, 'A', 'A.a' and 'B', and each module has its own logger, created with: module1logger = logging.getLogger('project.A') and module2logger = logging.getLogger('project.A.a') and module3logger = logging.getLogger('project.B') And I want to select