rebuilt [release 2.2.1.svn-6mamba;Wed Jul 31 2013]
This commit is contained in:
parent
109ded220e
commit
3c7540fa12
@ -1,2 +1,6 @@
|
||||
# jython
|
||||
|
||||
Jython is an implementation of the high-level, dynamic, object-oriented language Python seamlessly integrated with the Java platform.
|
||||
The predecessor to Jython, JPython, is certified as 100% Pure Java. Jython is freely available for both commercial and non-commercial use and is distributed with source code. Jython is complementary to Java and is especially suited for the following tasks: Embedded scripting - Java programmers can add the Jython libraries to their system to allow end users to write simple or complicated scripts that add functionality to the application. Interactive experimentation - Jython provides an interactive interpreter that can be used to interact with Java packages or with running Java applications. This allows programmers to experiment and debug any Java system using Jython. Rapid application development - Python programs are typically 2-10X shorter than the equivalent Java program.
|
||||
This translates directly to increased programmer productivity. The seamless interaction between Python and Java allows developers to freely mix the two languages both during development and in shipping products.
|
||||
|
||||
|
38
fetch-jython.sh
Normal file
38
fetch-jython.sh
Normal file
@ -0,0 +1,38 @@
|
||||
#!/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
|
||||
mv $project_name-svn-$svn_tag $project_name-$(echo $(echo $svn_tag | cut -d '_' -f 2-)| sed 's/_/./g').svn
|
||||
tar jcf $project_name-$(echo $(echo $svn_tag | cut -d '_' -f 2-)| sed 's/_/./g').svn.tar.bz2 \
|
||||
$project_name-$(echo $(echo $svn_tag | cut -d '_' -f 2-)| sed 's/_/./g').svn
|
||||
|
17
jython-2.2.1.svn-cachedir.patch
Normal file
17
jython-2.2.1.svn-cachedir.patch
Normal file
@ -0,0 +1,17 @@
|
||||
--- jython-2.2.1.svn/src/org/python/core/PySystemState.java 2007-10-13 20:44:01.000000000 +0200
|
||||
+++ jython-2.2.1.svn/src/org/python/core/PySystemState.java-gil 2009-02-22 02:30:58.000000000 +0100
|
||||
@@ -555,7 +555,13 @@
|
||||
}
|
||||
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-cache");
|
||||
+
|
||||
+ if (!jythondir.isDirectory()) {
|
||||
+ jythondir.mkdirs();
|
||||
+ }
|
||||
+
|
||||
+ cachedir = new File(jythondir, cachedir.getPath());
|
||||
}
|
||||
}
|
||||
|
38
jython-2.2.1.svn-nofullbuildpath.patch
Normal file
38
jython-2.2.1.svn-nofullbuildpath.patch
Normal file
@ -0,0 +1,38 @@
|
||||
--- jython-2.2.1.svn/build.xml 2007-10-13 20:44:01.000000000 +0200
|
||||
+++ jython-2.2.1.svn/build.xml-gil 2009-02-22 02:38:10.000000000 +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>
|
241
jython.spec
Normal file
241
jython.spec
Normal file
@ -0,0 +1,241 @@
|
||||
%define jythonver %(echo %version | cut -d '.' -f -3)
|
||||
%define javahome %{_jvmdir}/jdk
|
||||
Name: jython
|
||||
Version: 2.2.1.svn
|
||||
Release: 6mamba
|
||||
Summary: A Java implementation of the Python language
|
||||
Group: Development/Languages
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Automatic Build System <autodist@mambasoft.it>
|
||||
URL: http://www.jython.org/Project/
|
||||
# use fetch-jython.sh script to generate the source drop
|
||||
# sh fetch-jython.sh jython https://jython.svn.sourceforge.net/svnroot Release_2_2_1
|
||||
Source0: jython-%{version}.tar.bz2
|
||||
Source1: fetch-jython.sh
|
||||
Patch0: jython-2.2.1.svn-cachedir.patch
|
||||
Patch1: jython-2.2.1.svn-nofullbuildpath.patch
|
||||
License: BSD, Python Software Foundation License
|
||||
BuildRequires: apache-ant
|
||||
BuildRequires: apache-tomcat5-servletapi5
|
||||
BuildRequires: jakarta-oro
|
||||
BuildRequires: java-gcj-compat
|
||||
BuildRequires: java-jline
|
||||
BuildRequires: java-junit3
|
||||
BuildRequires: java-libreadline
|
||||
BuildRequires: java-mysql-connector
|
||||
%if "%{stage1}" != "1"
|
||||
BuildRequires: java-svnant
|
||||
%endif
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: libht2html
|
||||
BuildRequires: libpython-devel
|
||||
BuildRequires: postgresql-jdbc
|
||||
BuildRequires: python-xml
|
||||
Requires: apache-tomcat5-servletapi5
|
||||
Requires: jakarta-oro
|
||||
Requires: java-libreadline
|
||||
Requires: java-mysql-connector
|
||||
Requires: libht2html
|
||||
Requires: python
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
Jython is an implementation of the high-level, dynamic, object-oriented language Python seamlessly integrated with the Java platform.
|
||||
The predecessor to Jython, JPython, is certified as 100% Pure Java. Jython is freely available for both commercial and non-commercial use and is distributed with source code. Jython is complementary to Java and is especially suited for the following tasks: Embedded scripting - Java programmers can add the Jython libraries to their system to allow end users to write simple or complicated scripts that add functionality to the application. Interactive experimentation - Jython provides an interactive interpreter that can be used to interact with Java packages or with running Java applications. This allows programmers to experiment and debug any Java system using Jython. Rapid application development - Python programs are typically 2-10X shorter than the equivalent Java program.
|
||||
This translates directly to increased programmer productivity. The seamless interaction between Python and Java allows developers to freely mix the two languages both during development and in shipping products.
|
||||
|
||||
%package javadoc
|
||||
Group: Documentation
|
||||
Summary: Javadoc for %{name}
|
||||
|
||||
%description javadoc
|
||||
A Java implementation of the Python language.
|
||||
This package contains API documentation for %{name}.
|
||||
|
||||
%package manual
|
||||
Group: Documentation
|
||||
Summary: Manual for %{name}
|
||||
|
||||
%description manual
|
||||
A Java implementation of the Python language.
|
||||
This package contains documentation for %{name}.
|
||||
|
||||
%package demo
|
||||
Group: Documentation
|
||||
Summary: Demo for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description demo
|
||||
A Java implementation of the Python language.
|
||||
This package contains demonstrations and samples for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath oro servletapi5 javacc jline mysql-connector-java svnant postgresql-jdbc svn-javahl)
|
||||
export CLASSPATH=$CLASSPATH:%{_libdir}/libreadline-java/libreadline-java.jar
|
||||
rm -rf org/apache
|
||||
|
||||
perl -p -i -e 's|execon|apply|g' build.xml
|
||||
|
||||
ant \
|
||||
-Dpython.home=%{_bindir} \
|
||||
-Dht2html.dir=%{_datadir}/ht2html \
|
||||
-Dpython.lib=./CPythonLib \
|
||||
-Dpython.exe=%{__python} \
|
||||
-DPyXmlHome=%{_libdir}/python%pyver \
|
||||
%if "%{stage1}" != "1"
|
||||
-Dsvnant.jar.dir=%{_javadir} \
|
||||
%endif
|
||||
-Djavahl.dir=%{_javadir} \
|
||||
-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
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
|
||||
install -d -m 755 %{buildroot}%{_javadir}
|
||||
install -m 644 dist/%{name}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}-%{jythonver}.jar
|
||||
pushd %{buildroot}%{_javadir}
|
||||
for jar in *-%{jythonver}*
|
||||
do
|
||||
ln -sf ${jar} ${jar/-%{jythonver}/}
|
||||
done
|
||||
popd
|
||||
|
||||
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{jythonver}
|
||||
cp -pr dist/Doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{jythonver}
|
||||
|
||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||
|
||||
find dist/Lib -type d -name test | xargs rm -rf
|
||||
|
||||
cp -pr dist/Lib %{buildroot}%{_datadir}/%{name}
|
||||
cp -pr dist/Tools %{buildroot}%{_datadir}/%{name}
|
||||
|
||||
cp -pr dist/Demo %{buildroot}%{_datadir}/%{name}
|
||||
|
||||
rm -rf dist/Doc/javadoc
|
||||
mv dist/Doc %{name}-manual-%{jythonver}
|
||||
|
||||
|
||||
# registry
|
||||
install -m 644 registry %{buildroot}%{_datadir}/%{name}
|
||||
# scripts
|
||||
install -d %{buildroot}%{_bindir}
|
||||
|
||||
cat > %{buildroot}%{_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
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS=org.python.util.%{name}
|
||||
BASE_FLAGS=-Dpython.home=%{_datadir}/%{name}
|
||||
BASE_JARS="%{name} oro servletapi5 mysql-connector-java"
|
||||
|
||||
BASE_FLAGS="\$BASE_FLAGS -Dpython.console=org.python.util.ReadlineConsole"
|
||||
BASE_FLAGS="\$BASE_FLAGS -Djava.library.path=%{_libdir}/libreadline-java"
|
||||
BASE_FLAGS="\$BASE_FLAGS -Dpython.console.readlinelib=Editline"
|
||||
|
||||
# Set parameters
|
||||
set_jvm
|
||||
CLASSPATH=$CLASSPATH:%{_libdir}/libreadline-java/libreadline-java.jar
|
||||
set_classpath \$BASE_JARS
|
||||
set_flags \$BASE_FLAGS
|
||||
set_options \$BASE_OPTIONS
|
||||
|
||||
# Let's start
|
||||
run "\$@"
|
||||
EOF
|
||||
|
||||
cat > %{buildroot}%{_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
|
||||
|
||||
|
||||
#%{_bindir}/aot-compile-rpm \
|
||||
# --exclude %{_datadir}/%{name}/Demo/jreload \
|
||||
# --exclude %{_datadir}/%{name}/Demo/jreload/example.jar
|
||||
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%attr(0755,root,root) %{_bindir}/jython
|
||||
%attr(0755,root,root) %{_bindir}/jythonc
|
||||
%{_javadir}/jython-%{jythonver}.jar
|
||||
%{_javadir}/jython.jar
|
||||
%dir %{_datadir}/jython
|
||||
%{_datadir}/jython/Lib
|
||||
%{_datadir}/jython/Tools
|
||||
%{_datadir}/jython/registry
|
||||
%doc ACKNOWLEDGMENTS NEWS LICENSE.txt README.txt
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root)
|
||||
%doc %{_javadocdir}/%{name}-%{jythonver}
|
||||
|
||||
%files manual
|
||||
%defattr(-,root,root)
|
||||
%doc %{name}-manual-%{jythonver}
|
||||
|
||||
%files demo
|
||||
%defattr(-,root,root)
|
||||
%doc %{_datadir}/%{name}/Demo
|
||||
|
||||
%changelog
|
||||
* Wed Jul 31 2013 Automatic Build System <autodist@mambasoft.it> 2.2.1.svn-6mamba
|
||||
- rebuilt
|
||||
|
||||
* Mon Mar 28 2011 gil <puntogil@libero.it> 2.2.1.svn-5mamba
|
||||
- rebuilt with java-gcj-compat support
|
||||
|
||||
* Tue May 18 2010 gil <puntogil@libero.it> 2.2.1.svn-4mamba
|
||||
- rebuilt with sun-java 6u20 and python 2.6
|
||||
|
||||
* Mon Jan 04 2010 gil <puntogil@libero.it> 2.2.1.svn-3mamba
|
||||
- rebuilt with java-mysql-connector java-subversion java-svnant postgresql-jdbc python-xml support
|
||||
|
||||
* Mon Mar 09 2009 gil <puntogil@libero.it> 2.2.1.svn-2mamba
|
||||
- rebuilt with java-servletapi5
|
||||
|
||||
* Tue Jan 27 2009 gil <puntogil@libero.it> 2.2.1.svn-1mamba
|
||||
- package created by autospec
|
Loading…
Reference in New Issue
Block a user