This commit is contained in:
parent
60709d1372
commit
01e465f623
17
_service
Normal file
17
_service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<services>
|
||||||
|
<service name="tar_scm" mode="disabled">
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="url">https://github.com/jython/jython.git</param>
|
||||||
|
<param name="revision">v2.7.3</param>
|
||||||
|
<param name="match-tag">v*</param>
|
||||||
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
|
<param name="versionrewrite-pattern">v(.*)</param>
|
||||||
|
<param name="exclude">**/*.jar</param>
|
||||||
|
<param name="exclude">**/*.zip</param>
|
||||||
|
</service>
|
||||||
|
<service name="recompress" mode="disabled">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">xz</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="disabled"/>
|
||||||
|
</services>
|
@ -1,35 +0,0 @@
|
|||||||
#!/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
|
|
3
jython-2.7.3.tar.xz
Normal file
3
jython-2.7.3.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8bbcc0f202babdcb0845c6755ac7ab2f59c9443bebbf532a9f4f577207062ff5
|
||||||
|
size 12406520
|
143
jython-build.patch
Normal file
143
jython-build.patch
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
--- a/build.xml
|
||||||
|
+++ b/build.xml
|
||||||
|
@@ -242,44 +242,14 @@ informix.jar = ../support/jdbc-4.10.12.jar
|
||||||
|
<filelist files="${informix.location} ${oracle.location}" />
|
||||||
|
|
||||||
|
<!-- Further database and Java EE-related JARs -->
|
||||||
|
- <filelist dir="${extlibs.dir}">
|
||||||
|
- <file name="servlet-api-2.5.jar" />
|
||||||
|
- <file name="mysql-connector-java-5.1.42-bin.jar" />
|
||||||
|
- <file name="postgresql-42.1.1.jre7.jar" />
|
||||||
|
- </filelist>
|
||||||
|
+ <fileset dir="${extlibs.dir}">
|
||||||
|
+ <include name="**/*"/>
|
||||||
|
+ </fileset>
|
||||||
|
|
||||||
|
- <!-- Other JARs (alphabetical) -->
|
||||||
|
- <filelist dir="${extlibs.dir}">
|
||||||
|
- <file name="antlr-complete-3.5.2.jar" /> <!-- ANTLR 3 until we upgrade parsing -->
|
||||||
|
- <file name="asm-9.3.jar" />
|
||||||
|
- <file name="asm-commons-9.3.jar" />
|
||||||
|
- <file name="asm-util-9.3.jar" />
|
||||||
|
- <file name="commons-compress-1.21.jar"/>
|
||||||
|
- <file name="failureaccess-1.0.1.jar" />
|
||||||
|
- <file name="guava-31.0.1-jre.jar" />
|
||||||
|
- <file name="icu4j-71.1.jar" />
|
||||||
|
- <file name="jffi-1.3.9.jar"/>
|
||||||
|
- <file name="java-sizeof-0.0.5.jar"/>
|
||||||
|
- <file name="jnr-constants-0.10.3.jar"/>
|
||||||
|
- <file name="jnr-ffi-2.2.12.jar"/>
|
||||||
|
- <file name="jnr-netdb-1.2.0.jar"/>
|
||||||
|
- <file name="jnr-posix-3.1.15.jar"/>
|
||||||
|
- <file name="jline-2.14.5.jar"/>
|
||||||
|
- <file name="netty-buffer-4.1.73.Final.jar"/>
|
||||||
|
- <file name="netty-codec-4.1.73.Final.jar"/>
|
||||||
|
- <file name="netty-common-4.1.73.Final.jar"/>
|
||||||
|
- <file name="netty-handler-4.1.73.Final.jar"/>
|
||||||
|
- <file name="netty-resolver-4.1.73.Final.jar"/>
|
||||||
|
- <file name="netty-transport-4.1.73.Final.jar"/>
|
||||||
|
- </filelist>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<path id="test.classpath">
|
||||||
|
<path refid="main.classpath"/>
|
||||||
|
- <filelist dir="${extlibs.dir}">
|
||||||
|
- <!-- Pin to 4.10 until dependency on hamcrest classes resolved. -->
|
||||||
|
- <file name="junit-4.10.jar" />
|
||||||
|
- </filelist>
|
||||||
|
<pathelement location="${exposed.dir}" />
|
||||||
|
<pathelement location="${compile.dir}" />
|
||||||
|
<pathelement location="${test.compile.dir}" />
|
||||||
|
@@ -835,80 +805,13 @@ The text for an official release would continue like ...
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jar-complete" depends="jar, pycompile">
|
||||||
|
- <taskdef name="jarjar" classname="org.pantsbuild.jarjar.JarJarTask">
|
||||||
|
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask">
|
||||||
|
<classpath>
|
||||||
|
- <pathelement path="extlibs/jarjar-1.7.2.jar" />
|
||||||
|
<path refid="main.classpath" />
|
||||||
|
</classpath>
|
||||||
|
</taskdef>
|
||||||
|
<jarjar destfile="${dist.dir}/${jython.deploy.jar}" update="${jar.update}">
|
||||||
|
<zipfileset src="${dist.dir}/${jython.dev.jar}"/>
|
||||||
|
- <!-- pin to Antlr 3 until we upgrade parsing -->
|
||||||
|
- <zipfileset src="extlibs/antlr-runtime-3.5.2.jar"/>
|
||||||
|
- <rule pattern="org.antlr.runtime.**" result="org.python.antlr.runtime.@1"/>
|
||||||
|
- <zipfileset src="extlibs/asm-9.3.jar" excludes="module-info.class"/>
|
||||||
|
- <zipfileset src="extlibs/asm-commons-9.3.jar" excludes="module-info.class"/>
|
||||||
|
- <zipfileset src="extlibs/asm-util-9.3.jar" excludes="module-info.class"/>
|
||||||
|
- <rule pattern="org.objectweb.asm.**" result="org.python.objectweb.asm.@1"/>
|
||||||
|
- <zipfileset src="extlibs/bcpkix-jdk18on-1.71.jar" excludes="META-INF/**"/>
|
||||||
|
- <zipfileset src="extlibs/bcprov-jdk18on-1.71.jar" excludes="META-INF/**"/>
|
||||||
|
- <rule pattern="org.bouncycastle.**" result="org.python.bouncycastle.@1"/>
|
||||||
|
- <zipfileset src="extlibs/commons-compress-1.21.jar"/>
|
||||||
|
- <rule pattern="org.apache.commons.compress.**" result="org.python.apache.commons.compress.@1"/>
|
||||||
|
- <zipfileset src="extlibs/failureaccess-1.0.1.jar"/>
|
||||||
|
- <zipfileset src="extlibs/guava-31.0.1-jre.jar"/>
|
||||||
|
- <rule pattern="com.google.**" result="org.python.google.@1"/>
|
||||||
|
- <zipfileset src="extlibs/icu4j-71.1.jar"/>
|
||||||
|
- <rule pattern="com.ibm.icu.**" result="org.python.icu.@1"/>
|
||||||
|
- <zipfileset src="extlibs/netty-buffer-4.1.73.Final.jar" excludes="META-INF/**"/>
|
||||||
|
- <rule pattern="io.netty.**" result="org.python.netty.@1"/>
|
||||||
|
- <zipfileset src="extlibs/netty-codec-4.1.73.Final.jar" excludes="META-INF/**"/>
|
||||||
|
- <rule pattern="io.netty.**" result="org.python.netty.@1"/>
|
||||||
|
- <zipfileset src="extlibs/netty-common-4.1.73.Final.jar" excludes="META-INF/**"/>
|
||||||
|
- <rule pattern="io.netty.**" result="org.python.netty.@1"/>
|
||||||
|
- <zipfileset src="extlibs/netty-handler-4.1.73.Final.jar" excludes="META-INF/**"/>
|
||||||
|
- <rule pattern="io.netty.**" result="org.python.netty.@1"/>
|
||||||
|
- <zipfileset src="extlibs/netty-resolver-4.1.73.Final.jar" excludes="META-INF/**"/>
|
||||||
|
- <rule pattern="io.netty.**" result="org.python.netty.@1"/>
|
||||||
|
- <zipfileset src="extlibs/netty-transport-4.1.73.Final.jar" excludes="META-INF/**"/>
|
||||||
|
- <rule pattern="io.netty.**" result="org.python.netty.@1"/>
|
||||||
|
- <zipfileset src="${extlibs.dir}/java-sizeof-0.0.5.jar"/>
|
||||||
|
- <rule pattern="com.carrotsearch.sizeof.**" result="org.python.sizeof.@1"/>
|
||||||
|
- <!-- these stub jars are pre-built in https://github.com/jnr/jffi/tree/master/archive
|
||||||
|
- and rarely if ever change -->
|
||||||
|
- <zipfileset src="extlibs/jffi-aarch64-Linux.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-arm-Linux.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-Darwin.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-i386-FreeBSD.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-i386-Linux.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-i386-OpenBSD.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-i386-SunOS.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-i386-Windows.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-ppc64le-Linux.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-ppc-AIX.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-ppc-Linux.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-ppc64-Linux.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-s390x-Linux.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-sparc-SunOS.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-sparcv9-SunOS.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-x86_64-FreeBSD.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-x86_64-Linux.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-x86_64-OpenBSD.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-x86_64-SunOS.jar"/>
|
||||||
|
- <zipfileset src="extlibs/jffi-x86_64-Windows.jar"/>
|
||||||
|
- <!-- remainder of JNR, JFFI -->
|
||||||
|
- <zipfileset src="extlibs/jffi-1.3.9.jar"/>
|
||||||
|
- <zipfileset src="${extlibs.dir}/jnr-constants-0.10.3.jar"/>
|
||||||
|
- <zipfileset src="${extlibs.dir}/jnr-ffi-2.2.12.jar"/>
|
||||||
|
- <zipfileset src="${extlibs.dir}/jnr-netdb-1.2.0.jar"/>
|
||||||
|
- <zipfileset src="${extlibs.dir}/jnr-posix-3.1.15.jar"/>
|
||||||
|
- <zipfileset src="extlibs/xercesImpl-2.12.2.jar" excludes="META-INF/services/*"/>
|
||||||
|
- <rule pattern="org.apache.xml.**" result="org.python.apache.xml.@1"/>
|
||||||
|
- <rule pattern="org.apache.xerces.**" result="org.python.apache.xerces.@1"/>
|
||||||
|
- <rule pattern="org.apache.wml.**" result="org.python.apache.wml.@1"/>
|
||||||
|
- <rule pattern="org.apache.html.**" result="org.python.apache.html.@1"/>
|
||||||
|
- <zipfileset src="extlibs/jline-2.14.5.jar"/>
|
||||||
|
- <rule pattern="jline.**" result="org.python.jline.@1"/>
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="org.python.util.jython" />
|
||||||
|
<attribute name="Built-By" value="${user.name}" />
|
||||||
|
--- a/src/org/python/core/PySystemState.java
|
||||||
|
+++ b/src/org/python/core/PySystemState.java
|
||||||
|
@@ -55,7 +55,7 @@ import org.python.expose.ExposedType;
|
||||||
|
import org.python.modules.Setup;
|
||||||
|
import org.python.util.Generic;
|
||||||
|
|
||||||
|
-import com.carrotsearch.sizeof.RamUsageEstimator;
|
||||||
|
+import org.apache.lucene.util.RamUsageEstimator;
|
||||||
|
|
||||||
|
import jnr.posix.util.Platform;
|
||||||
|
|
@ -1,44 +1,99 @@
|
|||||||
--- jython-svn-Release_2_2_1/maven/build.xml 2007-03-26 22:02:00.000000000 +0200
|
Only in jython-2.7.3: build.xml.orig
|
||||||
+++ jython-svn-Release_2_2_1/maven/build.xml 2018-11-23 10:04:54.897037648 +0100
|
Only in jython-2.7.3: build.xml.rej
|
||||||
@@ -85,8 +85,6 @@
|
--- jython-2.7.3/maven/build.xml 2023-06-27 13:47:28.639774958 +0200
|
||||||
|
+++ jython-2.7.3/maven/build.xml 2023-06-27 13:58:10.216237299 +0200
|
||||||
<move file="${stage}/${install.name}.jar"
|
@@ -155,9 +155,6 @@
|
||||||
tofile="${install.dir}/${install.name}.jar"/>
|
</filterset>
|
||||||
- <move file="${stage}/${install.name}-sources.jar"
|
</copy>
|
||||||
- tofile="${install.dir}/${install.name}-sources.jar"/>
|
|
||||||
|
|
||||||
<checksum algorithm="SHA1" fileext=".sha1">
|
|
||||||
<fileset dir="${install.dir}" excludes="*.sha1,*.md5,*.tmp"/>
|
|
||||||
@@ -114,7 +112,7 @@
|
|
||||||
<!--
|
|
||||||
Performs Maven build staging
|
|
||||||
-->
|
|
||||||
- <target name="stage" depends="validate-pom">
|
|
||||||
+ <target name="stage">
|
|
||||||
<property name="stage" value="${build}/"/>
|
|
||||||
<mkdir dir="${stage}"/>
|
|
||||||
|
|
||||||
@@ -135,23 +133,6 @@
|
|
||||||
</jar>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
- <!--
|
- <!-- Sign everything. -->
|
||||||
- Performs POM Schema validation.
|
- <sign-all stageDir="@{stageDir}" artifactId="@{artifactId}" version="@{version}" />
|
||||||
- -->
|
-
|
||||||
- <target name="validate-pom">
|
<!-- JAR-up the entire contents of the staging directory. -->
|
||||||
- <xmlvalidate failonerror="true" file="maven/pom.xml">
|
<jar jarfile="${pubs.dir}/@{basename}-bundle.jar">
|
||||||
- <attribute name="http://xml.org/sax/features/validation"
|
<fileset dir="@{stageDir}" />
|
||||||
- value="true"/>
|
@@ -175,9 +172,6 @@
|
||||||
- <attribute name="http://apache.org/xml/features/validation/schema"
|
<attribute name="stageDir" default="${build.maven}" />
|
||||||
- value="true"/>
|
<attribute name="basename" default="@{artifactId}-@{version}" />
|
||||||
- <attribute name="http://xml.org/sax/features/namespaces"
|
<sequential>
|
||||||
- value="true"/>
|
- <!-- Validate the POM -->
|
||||||
- <property
|
- <validate-pom file="@{fromdir}/@{basename}.pom" />
|
||||||
- name="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation"
|
-
|
||||||
- value="maven/maven-v4_0_0.xsd"/>
|
<!-- Clean the staging directory. -->
|
||||||
- </xmlvalidate>
|
<delete dir="@{stageDir}" />
|
||||||
- </target>
|
<mkdir dir="@{stageDir}" />
|
||||||
-
|
@@ -190,9 +184,6 @@
|
||||||
<target name="build-jython" depends="clean">
|
</fileset>
|
||||||
<ant antfile="build.xml" target="developer-build"/>
|
</copy>
|
||||||
</target>
|
|
||||||
|
- <!-- Sign everything. -->
|
||||||
|
- <sign-all stageDir="@{stageDir}" artifactId="@{artifactId}" version="@{version}" />
|
||||||
|
-
|
||||||
|
<!-- JAR-up the entire contents of the staging directory. -->
|
||||||
|
<jar jarfile="${pubs.dir}/@{basename}-bundle.jar">
|
||||||
|
<fileset dir="@{stageDir}" />
|
||||||
|
@@ -200,61 +191,11 @@
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
- <!-- Add detached signature for single artifact in staging directory. -->
|
||||||
|
- <macrodef name="sign-detached">
|
||||||
|
- <attribute name="file" />
|
||||||
|
- <attribute name="stageDir" />
|
||||||
|
- <sequential>
|
||||||
|
- <!-- Generate a detached signature for each artifact in the bundle. -->
|
||||||
|
- <exec executable="gpg" dir="@{stageDir}">
|
||||||
|
- <arg value="-ab" />
|
||||||
|
- <arg value="@{file}" />
|
||||||
|
- </exec>
|
||||||
|
- </sequential>
|
||||||
|
- </macrodef>
|
||||||
|
-
|
||||||
|
- <!-- Add detached signatures for group of artifacts in staging directory. -->
|
||||||
|
- <macrodef name="sign-all">
|
||||||
|
- <attribute name="artifactId" />
|
||||||
|
- <attribute name="version" />
|
||||||
|
- <attribute name="stageDir" />
|
||||||
|
- <attribute name="basename" default="@{artifactId}-@{version}" />
|
||||||
|
- <sequential>
|
||||||
|
- <sign-detached stageDir="@{stageDir}" file="@{basename}.pom" />
|
||||||
|
- <sign-detached stageDir="@{stageDir}" file="@{basename}.jar" />
|
||||||
|
- <sign-detached stageDir="@{stageDir}" file="@{basename}-sources.jar" />
|
||||||
|
- <sign-detached stageDir="@{stageDir}" file="@{basename}-javadoc.jar" />
|
||||||
|
- </sequential>
|
||||||
|
- </macrodef>
|
||||||
|
-
|
||||||
|
- <!-- Validate a Maven POM . -->
|
||||||
|
- <macrodef name="validate-pom">
|
||||||
|
- <attribute name="file" />
|
||||||
|
- <sequential>
|
||||||
|
- <xmlvalidate failonerror="true" file="@{file}">
|
||||||
|
- <attribute name="http://xml.org/sax/features/validation" value="true" />
|
||||||
|
- <attribute name="http://apache.org/xml/features/validation/schema" value="true" />
|
||||||
|
- <attribute name="http://xml.org/sax/features/namespaces" value="true" />
|
||||||
|
- <property name="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation" value="maven/maven-v4_0_0.xsd" />
|
||||||
|
- </xmlvalidate>
|
||||||
|
- </sequential>
|
||||||
|
- </macrodef>
|
||||||
|
-
|
||||||
|
- <!-- Validate the POM template. -->
|
||||||
|
- <target name="validate-template-pom">
|
||||||
|
- <validate-pom file="maven/pom-template.xml"/>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
- <!-- Validate the base POM produced by Gradle task generatePomFileForMainPublication. -->
|
||||||
|
- <target name="validate-gradle-pom" depends="version">
|
||||||
|
- <validate-pom file="${gradle.base}/publications/main/pom-default.xml"/>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
<target name="build-jython" if="do.build">
|
||||||
|
<ant antfile="build.xml" target="all-jars" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
- <target name="prepare" depends="build-jython, validate-template-pom, version">
|
||||||
|
+ <target name="prepare" depends="build-jython, version">
|
||||||
|
<local name="artifacts" />
|
||||||
|
<property name="artifacts" value="${gradle.repo}/${m2.groupDir}/jython-slim/${jython.version}" />
|
||||||
|
<condition property="gradle.published">
|
||||||
|
Only in jython-2.7.3/maven: build.xml.orig
|
||||||
|
Only in jython-2.7.3/maven: build.xml.rej
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:169a2b022faf7362a54591f06585a8f03e88a31df6063d39039f62facbb0854b
|
|
||||||
size 2546326
|
|
303
jython.spec
303
jython.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package jython
|
# spec file for package jython
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -19,54 +19,54 @@
|
|||||||
%global pyver %(python3 -c 'import sys;print(sys.version[0:3])')
|
%global pyver %(python3 -c 'import sys;print(sys.version[0:3])')
|
||||||
%global cpython_version %{pyver}
|
%global cpython_version %{pyver}
|
||||||
%global pyxml_version %{pyver}
|
%global pyxml_version %{pyver}
|
||||||
%global svn_tag Release_2_2_1
|
|
||||||
%global _python_bytecompile_errors_terminate_build 0
|
%global _python_bytecompile_errors_terminate_build 0
|
||||||
Name: jython
|
Name: jython
|
||||||
Version: 2.2.1
|
Version: 2.7.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Java implementation of the Python language
|
Summary: A Java implementation of the Python language
|
||||||
License: Apache-2.0 AND Python-2.0
|
License: Apache-2.0 AND Python-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://www.jython.org/
|
URL: https://www.jython.org/
|
||||||
# Use the included fetch-jython.sh script to generate the source drop
|
Source0: %{name}-%{version}.tar.xz
|
||||||
# for jython 2.2.1
|
Patch0: %{name}-build.patch
|
||||||
# sh fetch-jython.sh \
|
Patch1: %{name}-dont-validate-pom.patch
|
||||||
# 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
|
|
||||||
# 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
|
|
||||||
# These address CVE-2013-2027 (http://bugs.jython.org/msg8004)
|
|
||||||
Patch3: %{name}-cacheperms.patch
|
|
||||||
Patch4: %{name}-makeCompiledFilename.patch
|
|
||||||
Patch5: %{name}-cached-classes.patch
|
|
||||||
Patch6: %{name}-sourcetarget.patch
|
|
||||||
Patch7: %{name}-module.patch
|
|
||||||
Patch8: %{name}-compareto.patch
|
|
||||||
Patch9: %{name}-dont-validate-pom.patch
|
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
|
BuildRequires: ant-junit
|
||||||
|
BuildRequires: antlr3-java
|
||||||
|
BuildRequires: antlr3-tool
|
||||||
|
BuildRequires: apache-commons-compress
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: jakarta-oro
|
BuildRequires: glassfish-servlet-api
|
||||||
|
BuildRequires: guava
|
||||||
|
BuildRequires: jarjar
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
BuildRequires: jline1
|
BuildRequires: jffi
|
||||||
BuildRequires: libreadline-java >= 0.8.0
|
BuildRequires: jline
|
||||||
BuildRequires: mysql-connector-java
|
BuildRequires: jnr-constants
|
||||||
|
BuildRequires: jnr-ffi
|
||||||
|
BuildRequires: jnr-posix
|
||||||
|
BuildRequires: lucene-core
|
||||||
|
BuildRequires: objectweb-asm
|
||||||
BuildRequires: python3 >= %{cpython_version}
|
BuildRequires: python3 >= %{cpython_version}
|
||||||
BuildRequires: python3-xml >= %{pyxml_version}
|
BuildRequires: python3-xml >= %{pyxml_version}
|
||||||
BuildRequires: servletapi5
|
BuildRequires: stringtemplate4
|
||||||
Requires: jakarta-oro
|
Requires: antlr3-java
|
||||||
Requires: java >= 1.8
|
Requires: antlr3-tool
|
||||||
Requires: javapackages-local
|
Requires: apache-commons-compress
|
||||||
Requires: jline1
|
Requires: glassfish-servlet-api
|
||||||
Requires: libreadline-java >= 0.8.0
|
Requires: guava
|
||||||
Requires: python3 >= %{cpython_version}
|
Requires: jarjar
|
||||||
Requires: servletapi5
|
Requires: jffi
|
||||||
Recommends: mysql-connector-java
|
Requires: jline
|
||||||
|
Requires: jnr-constants
|
||||||
|
Requires: jnr-ffi
|
||||||
|
Requires: jnr-posix
|
||||||
|
Requires: junit
|
||||||
|
Requires: lucene-core
|
||||||
|
Requires: objectweb-asm
|
||||||
|
Requires: stringtemplate4
|
||||||
|
Obsoletes: %{name}-manual
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -88,55 +88,12 @@ programmer productivity. The seamless interaction between Python and
|
|||||||
Java allows developers to freely mix the two languages both during
|
Java allows developers to freely mix the two languages both during
|
||||||
development and in shipping products.
|
development and in shipping products.
|
||||||
|
|
||||||
%package manual
|
|
||||||
Summary: Manual for jython
|
|
||||||
Group: Development/Libraries/Java
|
|
||||||
|
|
||||||
%description manual
|
|
||||||
This package contains the manual for 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.
|
|
||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadoc for jython
|
Summary: Javadoc for jython
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
This package contains the javadoc documentation for jython.
|
API documentation for %{name}.
|
||||||
|
|
||||||
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 demo
|
%package demo
|
||||||
Summary: Demonstration and samples for jython
|
Summary: Demonstration and samples for jython
|
||||||
@ -144,76 +101,43 @@ Group: Development/Libraries/Java
|
|||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%description demo
|
%description demo
|
||||||
This package contains demonstration and sample files for Jython.
|
Demonstrations and samples for %{name}.
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-svn-%{svn_tag}
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
|
||||||
%patch9 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CLASSPATH=$(build-classpath mysql-connector-java oro servlet jline1)
|
build-jar-repository -s -p extlibs \
|
||||||
# FIXME: fix jpackage-utils to handle multilib correctly
|
jffi/jffi antlr3 antlr3-runtime commons-compress \
|
||||||
export CLASSPATH=$CLASSPATH:%{_libdir}/libreadline-java/libreadline-java.jar
|
glassfish-servlet-api guava/guava jarjar jline/jline \
|
||||||
|
jnr/jnr-constants jnr/jnr-ffi jnr/jnr-posix junit lucene/lucene-core \
|
||||||
|
objectweb-asm/asm-commons objectweb-asm/asm objectweb-asm/asm-util \
|
||||||
|
stringtemplate4/ST4
|
||||||
|
|
||||||
rm -rf org/apache
|
%{ant} -Djython.version=%{version}
|
||||||
perl -p -i -e 's|execon|apply|g' build.xml
|
|
||||||
|
|
||||||
%{ant} \
|
|
||||||
-Dpython.home=%{_bindir} \
|
|
||||||
-Dht2html.dir=%{_datadir}/ht2html \
|
|
||||||
-Dpython.lib=./CPythonLib \
|
|
||||||
-Dpython.exe=%{_bindir}/python3 \
|
|
||||||
-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
|
|
||||||
|
|
||||||
pushd maven
|
pushd maven
|
||||||
# generate maven pom
|
%{ant} -Djython.version=%{version} bundle
|
||||||
ant -Dproject.version=%{version} install
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# Symlink run-time libs
|
||||||
|
rm dist/javalib/*.jar
|
||||||
|
build-jar-repository -s -p dist/javalib \
|
||||||
|
jffi/jffi antlr3 antlr3-runtime commons-compress \
|
||||||
|
glassfish-servlet-api guava/guava jarjar jline/jline \
|
||||||
|
jnr/jnr-constants jnr/jnr-ffi jnr/jnr-posix junit lucene/lucene-core \
|
||||||
|
objectweb-asm/asm-commons objectweb-asm/asm objectweb-asm/asm-util \
|
||||||
|
stringtemplate4/ST4
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# jar
|
# jar
|
||||||
install -d -m 755 %{buildroot}%{_javadir}
|
install -d -m 755 %{buildroot}%{_javadir}
|
||||||
install -m 644 dist/%{name}.jar \
|
install -m 644 dist/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||||
%{buildroot}%{_javadir}/%{name}.jar
|
|
||||||
# pom
|
# pom
|
||||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||||
install -m 644 build/maven/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
install -m 644 build/maven/%{name}-%{version}.pom %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a org.python:jython-standalone,jython:jython
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a org.python:jython-standalone,jython:jython
|
||||||
|
|
||||||
# javadoc
|
# javadoc
|
||||||
@ -221,112 +145,49 @@ install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
|||||||
cp -pr dist/Doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
cp -pr dist/Doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||||
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
|
||||||
# data
|
# jython home dir
|
||||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||||
# these are not supposed to be distributed
|
ln -s %{_javadir}/%{name}.jar %{buildroot}%{_datadir}/%{name}
|
||||||
find dist/Lib -type d -name test | xargs rm -rf
|
cp -pr dist/javalib %{buildroot}%{_datadir}/%{name}
|
||||||
|
rm dist/bin/jython_regrtest.bat
|
||||||
|
cp -pr dist/bin %{buildroot}%{_datadir}/%{name}
|
||||||
|
install -m 644 dist/registry %{buildroot}%{_datadir}/%{name}
|
||||||
|
|
||||||
|
# libs without tests
|
||||||
|
rm -rf dist/Lib/{distutils/tests,email/test,json/tests,test,unittest/test}
|
||||||
cp -pr dist/Lib %{buildroot}%{_datadir}/%{name}
|
cp -pr dist/Lib %{buildroot}%{_datadir}/%{name}
|
||||||
cp -pr dist/Tools %{buildroot}%{_datadir}/%{name}
|
fdupes -s %{buildroot}%{_datadir}/%{name}/Lib
|
||||||
# demo
|
|
||||||
cp -pr dist/Demo %{buildroot}%{_datadir}/%{name}
|
# demo
|
||||||
fdupes -s %{buildroot}%{_datadir}/%{name}/Demo
|
cp -pr Demo %{buildroot}%{_datadir}/%{name}
|
||||||
fdupes -s %{buildroot}%{_datadir}/%{name}/{Lib,Tools}
|
fdupes -s %{buildroot}%{_datadir}/%{name}/Demo
|
||||||
# manual
|
|
||||||
rm -rf dist/Doc/javadoc
|
# javadoc
|
||||||
mv dist/Doc %{name}-manual-%{version}
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}/Doc
|
||||||
%fdupes -s %{name}-manual-%{version}
|
ln -s %{_javadocdir}/%{name} %{buildroot}%{_datadir}/%{name}/Doc/javadoc
|
||||||
|
|
||||||
# registry
|
|
||||||
install -m 644 registry %{buildroot}%{_datadir}/%{name}
|
|
||||||
# scripts
|
# scripts
|
||||||
install -d %{buildroot}%{_bindir}
|
install -d %{buildroot}%{_bindir}
|
||||||
|
ln -s %{_datadir}/%{name}/bin/jython %{buildroot}%{_bindir}
|
||||||
|
|
||||||
cat > %{buildroot}%{_bindir}/%{name} << EOF
|
%files -f .mfiles
|
||||||
#!/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="%{_libdir}" ;;
|
|
||||||
* )
|
|
||||||
JYTHONLIBDIR="%{_prefix}/lib" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Configuration
|
|
||||||
MAIN_CLASS=org.python.util.%{name}
|
|
||||||
BASE_FLAGS=-Dpython.home=%{_datadir}/%{name}
|
|
||||||
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 > %{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
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license LICENSE.txt
|
|
||||||
%doc ACKNOWLEDGMENTS NEWS README.txt
|
%doc ACKNOWLEDGMENTS NEWS README.txt
|
||||||
|
%license LICENSE.txt
|
||||||
%attr(0755,root,root) %{_bindir}/%{name}
|
%attr(0755,root,root) %{_bindir}/%{name}
|
||||||
%attr(0755,root,root) %{_bindir}/%{name}c
|
|
||||||
%{_javadir}/*
|
|
||||||
%{_mavenpomdir}/*
|
|
||||||
%dir %{_datadir}/%{name}
|
%dir %{_datadir}/%{name}
|
||||||
|
%{_datadir}/%{name}/bin
|
||||||
|
%{_datadir}/%{name}/javalib
|
||||||
|
%{_datadir}/%{name}/jython.jar
|
||||||
%{_datadir}/%{name}/Lib
|
%{_datadir}/%{name}/Lib
|
||||||
%{_datadir}/%{name}/Tools
|
|
||||||
%{_datadir}/%{name}/registry
|
%{_datadir}/%{name}/registry
|
||||||
%if %{defined _maven_repository}
|
|
||||||
%{_mavendepmapfragdir}/%{name}
|
|
||||||
%else
|
|
||||||
%{_datadir}/maven-metadata/%{name}.xml*
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{_javadocdir}/%{name}
|
%{_javadocdir}/%{name}
|
||||||
|
%{_datadir}/%{name}/Doc
|
||||||
%files manual
|
|
||||||
%license LICENSE.txt
|
|
||||||
%doc README.txt
|
|
||||||
%doc %{name}-manual-%{version}
|
|
||||||
|
|
||||||
%files demo
|
%files demo
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc ACKNOWLEDGMENTS NEWS README.txt
|
|
||||||
%{_datadir}/%{name}/Demo
|
%{_datadir}/%{name}/Demo
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user