Remove Python runtime support

Related: rhbz#1976978
This commit is contained in:
Mikolaj Izdebski 2021-06-28 11:19:52 +02:00
parent bd210d368c
commit bd75e6a790
2 changed files with 12 additions and 84 deletions

View File

@ -36,7 +36,7 @@
<!-- Build classes --> <!-- Build classes -->
<target name="classes" depends="prepare"> <target name="classes" depends="prepare">
<javac srcdir="${src}" destdir="${build.classes}" <javac srcdir="${src}" destdir="${build.classes}"
debug="off" optimize="on" deprecation="on" source="1.8" target="1.8" /> debug="off" optimize="on" deprecation="on"/>
</target> </target>
<!-- Build jar archives --> <!-- Build jar archives -->
@ -61,7 +61,6 @@
packagenames="${packagenames}" packagenames="${packagenames}"
splitindex="true" splitindex="true"
use="true" use="true"
source="1.8"
additionalparam="-Xdoclint:none"> additionalparam="-Xdoclint:none">
<link href="${j2se.apidoc}"/> <link href="${j2se.apidoc}"/>
</javadoc> </javadoc>

View File

@ -1,14 +1,10 @@
%bcond_without doxygen
%bcond_with python
%global debug_package %{nil} %global debug_package %{nil}
# since we have only a static library # since we have only a static library
Summary: ANother Tool for Language Recognition Summary: ANother Tool for Language Recognition
Name: antlr Name: antlr
Version: 2.7.7 Version: 2.7.7
Release: 65%{?dist} Release: 66%{?dist}
Epoch: 0
License: ANTLR-PD License: ANTLR-PD
URL: http://www.antlr2.org/ URL: http://www.antlr2.org/
# ./generate-tarball.sh # ./generate-tarball.sh
@ -22,26 +18,11 @@ Patch1: %{name}-%{version}-newgcc.patch
# see BZ#848662 # see BZ#848662
Patch2: antlr-examples-license.patch Patch2: antlr-examples-license.patch
%ifarch %{mono_arches}
%if ! 0%{?rhel} >= 6
BuildRequires: mono-core
BuildRequires: mono-winforms
%endif
%endif
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: make BuildRequires: make
BuildRequires: ant BuildRequires: ant
BuildRequires: java-devel >= 1:1.7.0 BuildRequires: java-devel
BuildRequires: java-javadoc
BuildRequires: javapackages-local BuildRequires: javapackages-local
%if %{with doxygen}
BuildRequires: doxygen graphviz
%endif
%if %{with python}
# Do not support Python3
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%endif
%description %description
ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a
@ -86,31 +67,6 @@ Provides: antlr-static = %{version}-%{release}
%description C++ %description C++
This package provides a static C++ library for parsers generated by ANTLR2. This package provides a static C++ library for parsers generated by ANTLR2.
%if %{with doxygen}
%package C++-doc
Summary: Documentation for C++ bindings for antlr2 generated parsers
BuildArch: noarch
%description C++-doc
This package contains the documentation for the C++ bindings for parsers
generated by ANTLR2.
%endif
%if %{with python}
%package -n python2-%{name}
Summary: Python 2 runtime support for ANTLR-generated parsers
%{?python_provide:%python_provide python2-%{name}}
# This can be removed in Fedora 30
Provides: %{name}-python = %{version}-%{release}
Obsoletes: %{name}-python < 2.7.7-48
BuildArch: noarch
%description -n python2-%{name}
Python runtime support for ANTLR-generated parsers
%endif
%prep %prep
%setup -q %setup -q
# remove all binary libs # remove all binary libs
@ -138,21 +94,6 @@ rm antlr.jar
rm doc/{Makefile,Makefile.in} rm doc/{Makefile,Makefile.in}
chmod 0644 doc/* chmod 0644 doc/*
%if %{with doxygen}
# generate doxygen docs for C++ bindings
pushd lib/cpp
doxygen doxygen.cfg
find gen_doc -type f -exec chmod 0644 {} \;
popd
%endif
%if %{with python}
# build python
cd lib/python
%py2_build
cd ../../
%endif
%install %install
# jars, POM and depmap # jars, POM and depmap
%mvn_artifact %{SOURCE3} work/lib/%{name}.jar %mvn_artifact %{SOURCE3} work/lib/%{name}.jar
@ -168,14 +109,6 @@ install -p -m 644 lib/cpp/antlr/*.hpp $RPM_BUILD_ROOT%{_includedir}/%{name}
install -p -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir} install -p -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir}
install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir} install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir}
%if %{with python}
# python
cd lib/python
%py2_install
cd ../..
%endif
%files tool -f .mfiles %files tool -f .mfiles
%license LICENSE.txt %license LICENSE.txt
%{_bindir}/antlr %{_bindir}/antlr
@ -189,12 +122,6 @@ cd ../..
%{_libdir}/libantlr.a %{_libdir}/libantlr.a
%{_bindir}/antlr-config %{_bindir}/antlr-config
%if %{with doxygen}
%files C++-doc
%license LICENSE.txt
%doc lib/cpp/gen_doc/html/
%endif
%files manual %files manual
%license LICENSE.txt %license LICENSE.txt
%doc doc/* %doc doc/*
@ -202,14 +129,10 @@ cd ../..
%files javadoc -f .mfiles-javadoc %files javadoc -f .mfiles-javadoc
%license LICENSE.txt %license LICENSE.txt
%if %{with python}
%files -n python2-%{name}
%license LICENSE.txt
%{python2_sitelib}/antlr/*
%{python2_sitelib}/antlr-*
%endif
%changelog %changelog
* Mon Jun 28 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.7.7-66
- Remove Python runtime
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 0:2.7.7-65 * Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 0:2.7.7-65
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
@ -228,9 +151,15 @@ cd ../..
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.7-60 * Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.7-60
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.7.7-58
- Mass rebuild for javapackages-tools 201902
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.7-59 * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.7-59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.7.7-57
- Mass rebuild for javapackages-tools 201901
* Wed Mar 27 2019 Miro Hrončok <mhroncok@redhat.com> - 0:2.7.7-58 * Wed Mar 27 2019 Miro Hrončok <mhroncok@redhat.com> - 0:2.7.7-58
- Subpackage python2-antlr was removed - Subpackage python2-antlr was removed
https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal