2007-01-16 00:19:17 +01:00
|
|
|
#
|
2011-02-22 20:50:29 +01:00
|
|
|
# spec file for package jython
|
2007-01-16 00:19:17 +01:00
|
|
|
#
|
2023-06-27 14:41:58 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2007-01-16 00:19:17 +01:00
|
|
|
#
|
2009-06-19 00:36:33 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-23 10:24:37 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-02-28 15:11:53 +01:00
|
|
|
#
|
|
|
|
|
2007-01-16 00:19:17 +01:00
|
|
|
|
2021-06-21 16:46:14 +02:00
|
|
|
%global pyver %(python3 -c 'import sys;print(sys.version[0:3])')
|
2011-03-11 14:04:17 +01:00
|
|
|
%global cpython_version %{pyver}
|
2021-06-21 16:46:14 +02:00
|
|
|
%global pyxml_version %{pyver}
|
2011-03-11 14:04:17 +01:00
|
|
|
%global _python_bytecompile_errors_terminate_build 0
|
2007-01-16 00:19:17 +01:00
|
|
|
Name: jython
|
2023-06-27 14:41:58 +02:00
|
|
|
Version: 2.7.3
|
2012-02-28 15:11:53 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A Java implementation of the Python language
|
2021-06-21 16:46:14 +02:00
|
|
|
License: Apache-2.0 AND Python-2.0
|
2012-02-28 15:11:53 +01:00
|
|
|
Group: Development/Languages/Python
|
2022-03-20 13:21:00 +01:00
|
|
|
URL: https://www.jython.org/
|
2023-06-27 14:41:58 +02:00
|
|
|
Source0: %{name}-%{version}.tar.xz
|
|
|
|
Patch0: %{name}-build.patch
|
|
|
|
Patch1: %{name}-dont-validate-pom.patch
|
2012-02-28 15:11:53 +01:00
|
|
|
BuildRequires: ant
|
2023-06-27 14:41:58 +02:00
|
|
|
BuildRequires: ant-junit
|
|
|
|
BuildRequires: antlr3-java
|
|
|
|
BuildRequires: antlr3-tool
|
|
|
|
BuildRequires: apache-commons-compress
|
2018-11-23 10:24:37 +01:00
|
|
|
BuildRequires: fdupes
|
2023-06-27 14:41:58 +02:00
|
|
|
BuildRequires: glassfish-servlet-api
|
|
|
|
BuildRequires: guava
|
|
|
|
BuildRequires: jarjar
|
2017-12-18 13:27:52 +01:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2018-11-23 10:24:37 +01:00
|
|
|
BuildRequires: javapackages-local
|
2023-06-27 14:41:58 +02:00
|
|
|
BuildRequires: jffi
|
|
|
|
BuildRequires: jline
|
|
|
|
BuildRequires: jnr-constants
|
|
|
|
BuildRequires: jnr-ffi
|
|
|
|
BuildRequires: jnr-posix
|
|
|
|
BuildRequires: lucene-core
|
|
|
|
BuildRequires: objectweb-asm
|
2021-06-21 16:46:14 +02:00
|
|
|
BuildRequires: python3 >= %{cpython_version}
|
|
|
|
BuildRequires: python3-xml >= %{pyxml_version}
|
2023-06-27 14:41:58 +02:00
|
|
|
BuildRequires: stringtemplate4
|
|
|
|
Requires: antlr3-java
|
|
|
|
Requires: antlr3-tool
|
|
|
|
Requires: apache-commons-compress
|
|
|
|
Requires: glassfish-servlet-api
|
|
|
|
Requires: guava
|
|
|
|
Requires: jarjar
|
|
|
|
Requires: jffi
|
|
|
|
Requires: jline
|
|
|
|
Requires: jnr-constants
|
|
|
|
Requires: jnr-ffi
|
|
|
|
Requires: jnr-posix
|
|
|
|
Requires: junit
|
|
|
|
Requires: lucene-core
|
|
|
|
Requires: objectweb-asm
|
|
|
|
Requires: stringtemplate4
|
|
|
|
Obsoletes: %{name}-manual
|
2011-03-11 14:04:17 +01:00
|
|
|
BuildArch: noarch
|
2007-01-16 00:19:17 +01:00
|
|
|
|
|
|
|
%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 noncommercial 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
|
|
|
|
Summary: Javadoc for jython
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description javadoc
|
2023-06-27 14:41:58 +02:00
|
|
|
API documentation for %{name}.
|
2007-01-16 00:19:17 +01:00
|
|
|
|
|
|
|
%package demo
|
|
|
|
Summary: Demonstration and samples for jython
|
|
|
|
Group: Development/Libraries/Java
|
2012-02-28 15:11:53 +01:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2007-01-16 00:19:17 +01:00
|
|
|
|
|
|
|
%description demo
|
2023-06-27 14:41:58 +02:00
|
|
|
Demonstrations and samples for %{name}.
|
2007-01-16 00:19:17 +01:00
|
|
|
|
|
|
|
%prep
|
2023-06-27 14:41:58 +02:00
|
|
|
%setup -q
|
2007-01-16 00:19:17 +01:00
|
|
|
%patch0 -p1
|
2011-02-22 20:50:21 +01:00
|
|
|
%patch1 -p1
|
2007-01-16 00:19:17 +01:00
|
|
|
|
|
|
|
%build
|
2023-06-27 14:41:58 +02:00
|
|
|
build-jar-repository -s -p extlibs \
|
|
|
|
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
|
2011-03-11 14:04:17 +01:00
|
|
|
|
2023-06-27 14:41:58 +02:00
|
|
|
%{ant} -Djython.version=%{version}
|
2007-01-16 00:19:17 +01:00
|
|
|
|
2018-11-23 10:24:37 +01:00
|
|
|
pushd maven
|
2023-06-27 14:41:58 +02:00
|
|
|
%{ant} -Djython.version=%{version} bundle
|
2018-11-23 10:24:37 +01:00
|
|
|
popd
|
|
|
|
|
2023-06-27 14:41:58 +02:00
|
|
|
# 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
|
|
|
|
|
2007-01-16 00:19:17 +01:00
|
|
|
%install
|
|
|
|
# jar
|
2018-11-23 10:24:37 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_javadir}
|
2023-06-27 14:41:58 +02:00
|
|
|
install -m 644 dist/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
2018-11-23 10:24:37 +01:00
|
|
|
# pom
|
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
2023-06-27 14:41:58 +02:00
|
|
|
install -m 644 build/maven/%{name}-%{version}.pom %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
2019-06-26 17:53:54 +02:00
|
|
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a org.python:jython-standalone,jython:jython
|
2018-11-23 10:24:37 +01:00
|
|
|
|
2007-01-16 00:19:17 +01:00
|
|
|
# javadoc
|
2018-11-23 10:24:37 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr dist/Doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
|
2023-06-27 14:41:58 +02:00
|
|
|
# jython home dir
|
2018-11-23 10:24:37 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
2023-06-27 14:41:58 +02:00
|
|
|
ln -s %{_javadir}/%{name}.jar %{buildroot}%{_datadir}/%{name}
|
|
|
|
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}
|
2018-11-23 10:24:37 +01:00
|
|
|
cp -pr dist/Lib %{buildroot}%{_datadir}/%{name}
|
2023-06-27 14:41:58 +02:00
|
|
|
fdupes -s %{buildroot}%{_datadir}/%{name}/Lib
|
|
|
|
|
2011-03-11 14:04:17 +01:00
|
|
|
# demo
|
2023-06-27 14:41:58 +02:00
|
|
|
cp -pr Demo %{buildroot}%{_datadir}/%{name}
|
2018-11-23 10:24:37 +01:00
|
|
|
fdupes -s %{buildroot}%{_datadir}/%{name}/Demo
|
2011-03-11 14:04:17 +01:00
|
|
|
|
2023-06-27 14:41:58 +02:00
|
|
|
# javadoc
|
|
|
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}/Doc
|
|
|
|
ln -s %{_javadocdir}/%{name} %{buildroot}%{_datadir}/%{name}/Doc/javadoc
|
|
|
|
|
2007-01-16 00:19:17 +01:00
|
|
|
# scripts
|
2018-11-23 10:24:37 +01:00
|
|
|
install -d %{buildroot}%{_bindir}
|
2023-06-27 14:41:58 +02:00
|
|
|
ln -s %{_datadir}/%{name}/bin/jython %{buildroot}%{_bindir}
|
2011-03-11 14:04:17 +01:00
|
|
|
|
2023-06-27 14:41:58 +02:00
|
|
|
%files -f .mfiles
|
2018-11-23 10:24:37 +01:00
|
|
|
%doc ACKNOWLEDGMENTS NEWS README.txt
|
2023-06-27 14:41:58 +02:00
|
|
|
%license LICENSE.txt
|
2007-01-16 00:19:17 +01:00
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}
|
|
|
|
%dir %{_datadir}/%{name}
|
2023-06-27 14:41:58 +02:00
|
|
|
%{_datadir}/%{name}/bin
|
|
|
|
%{_datadir}/%{name}/javalib
|
|
|
|
%{_datadir}/%{name}/jython.jar
|
2007-01-16 00:19:17 +01:00
|
|
|
%{_datadir}/%{name}/Lib
|
|
|
|
%{_datadir}/%{name}/registry
|
|
|
|
|
2011-03-11 14:04:17 +01:00
|
|
|
%files javadoc
|
2018-11-23 10:24:37 +01:00
|
|
|
%license LICENSE.txt
|
2011-03-11 14:04:17 +01:00
|
|
|
%{_javadocdir}/%{name}
|
2023-06-27 14:41:58 +02:00
|
|
|
%{_datadir}/%{name}/Doc
|
2011-03-11 14:04:17 +01:00
|
|
|
|
2007-01-16 00:19:17 +01:00
|
|
|
%files demo
|
2018-11-23 10:24:37 +01:00
|
|
|
%license LICENSE.txt
|
2007-01-16 00:19:17 +01:00
|
|
|
%{_datadir}/%{name}/Demo
|
|
|
|
|
2009-06-19 00:36:33 +02:00
|
|
|
%changelog
|