%global scm_tag v2.7.1 %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') Name: jython Version: 2.7.1 Release: 2 Summary: A Java implementation of the Python language License: ASL 1.1 and BSD URL: http://www.jython.org/ %bcond_without rpmwheels Source0: https://github.com/jython/jython/archive/%{scm_tag}.tar.gz Patch0: jython-cachedir.patch Patch1: jython-dont-validate-pom.patch Patch2: jython-no-carrotsearch-sizeof.patch Patch3: jython-launcher.patch Patch4: jython-fix-multiprocessing.patch Patch5: jython-fix-tty-detection.patch Patch189: jython-use-rpm-wheels.patch Requires: antlr32-java apache-commons-compress bouncycastle bouncycastle-pkix guava Requires: objectweb-asm jctools >= 2.0.2 jnr-constants jnr-ffi jnr-netdb jnr-posix jffi Requires: jffi-native jline jansi icu4j netty >= 4.1.13 xerces-j2 BuildRequires: javapackages-local ant ant-junit glassfish-servlet-api antlr32-tool BuildRequires: apache-commons-compress bouncycastle guava objectweb-asm BuildRequires: jctools >= 2.0.2 jnr-constants jnr-ffi jnr-netdb jnr-posix jffi jffi-native BuildRequires: jline jansi icu4j netty >= 4.1.13 xerces-j2 %if %{with rpmwheels} BuildRequires: python-setuptools-wheel python-pip-wheel Requires: python-setuptools-wheel python-pip-wheel %else Provides: bundled(python2-pip) = 9.0.1 Provides: bundled(python2-setuptools) = 28.8.0 %endif BuildArch: noarch %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 Summary: Javadoc for %{name} Obsoletes: %{name}-manual = %{version}-%{release} Provides: %{name}-manual < %{version}-%{release} %description javadoc API documentation for %{name}. %package demo Summary: Demo for %{name} Requires: %{name} = %{version}-%{release} %description demo Demonstrations and samples for %{name}. %prep %setup -q -n jython-%{version} %patch2 -R -p1 %patch0 %patch1 %patch3 %patch4 -p1 %patch5 find . -type f -a -name *.jar -delete find . -type f -a -name *.exe -delete find . -type f -a -name *.dll -delete %if %{with rpmwheels} %patch189 -p1 rm Lib/ensurepip/_bundled/*.whl rmdir Lib/ensurepip/_bundled %endif rm -rf extlibs/* sed -i -e '/ - 2.7.1-2 - Fix build failure caused by guava upgrade * Mon Aug 3 2020 yanan li - 2.7.1-1 - Package init