diff --git a/python-demjson.spec b/python-demjson.spec index 13b272a..971fb5a 100644 --- a/python-demjson.spec +++ b/python-demjson.spec @@ -2,15 +2,13 @@ Name: python-%{srcname} Version: 2.2.4 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Python JSON module and lint checker License: LGPLv3+ URL: http://deron.meranda.us/python/%{srcname}/ Source0: http://deron.meranda.us/python/%{srcname}/dist/%{srcname}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python2-devel BuildRequires: python3-devel -BuildRequires: python2-setuptools BuildRequires: python3-setuptools BuildRequires: %{_bindir}/2to3 @@ -26,14 +24,6 @@ to make it easier to read. %{base_description} -%package -n python2-%{srcname} -Summary: Python JSON module and lint checker -%{?python_provide:%python_provide python2-%{srcname}} - -%description -n python2-%{srcname} -%{base_description} - - %package -n python3-%{srcname} Summary: Python JSON module and lint checker %{?python_provide:%python_provide python3-%{srcname}} @@ -43,81 +33,42 @@ Summary: Python JSON module and lint checker %prep -%autosetup -c -n %{srcname}-%{version} -mv %{srcname}-%{version} python2 -cp -a python2 python3 +%autosetup -n %{srcname}-%{version} %build -pushd python2 -%py2_build -popd - -pushd python3 %py3_build -popd %install -pushd python2 -%py2_install -mv %{buildroot}%{_bindir}/jsonlint %{buildroot}%{_bindir}/jsonlint-%{python2_version} -ln -s jsonlint-%{python2_version} %{buildroot}%{_bindir}/jsonlint-2 -popd - -pushd python3 %py3_install -mv %{buildroot}%{_bindir}/jsonlint %{buildroot}%{_bindir}/jsonlint-%{python3_version} -ln -s jsonlint-%{python3_version} %{buildroot}%{_bindir}/jsonlint-3 -popd # fix shebang lines -find %{buildroot}%{python2_sitelib} \ - %{buildroot}%{python3_sitelib} \ +find %{buildroot}%{python3_sitelib} \ -name '*.py' -exec \ sed -i "1{/^#!/d}" {} \; -find %{buildroot}%{_bindir} -ls - -# 3.X binary is called by default for now -ln -s jsonlint-%{python3_version} %{buildroot}%{_bindir}/jsonlint - %check -pushd python2/test -PYTHONPATH=%{buildroot}%{python2_sitelib} \ -%{__python2} test_demjson.py -popd - -pushd python3/test +pushd test 2to3 -w --no-diffs test_demjson.py PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{__python3} test_demjson.py popd -%files -n python2-%{srcname} -%doc python2/README.txt -%doc python2/README.md -%doc python2/docs -%license python2/LICENSE.txt -%{python2_sitelib}/* -%{_bindir}/jsonlint-2 -%{_bindir}/jsonlint-%{python2_version} - - %files -n python3-%{srcname} -%doc python3/README.txt -%doc python3/README.md -%doc python3/docs -%license python3/LICENSE.txt +%doc README.txt README.md +%doc docs +%license LICENSE.txt %{python3_sitelib}/* %{_bindir}/jsonlint -%{_bindir}/jsonlint-3 -%{_bindir}/jsonlint-%{python3_version} %changelog +* Tue Aug 27 2019 Thomas Moschny - 2.2.4-15 +- Remove Python2 subpackage (bz#1745780). + * Mon Aug 19 2019 Miro HronĨok - 2.2.4-14 - Rebuilt for Python 3.8