This commit is contained in:
parent
01e465f623
commit
ea572771d1
@ -1,18 +1,19 @@
|
|||||||
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
|
diff --git a/src/org/python/core/PySystemState.java b/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
|
index 1fb701d..ee9b38f 100644
|
||||||
+++ jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java 2007-03-23 09:41:27.000000000 -0400
|
--- a/src/org/python/core/PySystemState.java
|
||||||
@@ -534,7 +534,13 @@
|
+++ b/src/org/python/core/PySystemState.java
|
||||||
|
@@ -1278,9 +1278,11 @@ public class PySystemState extends PyObject
|
||||||
}
|
}
|
||||||
cachedir = new File(props.getProperty(PYTHON_CACHEDIR, CACHEDIR_DEFAULT_NAME));
|
cachedir = new File(props.getProperty(PYTHON_CACHEDIR, CACHEDIR_DEFAULT_NAME));
|
||||||
if (!cachedir.isAbsolute()) {
|
if (!cachedir.isAbsolute()) {
|
||||||
- cachedir = new File(PySystemState.prefix, cachedir.getPath());
|
- String prefixString = props.getProperty("user.dir", "");
|
||||||
|
- cachedir = new File(prefixString, cachedir.getPath());
|
||||||
|
- cachedir = cachedir.getAbsoluteFile();
|
||||||
+ File jythondir = new File(System.getProperty("user.home"), ".jython-cache");
|
+ File jythondir = new File(System.getProperty("user.home"), ".jython-cache");
|
||||||
+
|
|
||||||
+ if (!jythondir.isDirectory()) {
|
+ if (!jythondir.isDirectory()) {
|
||||||
+ jythondir.mkdirs();
|
+ jythondir.mkdirs();
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
+ cachedir = new File(jythondir, cachedir.getPath());
|
+ cachedir = new File(jythondir, cachedir.getPath());
|
||||||
}
|
}
|
||||||
|
logger.log(Level.CONFIG, "cache at {0}", cachedir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
jython-fix-tty-detection.patch
Normal file
14
jython-fix-tty-detection.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
--- src/shell/jython.orig 2017-08-11 16:24:32.831309328 +0100
|
||||||
|
+++ src/shell/jython 2017-08-11 16:23:55.346726416 +0100
|
||||||
|
@@ -242,6 +242,11 @@
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
+# Detect absence of tty
|
||||||
|
+if ! tty -s; then
|
||||||
|
+ JAVA_OPTS="$JAVA_OPTS -Dpython.launcher.tty=false"
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
if [ -n "$profile_requested" -o -z "$boot_requested" ] ; then
|
||||||
|
[ -n "$profile_requested" ] && echo "Running with instrumented profiler"
|
||||||
|
java_args=("${java_args[@]}" -classpath "$CP$CP_DELIMITER$CLASSPATH")
|
82
jython.spec
82
jython.spec
@ -38,6 +38,7 @@ BuildRequires: apache-commons-compress
|
|||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: glassfish-servlet-api
|
BuildRequires: glassfish-servlet-api
|
||||||
BuildRequires: guava
|
BuildRequires: guava
|
||||||
|
BuildRequires: jansi
|
||||||
BuildRequires: jarjar
|
BuildRequires: jarjar
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
@ -56,6 +57,7 @@ Requires: antlr3-tool
|
|||||||
Requires: apache-commons-compress
|
Requires: apache-commons-compress
|
||||||
Requires: glassfish-servlet-api
|
Requires: glassfish-servlet-api
|
||||||
Requires: guava
|
Requires: guava
|
||||||
|
Requires: jansi
|
||||||
Requires: jarjar
|
Requires: jarjar
|
||||||
Requires: jffi
|
Requires: jffi
|
||||||
Requires: jline
|
Requires: jline
|
||||||
@ -67,7 +69,6 @@ Requires: lucene-core
|
|||||||
Requires: objectweb-asm
|
Requires: objectweb-asm
|
||||||
Requires: stringtemplate4
|
Requires: stringtemplate4
|
||||||
Obsoletes: %{name}-manual
|
Obsoletes: %{name}-manual
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Jython is an implementation of the high-level, dynamic, object-oriented
|
Jython is an implementation of the high-level, dynamic, object-oriented
|
||||||
@ -91,6 +92,7 @@ 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
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
API documentation for %{name}.
|
API documentation for %{name}.
|
||||||
@ -99,6 +101,7 @@ API documentation for %{name}.
|
|||||||
Summary: Demonstration and samples for jython
|
Summary: Demonstration and samples for jython
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
%description demo
|
%description demo
|
||||||
Demonstrations and samples for %{name}.
|
Demonstrations and samples for %{name}.
|
||||||
@ -110,10 +113,23 @@ Demonstrations and samples for %{name}.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
build-jar-repository -s -p extlibs \
|
build-jar-repository -s -p extlibs \
|
||||||
jffi/jffi antlr3 antlr3-runtime commons-compress \
|
jffi/jffi \
|
||||||
glassfish-servlet-api guava/guava jarjar jline/jline \
|
antlr3 \
|
||||||
jnr/jnr-constants jnr/jnr-ffi jnr/jnr-posix junit lucene/lucene-core \
|
antlr3-runtime \
|
||||||
objectweb-asm/asm-commons objectweb-asm/asm objectweb-asm/asm-util \
|
commons-compress \
|
||||||
|
glassfish-servlet-api \
|
||||||
|
guava/guava \
|
||||||
|
jansi/jansi \
|
||||||
|
jarjar \
|
||||||
|
jline/jline \
|
||||||
|
jnr/jnr-constants \
|
||||||
|
jnr/jnr-ffi \
|
||||||
|
jnr/jnr-posix \
|
||||||
|
junit \
|
||||||
|
lucene/lucene-core \
|
||||||
|
objectweb-asm/asm \
|
||||||
|
objectweb-asm/asm-commons \
|
||||||
|
objectweb-asm/asm-util \
|
||||||
stringtemplate4/ST4
|
stringtemplate4/ST4
|
||||||
|
|
||||||
%{ant} -Djython.version=%{version}
|
%{ant} -Djython.version=%{version}
|
||||||
@ -125,10 +141,23 @@ popd
|
|||||||
# Symlink run-time libs
|
# Symlink run-time libs
|
||||||
rm dist/javalib/*.jar
|
rm dist/javalib/*.jar
|
||||||
build-jar-repository -s -p dist/javalib \
|
build-jar-repository -s -p dist/javalib \
|
||||||
jffi/jffi antlr3 antlr3-runtime commons-compress \
|
jffi/jffi \
|
||||||
glassfish-servlet-api guava/guava jarjar jline/jline \
|
antlr3 \
|
||||||
jnr/jnr-constants jnr/jnr-ffi jnr/jnr-posix junit lucene/lucene-core \
|
antlr3-runtime \
|
||||||
objectweb-asm/asm-commons objectweb-asm/asm objectweb-asm/asm-util \
|
commons-compress \
|
||||||
|
glassfish-servlet-api \
|
||||||
|
guava/guava \
|
||||||
|
jansi/jansi \
|
||||||
|
jarjar \
|
||||||
|
jline/jline \
|
||||||
|
jnr/jnr-constants \
|
||||||
|
jnr/jnr-ffi \
|
||||||
|
jnr/jnr-posix \
|
||||||
|
junit \
|
||||||
|
lucene/lucene-core \
|
||||||
|
objectweb-asm/asm \
|
||||||
|
objectweb-asm/asm-commons \
|
||||||
|
objectweb-asm/asm-util \
|
||||||
stringtemplate4/ST4
|
stringtemplate4/ST4
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -146,21 +175,24 @@ cp -pr dist/Doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
|||||||
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
|
||||||
# jython home dir
|
# jython home dir
|
||||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
install -d -m 755 %{buildroot}%{_libdir}/%{name}
|
||||||
ln -s %{_javadir}/%{name}.jar %{buildroot}%{_datadir}/%{name}
|
ln -s %{_javadir}/%{name}.jar %{buildroot}%{_libdir}/%{name}
|
||||||
cp -pr dist/javalib %{buildroot}%{_datadir}/%{name}
|
ln -s %{_javadir}/%{name}.jar %{buildroot}%{_libdir}/%{name}/%{name}-dev.jar
|
||||||
|
cp -pr dist/javalib %{buildroot}%{_libdir}/%{name}
|
||||||
rm dist/bin/jython_regrtest.bat
|
rm dist/bin/jython_regrtest.bat
|
||||||
cp -pr dist/bin %{buildroot}%{_datadir}/%{name}
|
rm dist/bin/jython.exe
|
||||||
install -m 644 dist/registry %{buildroot}%{_datadir}/%{name}
|
cp -pr dist/bin %{buildroot}%{_libdir}/%{name}
|
||||||
|
install -m 644 dist/registry %{buildroot}%{_libdir}/%{name}
|
||||||
|
|
||||||
# libs without tests
|
# libs without tests
|
||||||
rm -rf dist/Lib/{distutils/tests,email/test,json/tests,test,unittest/test}
|
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}%{_libdir}/%{name}
|
||||||
fdupes -s %{buildroot}%{_datadir}/%{name}/Lib
|
%fdupes -s %{buildroot}%{_libdir}/%{name}/Lib
|
||||||
|
|
||||||
# demo
|
# demo
|
||||||
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||||
cp -pr Demo %{buildroot}%{_datadir}/%{name}
|
cp -pr Demo %{buildroot}%{_datadir}/%{name}
|
||||||
fdupes -s %{buildroot}%{_datadir}/%{name}/Demo
|
%fdupes -s %{buildroot}%{_datadir}/%{name}/Demo
|
||||||
|
|
||||||
# javadoc
|
# javadoc
|
||||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}/Doc
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}/Doc
|
||||||
@ -168,22 +200,24 @@ ln -s %{_javadocdir}/%{name} %{buildroot}%{_datadir}/%{name}/Doc/javadoc
|
|||||||
|
|
||||||
# scripts
|
# scripts
|
||||||
install -d %{buildroot}%{_bindir}
|
install -d %{buildroot}%{_bindir}
|
||||||
ln -s %{_datadir}/%{name}/bin/jython %{buildroot}%{_bindir}
|
ln -s %{_libdir}/%{name}/bin/jython %{buildroot}%{_bindir}
|
||||||
|
|
||||||
%files -f .mfiles
|
%files -f .mfiles
|
||||||
%doc ACKNOWLEDGMENTS NEWS README.txt
|
%doc ACKNOWLEDGMENTS NEWS README.txt
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%attr(0755,root,root) %{_bindir}/%{name}
|
%attr(0755,root,root) %{_bindir}/%{name}
|
||||||
%dir %{_datadir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%{_datadir}/%{name}/bin
|
%{_libdir}/%{name}/bin
|
||||||
%{_datadir}/%{name}/javalib
|
%{_libdir}/%{name}/javalib
|
||||||
%{_datadir}/%{name}/jython.jar
|
%{_libdir}/%{name}/jython.jar
|
||||||
%{_datadir}/%{name}/Lib
|
%{_libdir}/%{name}/jython-dev.jar
|
||||||
%{_datadir}/%{name}/registry
|
%{_libdir}/%{name}/Lib
|
||||||
|
%{_libdir}/%{name}/registry
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{_javadocdir}/%{name}
|
%{_javadocdir}/%{name}
|
||||||
|
%dir %{_datadir}/%{name}
|
||||||
%{_datadir}/%{name}/Doc
|
%{_datadir}/%{name}/Doc
|
||||||
|
|
||||||
%files demo
|
%files demo
|
||||||
|
Loading…
Reference in New Issue
Block a user