Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106239 - Version bump: dev-java/jython-2.2.1 (after almost 2 years and several rcs and 2.2)
Summary: Version bump: dev-java/jython-2.2.1 (after almost 2 years and several rcs and...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 127192 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-17 00:32 UTC by Santiago Gala
Modified: 2008-02-26 10:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
new ebuild (jython-2.2_alpha1.ebuild,2.72 KB, text/plain)
2005-09-17 00:33 UTC, Santiago Gala
Details
new files/jython, using a per-user $HOME/cachedir, including settings for libreadline-java (jython,357 bytes, text/plain)
2005-09-17 00:36 UTC, Santiago Gala
Details
new version of proposed ebuild (jython-2.2_alpha1.ebuild,2.87 KB, text/plain)
2005-09-18 10:20 UTC, Santiago Gala
Details
includes java.library.path to make readline happy (jython,555 bytes, text/plain)
2005-09-19 01:16 UTC, Santiago Gala
Details
ebuild for 2.2beta1 (jython-2.2_beta1.ebuild,3.27 KB, text/plain)
2007-03-25 00:06 UTC, Santiago Gala
Details
mylar/context/zip (https%3A%2F%2Fbugs.gentoo.org-106239.xml.zip,125.24 KB, application/octet-stream)
2007-04-05 21:38 UTC, Santiago Gala
Details
tentative ebuild for 2.2-rc1 (jython-2.2_rc1.ebuild,3.17 KB, text/plain)
2007-06-29 15:51 UTC, Santiago Gala
Details
Ebuild for jython 2.2-rc2 (jython-2.2_rc2.ebuild,3.17 KB, text/plain)
2007-07-13 15:12 UTC, Santiago Gala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Santiago Gala 2005-09-17 00:32:35 UTC
I updated the jython ebuild to make it deal with 2.2a1, which brings significant
improvements in the python side (generators mainly).

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Santiago Gala 2005-09-17 00:33:30 UTC
Created attachment 68645 [details]
new ebuild

New ebuild, tested locally
Comment 2 Santiago Gala 2005-09-17 00:36:54 UTC
Created attachment 68646 [details]
new files/jython, using a per-user $HOME/cachedir, including settings for libreadline-java

jython has lots of problems if it can't write the cachedir. The old ebuild was
using a shared cachedir at /usr/share/jython/cachedir, which brings security
problems and issues if root writes a cache and then other user can't update it.
I keep python.home at /usr/share/jython, but set cachedir to $HOME/cachedir
using this command line tool.
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2005-09-17 02:55:32 UTC
Some quick feedback:
1.you need to depend on the slot of servletapi you are using
(=dev-java/servletapi-2.4*)
2.just use dobin when you don't need to rename the binary
3.it seems that S="${WORKDIR}" in your ebuild so you should set that and then
you don't need to always use cd ${WORKDIR}

The newbin problem seems to be also in the old ebuild but useful to be aware of
it. I have added python@gentoo.org to CC so that they can provide feedback on
howto implement the python tricks in the best way.
Comment 4 Santiago Gala 2005-09-17 08:25:11 UTC
>1.you need to depend on the slot of servletapi you are using
>(=dev-java/servletapi-2.4*)

 I don't actually need an specific version, but there seems to be no way
 to get the jar of unspecified servletapi version. Or there is?
 In any case, this is a flag to build support for using jython to serve
 python files as servlets, so not so mainstream.

>2.just use dobin when you don't need to rename the binary

 Done here, I also discovered a couple of minor glitches which I have 
 fixed locally too. Unless there are more comments/problems, I'll attach
 the changed files tomorrow.

>3.it seems that S="${WORKDIR}" in your ebuild so you should set that and then
>you don't need to always use cd ${WORKDIR}

 Done too. Thanks for the advice, I'm an ebuild novice.
Comment 5 Petteri Räty (RETIRED) gentoo-dev 2005-09-17 08:33:24 UTC
(In reply to comment #4)
> 
>  I don't actually need an specific version, but there seems to be no way
>  to get the jar of unspecified servletapi version. Or there is?
>  In any case, this is a flag to build support for using jython to serve
>  python files as servlets, so not so mainstream.
> 

But remember that your package has to build with the deps you have. Any version
of servletapi is ok by your DEPEND but for your ebuild to work you need one from
the 2.4 slot.

>  Done too. Thanks for the advice, I'm an ebuild novice.

No problem. We apreciate every level of work and are here to help you improve
your skills. 
Comment 6 Santiago Gala 2005-09-18 10:18:06 UTC
Comment on attachment 68646 [details]
new files/jython, using a per-user $HOME/cachedir, including settings for libreadline-java

#!/bin/sh
###############################################################################
#
# This file generated by Jython installer
# Created on XXX by root
#
# Note, java.library.path is needed for readline use only.
# And probably /usr/lib should be added at the java-config level after
# implementation native libs.

`java-config --java` -Dpython.home="/usr/share/jython"
-Dpython.cachedir=$HOME/cachedir -Djava.library.path=/usr/lib -classpath
"`java-config --classpath=jython,libreadline-java 2>/dev/null`:$CLASSPATH"
"org.python.util.jython" "$@"
Comment 7 Santiago Gala 2005-09-18 10:20:56 UTC
Created attachment 68742 [details]
new version of proposed ebuild

this takes into account the received suggestions, AFAICT
Comment 8 Santiago Gala 2005-09-19 01:16:27 UTC
Created attachment 68796 [details]
includes java.library.path to make readline happy

this one makes optional readline really work.
Comment 9 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-12-12 22:24:01 UTC
This is still alpha and is a binary package.  As per the Gentoo Java policy, we
are not adding new binary packages.  Please wait until the actual release for
Jython 2.2 is made (it seems that 2.1 is still the newest version from their
homepage).
Comment 10 Petteri Räty (RETIRED) gentoo-dev 2007-03-24 11:03:24 UTC
*** Bug 127192 has been marked as a duplicate of this bug. ***
Comment 11 Santiago Gala 2007-03-24 22:08:45 UTC
>This is still alpha and is a binary package.  As per the Gentoo Java policy, we
>are not adding new binary packages.  Please wait until the actual release for

2.2a1 is not alpha in the typical sense, it is in the plans for python. If you ask:

$ python -c "import __future__; print __future__.generators.optional"
(2, 2, 0, 'alpha', 1)

you find 2.2a1 is the first version implementing generators, which is (has been for the last two years) extremely useful.

OTOH, even if the package that is downloaded includes a (architectureless) binary, the ebuild compiles it from sources, so the second claim is fake too.

>Jython 2.2 is made (it seems that 2.1 is still the newest version from their
>homepage).

Keep on waiting (one year and a half and one beta later).

I'm attaching a changed and cleaner ebuild for 2.2b1
Comment 12 Santiago Gala 2007-03-25 00:06:02 UTC
Created attachment 114304 [details]
ebuild for 2.2beta1

Tested to generate a working /usr/bin/jython both with and without libreadline-java. Not too clean :)

Downloads CPython Lib from required version (2.2.3 currently) and it no longers depends on python-2.2
Comment 13 Alistair Bush (RETIRED) gentoo-dev 2007-03-27 08:25:06 UTC
I have taken the existing 2.1 ebuild as well as Santiago's ebuild/input and combined them to produce

https://overlays.gentoo.org/svn/proj/java/java-experimental/dev-java/jython/jython-2.2_beta1.ebuild

So far it seems to work using simple programming examples ( I know nothing about python )

It would be nice if the more experienced python programmers within the gentoo-java team,  as well as any community members,  attempt to stretch this ebuilds legs.  To see whether the user cachedir is working, etc,etc

The ebuild needs a bit of a clean up,  I just noticed that is inherits base without any need.  These im less concerned about until it is closer to being ready of the java-overlay (and eventually the tree).

I also pulled the code from jythons svn repo.  I haven't included the steps to reproduce in the ebuild but it was a simple export from the 2.2beta tag.

Thank you Santiago for your hard work.
Comment 14 Santiago Gala 2007-03-27 15:16:53 UTC
I have been taking a look to the ebuild. You can't build a python2.2 using the libraries of a python 2.4, so:

	echo "python.home=/usr/lib/python2.4/" >> ant.properties

is basically broken unless you can get /usr/lib/python2.2

this is why I opted by adding python 2.2.3 tarball to the ebuild, instead of depending on a masked python 2.2

To get an idea of the "breakage",

$ jython /usr/share/jython/Lib/test/testall.py (it fails unless the user running it has permissions on /usr/share/jython, it fails unless test_jarray is commented)

I get it ok after a lot of messages, in my ebuild (commenting test_jarray, seems to be missing).


Other than this, your proposal looks good, but the launcher will not launch if "readline" is used, as it needs to -Djava.library.path and add it to the classpath. Look at mine, I went through hoops to ensure it works with and without readline.
Comment 15 Santiago Gala 2007-04-05 21:38:55 UTC
Created attachment 115531 [details]
mylar/context/zip

Push for it in gentoo
Comment 16 Santiago Gala 2007-04-05 21:44:29 UTC
Comment on attachment 115531 [details]
mylar/context/zip

oops, forget the spam
Comment 17 Santiago Gala 2007-06-29 15:48:30 UTC
A few days ago (Jun 23) 2.2-rc1 was announced. It looks fairly mature, after extensive testing of alphas, beta1 and beta2.

As you might *not* know, python has official alpha and beta releases and, for instance, 2.2-alpha1 is the first release with mandatory generators support. This is to say that alpha and beta in python is not like in other packages.

I'll upload an updated ebuild in case you like it.
Comment 18 Santiago Gala 2007-06-29 15:51:27 UTC
Created attachment 123403 [details]
tentative ebuild for 2.2-rc1

Note that the ebuild requires changes when bumping, to the download file and the associated python sources. Works for me (TM)
Comment 19 Santiago Gala 2007-07-13 15:12:22 UTC
Created attachment 124748 [details]
Ebuild for jython 2.2-rc2

jython 2.2-rc2 released, about one week for 2.2

Ebuild attached, seems to work well. Result of tests (once jarray one was commented, it is missing from the distribution):

(... long output )
All old-style tests completed successfully!
Executing unittest tests
.................
----------------------------------------------------------------------
Ran 17 tests in 0.971s

OK
Comment 20 Petteri Räty (RETIRED) gentoo-dev 2007-09-20 23:01:16 UTC
Took a look at bumping to 2.2 final. Unfortunately freemarker does not build with it so will need to look at patching it. Would like to avoid slotting jython if possible.
Comment 21 Santiago Gala 2007-12-01 14:49:10 UTC
Upstream lists 2.2.1 as recommended, I have tested my ebuild and it works, yet gentoo has a version more than 2 years old of the package.

Can't really know what is the reason that makes it happen, but I guess it is the framemarker stuff: if framemarker is not correctly supported, it is framemarker that should be punished, and not jython. What does QA say about those cases?

I guess having generators in python plus 2 years delay in the ebuild is enough reason to bump jython and put blocks and/or bugs in any ebuild broken by that. Isn't it?

 
Comment 22 Nilton Volpato 2008-02-26 05:38:03 UTC
Why is this not committed to portage yet? The jython ebuild currently available is *too old*. This (or the newest version) should be included in portage, either as ~x86 or masked for testing.

Thanks,
Nilton
Comment 23 Alistair Bush (RETIRED) gentoo-dev 2008-02-26 10:38:21 UTC
Added jython to tree,  had been sitting in java-experimental for ages and after a little bit of cleanup.  I have deemed it suitable for ~arch.  Note I have had to restrict="test" as they are useless.  I will be interested to see how stable the package actually is.
Cachedir is now generated in $HOME.