Hello community, here is the log from the commit of package jython for openSUSE:Factory checked in at Mon Mar 14 10:32:42 CET 2011.
-------- --- jython/jython.changes 2011-02-22 12:07:24.000000000 +0100 +++ /mounts/work_src_done/STABLE/jython/jython.changes 2011-03-11 14:04:16.000000000 +0100 @@ -1,0 +2,6 @@ +Fri Mar 11 13:01:53 UTC 2011 - [email protected] + +- Update to 2.2.1 - this obsolete the pyxml patch +- merge with jython-2.2.1-6.fc16.src.rpm + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- jython-cvs.tar.bz2 jython-new-xml.diff python-release22-maint-cvs.tar.bz2 New: ---- fetch-jython.sh jython-fetched-src-Release_2_2_1.tar.bz2 jython-nofullbuildpath.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jython.spec ++++++ --- /var/tmp/diff_new_pack.7gnLOD/_old 2011-03-14 09:51:57.000000000 +0100 +++ /var/tmp/diff_new_pack.7gnLOD/_new 2011-03-14 09:51:57.000000000 +0100 @@ -15,34 +15,51 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild +%{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')} + +%global cpython_version %{pyver} +%global pyxml_version 0.8.3 +%global svn_tag Release_2_2_1 +%global _python_bytecompile_errors_terminate_build 0 Name: jython -BuildRequires: ant ht2html java2-devel-packages libreadline-java mysql-connector-java oro pyxml servletapi5 -%{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')} -%define name jython -%define version 2.2 -%define cpython_version 2.3 -%define cpythondir python%{cpython_version} -%define pyxml_version 0.8.3 -%define release 0.a0.2jpp -%define section free -Version: 2.2 -Release: 326 -Summary: Java Source Interpreter -License: Other uncritical OpenSource License ; Apache Software License +Version: 2.2.1 +Release: 1 +Summary: A Java implementation of the Python language +License: ASL 1.1 and BSD and CNRI and JPython and Python Url: http://www.jython.org/ -Source0: %{name}-cvs.tar.bz2 -Source1: python-release22-maint-cvs.tar.bz2 +Group: Development/Languages/Python +# Use the included fetch-jython.sh script to generate the source drop +# for jython 2.2.1 +# sh fetch-jython.sh \ +# jython https://jython.svn.sourceforge.net/svnroot Release_2_2_1 +# +Source0: %{name}-fetched-src-%{svn_tag}.tar.bz2 +Source2: fetch-%{name}.sh Patch0: %{name}-cachedir.patch -Patch1: jython-new-xml.diff +# Make javadoc and copy-full tasks not depend upon "full-build" +# Also, copy python's license from source directory and not +# ${python.home} +Patch1: %{name}-nofullbuildpath.patch Requires: jpackage-utils >= 1.5 -Requires: oro -Requires: servlet -Group: Development/Libraries/Java -BuildArch: noarch +Requires: jakarta-oro +Requires: servletapi5 +Requires: python >= %{cpython_version} +Requires: libreadline-java >= 0.8.0-16 +Requires: mysql-connector-java +Requires: java >= 1.6.0 +BuildRequires: ant +BuildRequires: ht2html +BuildRequires: libreadline-java >= 0.8.0-16 +BuildRequires: mysql-connector-java +BuildRequires: jakarta-oro +BuildRequires: python >= %{cpython_version} +BuildRequires: pyxml >= %{pyxml_version} +BuildRequires: servletapi5 +BuildRequires: java-devel >= 1.6.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch %description Jython is an implementation of the high-level, dynamic, object-oriented @@ -63,10 +80,8 @@ Java allows developers to freely mix the two languages both during development and in shipping products. - - %package manual -License: Other uncritical OpenSource License ; Apache Software License +License: ASL 1.1 and BSD and CNRI and JPython and Python Summary: Manual for jython Group: Development/Libraries/Java @@ -94,8 +109,7 @@ %package javadoc -License: Other uncritical OpenSource License ; Apache Software License -PreReq: coreutils +License: ASL 1.1 and BSD and CNRI and JPython and Python Summary: Javadoc for jython Group: Development/Libraries/Java @@ -123,7 +137,7 @@ %package demo -License: Other uncritical OpenSource License ; Apache Software License +License: ASL 1.1 and BSD and CNRI and JPython and Python Summary: Demonstration and samples for jython Requires: %{name} = %{version}-%{release} Group: Development/Libraries/Java @@ -152,99 +166,116 @@ %prep -%setup -q -n %{name} -%setup -q -n %{name} -T -D -a 1 +%setup -q -n %{name}-svn-%{svn_tag} %patch0 -p1 %patch1 -p1 -# remove all binary libs -find . -name "*.jar" -exec rm -f {} \; -# remove all CVS files -for dir in `find . -type d -name CVS`; do rm -rf $dir; done -for file in `find . -type f -name .cvsignore`; do rm -rf $file; done %build -export CLASSPATH=$(build-classpath libreadline-java mysql-connector-java oro servlet) +export CLASSPATH=$(build-classpath mysql-connector-java oro servlet) +# FIXME: fix jpackage-utils to handle multilib correctly +export CLASSPATH=$CLASSPATH:%{_libdir}/libreadline-java/libreadline-java.jar + rm -rf org/apache -if ! grep -q "javac.*source=" build.xml ; then - perl -p -i -e 's|<javac |<javac source=\"1.4\" |' build.xml - perl -p -i -e 's|<javadoc |<javadoc source=\"1.4\" |' build.xml -fi -if ! grep -q "javac.*source=" dist/build.xml ; then - perl -p -i -e 's|<javac |<javac source=\"1.4\" |' dist/build.xml - perl -p -i -e 's|<javadoc |<javadoc source=\"1.4\" |' dist/build.xml -fi perl -p -i -e 's|execon|apply|g' build.xml -#ant -Dpython.lib=/usr/%_lib/python%pyver -DPyXmlHome=/usr/%_lib/python%pyver copy-dist -ant -Dpython.lib=./python/dist/src/Lib -DPyXmlHome=/usr/%_lib/python%pyver copy-dist -ant -Dpython.home=%{_bindir} -Dht2html.dir=%{_datadir}/ht2html doc -ant javadoc + +ant \ + -Dpython.home=%{_bindir} \ + -Dht2html.dir=%{_datadir}/ht2html \ + -Dpython.lib=./CPythonLib \ + -Dpython.exe=%{_bindir}/python \ + -DPyXmlHome=%{_libdir}/python%pyver \ + -Dtargetver=1.3 \ + copy-dist + +# remove #! from python files +pushd dist + for f in `find . -name '*.py'` + do + sed --in-place "s:#!\s*/usr.*::" $f + done +popd %install # jar install -d -m 755 $RPM_BUILD_ROOT%{_javadir} -install -m 644 dist/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar -(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done) -# manual -rm -f Doc/Makefile -rm -rf Doc/api +install -m 644 dist/%{name}.jar \ + $RPM_BUILD_ROOT%{_javadir}/%{name}.jar # javadoc -install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -pr dist/Doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} +cp -pr dist/Doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} # data install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name} # these are not supposed to be distributed find dist/Lib -type d -name test | xargs rm -rf + cp -pr dist/Lib $RPM_BUILD_ROOT%{_datadir}/%{name} cp -pr dist/Tools $RPM_BUILD_ROOT%{_datadir}/%{name} +# demo cp -pr dist/Demo $RPM_BUILD_ROOT%{_datadir}/%{name} +# manual +rm -rf dist/Doc/javadoc +mv dist/Doc %{name}-manual-%{version} + # registry install -m 644 registry $RPM_BUILD_ROOT%{_datadir}/%{name} # scripts install -d $RPM_BUILD_ROOT%{_bindir} + cat > $RPM_BUILD_ROOT%{_bindir}/%{name} << EOF #!/bin/sh # # %{name} script # JPackage Project (http://jpackage.sourceforge.net) +# # Source functions library . %{_datadir}/java-utils/java-functions + # Source system prefs if [ -f %{_sysconfdir}/%{name}.conf ] ; then . %{_sysconfdir}/%{name}.conf fi + # Source user prefs if [ -f \$HOME/.%{name}rc ] ; then . \$HOME/.%{name}rc fi + +# Arch-specific location of dependency +case \$(uname -m) in + x86_64 | ia64 | s390x | ppc64 | sparc64 ) + JYTHONLIBDIR="/usr/lib64" ;; + * ) + JYTHONLIBDIR="/usr/lib" ;; +esac + # Configuration MAIN_CLASS=org.python.util.%{name} BASE_FLAGS=-Dpython.home=%{_datadir}/%{name} -BASE_JARS="%{name} oro servlet" -if [ -f %{_libdir}/libJavaReadline.so ]; then - BASE_FLAGS="\$BASE_FLAGS -Dpython.console=org.python.util.ReadlineConsole" - BASE_FLAGS="\$BASE_FLAGS -Djava.library.path=%{_libdir}" - BASE_FLAGS="\$BASE_FLAGS -Dpython.console.readlinelib=GnuReadline" - BASE_JARS="\$BASE_JARS libreadline-java" -fi -if [ -f %{_javadir}/mysql-connector-java.jar ]; then - BASE_JARS="\$BASE_JARS mysql-connector-java" -fi +BASE_JARS="%{name} oro servlet mysql-connector-java" + +BASE_FLAGS="\$BASE_FLAGS -Dpython.console=org.python.util.ReadlineConsole" +BASE_FLAGS="\$BASE_FLAGS -Djava.library.path=\$JYTHONLIBDIR/libreadline-java" +BASE_FLAGS="\$BASE_FLAGS -Dpython.console.readlinelib=Editline" + # Set parameters set_jvm +CLASSPATH=$CLASSPATH:\$JYTHONLIBDIR/libreadline-java/libreadline-java.jar set_classpath \$BASE_JARS set_flags \$BASE_FLAGS set_options \$BASE_OPTIONS + # Let's start run "\$@" EOF + cat > $RPM_BUILD_ROOT%{_bindir}/%{name}c << EOF #!/bin/sh # # %{name}c script # JPackage Project (http://jpackage.sourceforge.net) + %{_bindir}/%{name} %{_datadir}/%{name}/Tools/%{name}c/%{name}c.py "\$@" EOF -rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/Lib/UserDict.py %clean rm -rf $RPM_BUILD_ROOT @@ -260,16 +291,19 @@ %{_datadir}/%{name}/Tools %{_datadir}/%{name}/registry -%files manual +%files javadoc %defattr(-,root,root) -%doc dist/Doc/*.html dist/Doc/images +%doc LICENSE.txt +%{_javadocdir}/%{name} -%files javadoc +%files manual %defattr(-,root,root) -%{_javadocdir}/%{name}-%{version} +%doc LICENSE.txt README.txt +%doc %{name}-manual-%{version} %files demo %defattr(-,root,root) +%doc ACKNOWLEDGMENTS NEWS LICENSE.txt README.txt %{_datadir}/%{name}/Demo %changelog ++++++ fetch-jython.sh ++++++ #!/bin/sh # Generate a source drop for jython from SVN # Usage message usage="usage: $0 <project_name> <svn_root> <svn_tag>" project_name=$1 svn_root=$2 svn_tag=$3 # Ensure we got all of the variables if [ "x$project_name"x = "xx" ] then echo >&2 "$usage" exit 1 fi if [ "x$svn_root"x = "xx" ] then echo >&2 "$usage" exit 1 fi if [ "x$svn_tag"x = "xx" ] then echo >&2 "$usage" exit 1 fi mkdir -p temp && cd temp svn export --username guest --password "" $svn_root/$project_name/tags/$svn_tag mv $svn_tag/$project_name $project_name-svn-$svn_tag tar jcf $project_name-fetched-src-$svn_tag.tar.bz2 $project_name-svn-$svn_tag ++++++ jython-cachedir.patch ++++++ --- /var/tmp/diff_new_pack.7gnLOD/_old 2011-03-14 09:51:57.000000000 +0100 +++ /var/tmp/diff_new_pack.7gnLOD/_new 2011-03-14 09:51:57.000000000 +0100 @@ -1,11 +1,12 @@ ---- jython-20030113/org/python/core/PySystemState.java~ 2003-01-14 16:44:44.000000000 -0500 -+++ jython-20030113/org/python/core/PySystemState.java 2003-01-14 16:47:55.000000000 -0500 -@@ -459,7 +459,13 @@ +diff -ur jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java jython-svn-Release_2_2beta1.patched/src/org/python/core/PySystemState.java +--- jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java 2007-02-07 02:19:53.000000000 -0500 ++++ jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java 2007-03-23 09:41:27.000000000 -0400 +@@ -534,7 +534,13 @@ } - cachedir = new File(props.getProperty("python.cachedir", "cachedir")); + cachedir = new File(props.getProperty(PYTHON_CACHEDIR, CACHEDIR_DEFAULT_NAME)); if (!cachedir.isAbsolute()) { - cachedir = new File(PySystemState.prefix, cachedir.getPath()); -+ File jythondir = new File(System.getProperty("user.home"), ".jython"); ++ File jythondir = new File(System.getProperty("user.home"), ".jython-cache"); + + if (!jythondir.isDirectory()) { + jythondir.mkdirs(); @@ -14,17 +15,4 @@ + cachedir = new File(jythondir, cachedir.getPath()); } } - ---- jython/org/python/core/PySystemState.java~ 2004-02-16 17:27:22.000000000 -0500 -+++ jython/org/python/core/PySystemState.java 2004-02-16 17:29:05.000000000 -0500 -@@ -311,8 +311,8 @@ - } - try { - addRegistryFile(new File(prefix, "registry")); -- File homeFile = new File(registry.getProperty("user.home"), -- ".jython"); -+ File homeFile = new File(new File(registry.getProperty("user.home"), -+ ".jython"), "registry"); - addRegistryFile(homeFile); - } catch (Exception exc) { - ; + ++++++ jython-nofullbuildpath.patch ++++++ Index: jython-svn-Release_2_2_1/build.xml =================================================================== --- jython-svn-Release_2_2_1.orig/build.xml 2007-10-13 20:44:01.000000000 +0200 +++ jython-svn-Release_2_2_1/build.xml 2011-03-11 13:44:32.516562588 +0100 @@ -551,7 +551,7 @@ <!-- build the .html files using the ht2html tool --> - <target name="doc" depends="compile" if="full-build"> + <target name="doc" depends="compile"> <fail unless="ht2html.dir" message="ht2html.dir is not set" /> <copy todir="${dist.dir}/Doc" preservelastmodified="true"> <fileset dir="Doc" includes="*.ht, **/*.gif" /> @@ -572,7 +572,7 @@ <!-- javadoc --> - <target name="javadoc" depends="compile" if="full-build"> + <target name="javadoc" depends="compile"> <javadoc sourcepath="${source.dir}" destdir="${apidoc.dir}" source="${jdk.source.version}" @@ -588,7 +588,7 @@ <!-- copy for full distribution --> - <target name="copy-full" if="full-build"> + <target name="copy-full"> <!-- Misc files --> <echo>copy misc files from ${jython.base.dir}</echo> <copy todir="${dist.dir}" preservelastmodified="true"> @@ -599,7 +599,7 @@ <!-- copy the CPython license --> <echo>copy CPython LICENSE from ${svn.checkout.dir}/python</echo> - <copy file="${svn.checkout.dir}/python/LICENSE" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" /> + <copy file="LICENSE.txt" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" /> <!-- sources: todir has to correspond with installer/**/JarInstaller.java --> <echo>copy sources from ${jython.base.dir}</echo> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
