remove python subpackages

Signed-off-by: siddharthvipul <siddharthvipul1@gmail.com>
This commit is contained in:
siddharthvipul 2020-04-06 03:20:01 +05:30
parent 7f47e13e9d
commit fba57f00ae

View File

@ -2,24 +2,21 @@
Name: python-%{srcname}
Version: 0.15.2
Release: 4%{?dist}
Release: 5%{?dist}
Summary: System for processing plaintext documentation
# See COPYING.txt for information
License: Public Domain and BSD and Python and GPLv3+
URL: http://docutils.sourceforge.net
#Source0: http://downloads.sourceforge.net/docutils/%%{srcname}-%%{version}.tar.gz
Source0: http://downloads.sourceforge.net/docutils/%{srcname}-%%{version}.tar.gz
# Sometimes we need snapshots. Instructions below:
# svn co -r 7687 svn://svn.code.sf.net/p/docutils/code/trunk/docutils
# cd docutils
# python setup.py sdist
# The tarball is in dist/docutils-VERSION.tar.gz
Source0: %{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@ -34,21 +31,6 @@ Currently, the library supports parsing rST that is in standalone files and
PEPs (Python Enhancement Proposals). Work is underway to parse rST from
Python inline documentation modules and packages.
%package -n python2-%{srcname}
Summary: System for processing plaintext documentation for python2
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
The Docutils project specifies a plaintext markup language, reStructuredText,
which is easy to read and quick to write. The project includes a python
library to parse rST files and transform them into other useful formats such
as HTML, XML, and TeX as well as commandline tools that give the enduser
access to this functionality.
Currently, the library supports parsing rST that is in standalone files and
PEPs (Python Enhancement Proposals). Work is underway to parse rST from
Python inline documentation modules and packages.
%package -n python3-%{srcname}
Summary: System for processing plaintext documentation for python3
%{?python_provide:%python_provide python3-%{srcname}}
@ -70,8 +52,6 @@ This package contains the module, ported to run under python3.
%prep
%autosetup -c -n %{srcname}-%{version}
# Upstream needs separate python2 and 3 folders as it utilizes 2to3 in
# a custom hackish way
pushd %{srcname}-%{version}
# Remove shebang from library files
@ -86,7 +66,6 @@ popd
# Create the two folders mentioned above
mv %{srcname}-%{version} python3
cp -rp python3 python2
# Get the doc and license files out
pushd python3
@ -102,25 +81,12 @@ rm python3/test/test_writers/test_odt.py
%endif
%build
pushd python2
%py2_build
popd
pushd python3
%py3_build
popd
%install
pushd python2
%py2_install
# Flash file is used for testing docutils but shouldn't be in the installed package.
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
popd
rm -f %{buildroot}/%{_bindir}/*
pushd python3
%py3_install
mv docs/user/rst/images/biohazard.swf ./biohazard.swf
@ -136,21 +102,11 @@ done
%check
for PY in 2 3; do
pushd python${PY}
mv biohazard.swf docs/user/rst/images/biohazard.swf
python${PY} test${PY/2/}/alltests.py
rm docs/user/rst/images/biohazard.swf
popd
done
%files -n python2-%{srcname}
%license COPYING.txt licenses/*
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
%doc THANKS.txt python2/docs editors
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
pushd python3
mv biohazard.swf docs/user/rst/images/biohazard.swf
python3 test3/alltests.py
rm docs/user/rst/images/biohazard.swf
popd
%files -n python3-%{srcname}
@ -163,6 +119,9 @@ done
%changelog
* Sat Apr 04 2020 siddharthvipul <siddharthvipul1@gmail.com> - 0.15.2-5
- Remove python2 subpackage
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild