librelist archives

« back to archive

Issues when trying to install & use (Flask-)Babel

Issues when trying to install & use (Flask-)Babel

From:
Honza Javorek
Date:
2012-01-16 @ 13:02
Hello,

I have issues with Flask-Babel. There are two development branches of
Babel, Flask-Babel uses (offers) functions from trunk, but in PyPI is
0.9.x branch. I can't get it work easily. More details here:

http://stackoverflow.com/questions/8880317/how-do-i-install-python-babel-library-in-its-trunk-version
(I tried primarily StackOverflow, because it's more about installing
Babel than issues with Flask-Babel). I wanted to use
"format_timedelta" function, but basically I don't want to have
something half-working in my project, every time guessing which
functions I can use and which I can't, because they're not present in
my Babel installation.

How do you use Flask-Babel in your projects? Thank you for any
suggestions here or under the StackOverflow question.

Honza

Re: [flask] Issues when trying to install & use (Flask-)Babel

From:
Joshua Bronson
Date:
2012-01-16 @ 18:23
I've always just used Flask-Babel edge along with Babel edge and I haven't
had problems. Did you try the suggestion in StackOverflow to upgrade to
Babel edge?

pip install --upgrade http://svn.edgewall.org/repos/babel/trunk

(I actually prefer cloning repos into a "src" directory of a virtualenv and
using "python setup.py develop" to generate an egg-link, so I can "git
pull" or "svn update" to get the latest without having to rerun pip or
easy_install, but that works too.)

Flask-Babel's latest release (0.8) should be stable but you could also run
off edge if you like, I've found it to always be stable:
http://github.com/mitsuhiko/flask-babel/zipball/master#egg=Flask-Babel-dev

If as you say Flask-Babel isn't compatible with the latest Babel released
to PyPI, its setup.py needs to be changed to account for this, as currently
it just lists "Babel" in its setup.py's install_requires, which will grab
this incompatible version. Was just going to point you at the tracker so
you can open a ticket, but looks like there's a relevant one open already:

https://github.com/mitsuhiko/flask-babel/issues/9

Looks like it's stalled though.


On Mon, Jan 16, 2012 at 8:02 AM, Honza Javorek <honza@javorek.net> wrote:

> Hello,
>
> I have issues with Flask-Babel. There are two development branches of
> Babel, Flask-Babel uses (offers) functions from trunk, but in PyPI is
> 0.9.x branch. I can't get it work easily. More details here:
>
> 
http://stackoverflow.com/questions/8880317/how-do-i-install-python-babel-library-in-its-trunk-version
> (I tried primarily StackOverflow, because it's more about installing
> Babel than issues with Flask-Babel). I wanted to use
> "format_timedelta" function, but basically I don't want to have
> something half-working in my project, every time guessing which
> functions I can use and which I can't, because they're not present in
> my Babel installation.
>
> How do you use Flask-Babel in your projects? Thank you for any
> suggestions here or under the StackOverflow question.
>
> Honza
>

Re: [flask] Issues when trying to install & use (Flask-)Babel

From:
Joshua Bronson
Date:
2012-01-16 @ 19:20
By the way, if anyone knows of a maintained GitHub mirror of
http://svn.edgewall.org/repos/babel/trunk, or could create one if none
exists, that could be useful to the Flask (and broader) community.

I turned up https://github.com/miracle2k/babel but it's not maintained,
unfortunately.

Re: [flask] Issues when trying to install & use (Flask-)Babel

From:
Josh Finnie
Date:
2012-01-16 @ 21:03
Here you go. I like git much more than svn... I will write something
tonight to make sure this stays up to date with the trunk.

https://github.com/joshfinnie/Babel

~ Josh


On Mon, Jan 16, 2012 at 2:20 PM, Joshua Bronson <jabronson@gmail.com> wrote:

> By the way, if anyone knows of a maintained GitHub mirror of
> http://svn.edgewall.org/repos/babel/trunk, or could create one if none
> exists, that could be useful to the Flask (and broader) community.
>
> I turned up https://github.com/miracle2k/babel but it's not maintained,
> unfortunately.
>

Re: [flask] Issues when trying to install & use (Flask-)Babel

From:
Joshua Bronson
Date:
2012-01-17 @ 21:28
On Mon, Jan 16, 2012 at 4:03 PM, Josh Finnie <joshua.finnie@gmail.com>wrote:

> Here you go. I like git much more than svn... I will write something
> tonight to make sure this stays up to date with the trunk.
>
> https://github.com/joshfinnie/Babel
>

Thanks so much for volunteering to maintain this. Did you have any luck
getting automatic syncing set up?

I made a pull request (https://github.com/joshfinnie/Babel/pull/1) to add a
.gitignore, and then it occurred to me to ask about merging in the CLDR so
users don't have to do it by hand (always seemed like an unnecessary pain
to me). Would that be of help to anyone else?

On Mon, Jan 16, 2012 at 4:08 PM, Ron DuPlain <ron.duplain@gmail.com> wrote:

> There was some discussion on #pocoo today about migrating the official
> repo from svn to hg.  That's all I know on the matter.
>
> -Ron
>

Hopefully if this happens it won't be much of a pain to switch to mirroring
the hg repo instead.

Re: [flask] Issues when trying to install & use (Flask-)Babel

From:
Honza Javorek
Date:
2012-01-19 @ 16:23
Hi,

thank you very much for the suggestions. Nevertheless, I haven't found
a satisfying solution. Here
http://babel.edgewall.org/wiki/Download#LatestDevelopmentSourceCode
they say it's not possible just to checkout their repository, there is
some more stuff necessary to install the library. I tried to find the
latest trunk package here http://ftp.edgewall.com/pub/babel/, but
there is no version 1.0dev pre-built. So I can't do this in my
setup.py:

dependency_links = [
        
'http://ftp.edgewall.com/pub/babel/Babel-latest-py2.6.egg#egg=Babel-1.0dev',
    ],

...the latest egg is just 0.9.6 version. I don't get it. How can
Flask-Babel offer Babel functions which are not available in any
normally retrievable version of Babel?

Thank you anyway, have a nice day :) I'll probably use it as it is and
write the functions by myself.
Honza



On Tue, Jan 17, 2012 at 22:28, Joshua Bronson <jabronson@gmail.com> wrote:
> On Mon, Jan 16, 2012 at 4:03 PM, Josh Finnie <joshua.finnie@gmail.com>
> wrote:
>>
>> Here you go. I like git much more than svn... I will write something
>> tonight to make sure this stays up to date with the trunk.
>>
>> https://github.com/joshfinnie/Babel
>
>
> Thanks so much for volunteering to maintain this. Did you have any luck
> getting automatic syncing set up?
>
> I made a pull request (https://github.com/joshfinnie/Babel/pull/1) to add a
> .gitignore, and then it occurred to me to ask about merging in the CLDR so
> users don't have to do it by hand (always seemed like an unnecessary pain to
> me). Would that be of help to anyone else?
>
> On Mon, Jan 16, 2012 at 4:08 PM, Ron DuPlain <ron.duplain@gmail.com> wrote:
>
>> There was some discussion on #pocoo today about migrating the official
>> repo from svn to hg.  That's all I know on the matter.
>>
>> -Ron
>
>
> Hopefully if this happens it won't be much of a pain to switch to mirroring
> the hg repo instead.

Re: [flask] Issues when trying to install & use (Flask-)Babel

From:
Ron DuPlain
Date:
2012-01-16 @ 21:08
There was some discussion on #pocoo today about migrating the official
repo from svn to hg.  That's all I know on the matter.

-Ron


On Mon, Jan 16, 2012 at 4:03 PM, Josh Finnie <joshua.finnie@gmail.com> wrote:
> Here you go. I like git much more than svn... I will write something tonight
> to make sure this stays up to date with the trunk.
>
> https://github.com/joshfinnie/Babel
>
> ~ Josh
>
>
>
> On Mon, Jan 16, 2012 at 2:20 PM, Joshua Bronson <jabronson@gmail.com> wrote:
>>
>> By the way, if anyone knows of a maintained GitHub mirror
>> of http://svn.edgewall.org/repos/babel/trunk, or could create one if none
>> exists, that could be useful to the Flask (and broader) community.
>>
>> I turned up https://github.com/miracle2k/babel but it's not maintained,
>> unfortunately.
>
>