Colin Morris | 1 Apr 2010 01:15
Picon

Problem installing docutils with --prefix

Hi,

I'm not sure the reason, but when I tried to install docutils recently, it didn't install the necessary Roman module (I believe this may have been because I was running setup.py with the --prefix option enabled, since I didn't have write privileges to the default python site_packages directory on the machine I was using). I was able to get docutils running by just manually copying over the 'extras' dir to the directory I wanted to install to (and then adding _that_ directory to my Pythonpath), but I'm curious whether this was just the result of a mistake on my part, or if it's a genuine bug. I'm using the latest version of Docutils and Python 2.5, if that makes a difference.

(I'm not subscribed to the mailing list, so I'd appreciate being CCed on any replies)

Thanks,
Colin Morris

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Alan G Isaac | 4 Apr 2010 15:40
Picon
Favicon

Re: [Docutils-develop] Scope for working with docutils during GSoC 2010

On 4/4/2010 6:10 AM, P.C Shyamshankar wrote:
> 2. Math Support
>
>     - Input format: Either TeX or ASCIIMathML. Both have
> advantages/disadvantages - community consensus required.
>     - All the output formats have reasonable ways in which they can
> represent math: HTML/XML can use MathML, ODT has its own math
> representation, and LaTeX of course does things natively.
>     - Will need both directive and role.

You will want to be aware of rst2latexmath, rst2mathml,
and the Sphinx support for math.

Also, at some point David said that support for LaTeX
as input was the right initial goal for math support.
IIRC. (I would agree with this.)

For parsing the LaTeX input, you should consider  using
the parsing code in mathtext (Matplotlib).  I suspect
depending on this will be the right approach.
http://matplotlib.sourceforge.net/api/mathtext_api.html

fwiw,
Alan Isaac
(just a user)

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Guenter Milde | 6 Apr 2010 10:33
Picon

Re: Problem installing docutils with --prefix

On 2010-03-31, Colin Morris wrote:

> I'm not sure the reason, but when I tried to install docutils recently, it
> didn't install the necessary Roman module (I believe this may have been
> because I was running setup.py with the --prefix option enabled, since I
> didn't have write privileges to the default python site_packages directory
> on the machine I was using). 

This might well be the case. 

> I was able to get docutils running by just
> manually copying over the 'extras' dir to the directory I wanted to install
> to (and then adding _that_ directory to my Pythonpath)

The recommended way out is to install the roman module from pypi (e.g.
via `easy_install`).

> , but I'm curious whether this was just the result of a mistake on my
> part, or if it's a genuine bug.

There is already a ticket at the Docutils tracker asking to declare a
dependency on roman.py instead of shipping it with Docutils. However, we
have to postpone this until the minimal supported version is 2.5 (where
the dependency mechanism is introduced).

Günter

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Docutils-users mailing list
Docutils-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Craig McQueen | 9 Apr 2010 06:26
Picon
Favicon

Re: docutils sometimes contains roman

I downloaded a snapshot yesterday, and tried to install it with

    python setup.py install

I get a traceback:

File "...\setup.py", line 93, in do_setup
    kwargs['py_modules'] += extras
KeyError: 'py_modules'

I'm guessing this is a problem related to recent work to handle the 'roman'
dependency. It simply doesn't work if the 'roman' module isn't already installed.

Am I right, or am I missing something?

Thanks and regards,
Craig McQueen

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
David Goodger | 9 Apr 2010 14:52
Favicon

Re: docutils sometimes contains roman

On Fri, Apr 9, 2010 at 00:26, Craig McQueen <ces-pub <at> mcqueen.id.au> wrote:
> I downloaded a snapshot yesterday, and tried to install it with
>
>    python setup.py install
>
> I get a traceback:
>
> File "...\setup.py", line 93, in do_setup
>    kwargs['py_modules'] += extras
> KeyError: 'py_modules'
>
> I'm guessing this is a problem related to recent work to handle the 'roman'
> dependency. It simply doesn't work if the 'roman' module isn't already installed.
>
> Am I right, or am I missing something?

Thanks for the bug report!

It actually seems to stem directly from r6267 (by Günter Milde), when
package_data['py_modules'] was removed. This revision was related to
the developer tools (buildhtml.py & quicktest.py) and Python 3
conversion. The roman.py issue you reported seems to be a side-effect.

Günter, could you fix this?

--

-- 
David Goodger <http://python.net/~goodger>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Docutils-users mailing list
Docutils-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
David Goodger | 9 Apr 2010 14:54
Favicon

Re: docutils sometimes contains roman

On Fri, Apr 9, 2010 at 08:52, David Goodger <goodger <at> python.org> wrote:
> On Fri, Apr 9, 2010 at 00:26, Craig McQueen <ces-pub <at> mcqueen.id.au> wrote:
>> I downloaded a snapshot yesterday, and tried to install it with
>>
>>    python setup.py install
>>
>> I get a traceback:
>>
>> File "...\setup.py", line 93, in do_setup
>>    kwargs['py_modules'] += extras
>> KeyError: 'py_modules'
>>
>> I'm guessing this is a problem related to recent work to handle the 'roman'
>> dependency. It simply doesn't work if the 'roman' module isn't already installed.
>>
>> Am I right, or am I missing something?
>
> Thanks for the bug report!
>
> It actually seems to stem directly from r6267 (by Günter Milde), when
> package_data['py_modules'] was removed. This revision was related to
> the developer tools (buildhtml.py & quicktest.py) and Python 3
> conversion. The roman.py issue you reported seems to be a side-effect.

Also r6262, where this change was made to setup.py:

-        kwargs['py_modules'] = extras
+        kwargs['py_modules'] += extras

It probably should have been reverted in r6267.

> Günter, could you fix this?

--

-- 
David Goodger <http://python.net/~goodger>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Docutils-users mailing list
Docutils-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Christian Siefkes | 14 Apr 2010 12:02

LaTeX files without inputenc package

Hi all,

when I call rst2latex on a file, it always adds the line

    \usepackage[utf8x]{inputenc}

to the tex files it generates. That's fine (and indeed necessary) for normal
[pdf]latex, but I recently switched to XeTeX <http://scripts.sil.org/xetex>,
which uses UTF-8 by default and neither requires nor allows the inputenc
package (cf. Bug#434056: Inputenc and XeTeX don't work together:
http://lists.debian.org/debian-tex-maint/2007/07/msg00223.html ).

Is it possible to tell rst2latex not to add the inputenc line? I didn't find
an option for that, but it would allow rst2latex to work with xelatex
without problems.

Thanks
	Christian

-- 
|------- Dr. Christian Siefkes ------- christian <at> siefkes.net -------
| Homepage: http://www.siefkes.net/ | Blog: http://www.keimform.de/
|    Peer Production Everywhere:       http://peerconomy.org/wiki/
|---------------------------------- OpenPGP Key ID: 0x346452D8 --
A process which led from amoeba to man appeared to philosophers to be
obviously a progress, though whether the amoeba would agree with this
opinion is not known.
        -- Bertrand Russell, 1914

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
David Goodger | 14 Apr 2010 15:26
Picon

Re: reStructuredText sections question

On Wed, Apr 14, 2010 at 4:37 AM, Thierry Florac <thierry.florac <at> onf.fr> wrote:
> I suppose that "initial_header_level=3" allows to handle my use case,

>From the Docutils side, yes, that's what you should use. See
http://docutils.sourceforge.net/docs/user/config.html (search for
"initial_header_level").

> but apparently it doesn't work...

That would seem to be an implementation issue, maybe Zope-related. I
can't help you there.

--

-- 
David Goodger <http://python.net/~goodger>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
TP | 14 Apr 2010 22:15
Picon

Re: reStructuredText sections question

On Wed, Apr 14, 2010 at 3:07 AM, Thierry Florac <thierry.florac <at> onf.fr> wrote:
>> > I'm currently using Zope-3.4 KGS, with zope.app.renderer-3.4.0 and
>> > docutils-0.4...
> Thanks for the link...
> The main point I can read is:
>
>    The initial level for header elements.
>    **This does not affect the document title & subtitle.**
>
> So do I have to understand that according to this the behaviour is in
> accordance with the specs :-(  ??

You are using a pretty old version of docutils. It's up to 0.6 now and
that's 6 months older than the current snapshot. Maybe you should
upgrade?

Also see http://docutils.sourceforge.net/FAQ.html#unexpected-results-from-tools-rst2html-py-h1-h1-instead-of-h1-h2-why,
for how to change way titles & subtitles are handled.

To see if Zope is issue try writing simple .rst test case directly.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Guenter Milde | 14 Apr 2010 22:23
Picon

Re: LaTeX files without inputenc package

On 2010-04-14, Christian Siefkes wrote:

> when I call rst2latex on a file, it always adds the line

>     \usepackage[utf8x]{inputenc}

> to the tex files it generates. 

Which version are you using? (With both, the last release (0.6) and the
development version, the default should be [latin1], with
--output-encoding=utf8 it's [utf8].)

> Is it possible to tell rst2latex not to add the inputenc line?  I
> didn't find an option for that, but it would allow rst2latex to work
> with xelatex without problems.

Actually, there are more problems, as e.g. the "babel" package does not
work reliable with XeTeX either. (This is why I plan to add a XeTeX writer
to Docutils.)

Until then, you can have a look at the --template option added to
rst2latex in version 0.6: you would need to define a custom template file
(e.g. make a copy of default.tex and replace 

  $requirements

with a "hard coded" set of the required packages.

Günter

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Docutils-users mailing list
Docutils-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.

Gmane