Re: z3c.form missing *.mo files?

Brian Sutherland <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
On Tue, Jul 12, 2011 at 07:26:59PM +0300, Marius Gedminas wrote:
> On Tue, Jul 12, 2011 at 07:19:07PM +0300, Marius Gedminas wrote:
> > And then what?  Surely just having python-gettext installed and a couple
> > of environment variables defined is not enough to magically produce .mo
> > files 

Yes, actually it does ;)

But the compiling happens during run-time when you start up the server.
Neither the sdist nor binary egg need to contain the .mo files.

I can't remember if it actually writes those files out to the
filesystem.

> -- I would also need to run some Python script somewhere,
> > presumably.  Is it z3c.form's bin/pocompile?
> 
> So I tried
> 
>   cd ~/src/z3c.form
>   bin/pocompile
>   python setup.py sdist
> 
> and found that my dist/z3c.form-2.4.5dev.tar.gz now contains a .mo next
> to each .po in src/z3c/form/locales/.
> 
> So, should I release z3c.form 2.4.5 with the .mo's?
> 
> I would also like to add a RELEASING.txt with something like this
> 
>     If you're making a public z3c.form release to the Python Package
>     Index, don't forget to generate .mo files with::
> 
>       bin/pocompile
> 
>     before you do the usual ``python setup.py sdist register upload``
>     step.
> 
> Ideally, I'd like ``python setup.py sdist`` itself to check for up-to-date
> .mo's and either regenerate them automatically, or at least complain
> loudly.

I normally use a setuptools plugin I wrote for this:

    http://pypi.python.org/pypi/van.potomo

The chicken and egg issue means it's probably worse than what you wrote.

/me hoping that distutils2 will take care of these things.

-- 
Brian Sutherland
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.