diff --git a/python-rdflib.spec b/python-rdflib.spec index 9b67121..0abe980 100644 --- a/python-rdflib.spec +++ b/python-rdflib.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 4.2.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Python library for working with RDF License: BSD @@ -13,12 +13,6 @@ Source0: http://pypi.python.org/packages/source/r/rdflib/rdflib-%{version Patch1: %{name}-SPARQLWrapper-optional.patch BuildArch: noarch -BuildRequires: python2-html5lib >= 1: -BuildRequires: python2-isodate -BuildRequires: python2-pyparsing -BuildRequires: python2-devel -BuildRequires: python2-setuptools - BuildRequires: python3-html5lib >= 1: BuildRequires: python3-isodate BuildRequires: python3-pyparsing @@ -26,7 +20,6 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools %if %{run_tests} -BuildRequires: python2-nose >= 0.9.2 BuildRequires: python3-nose >= 0.9.2 %endif @@ -42,29 +35,6 @@ implementations for in memory storage, persistent storage on top of the Berkeley DB, and a wrapper for remote SPARQL endpoints. -%package -n python2-%{pypi_name} -Summary: %{summary} -%{?python_provide:%python_provide python2-%{pypi_name}} -Requires: python2-html5lib >= 1: -Requires: python2-isodate -Requires: python2-pyparsing -Obsoletes: python-rdfextras <= 0.1-7 -Provides: python-rdfextras = %{version}-%{release} - -%description -n python2-%{pypi_name} -RDFLib is a Python library for working with RDF, a simple yet powerful -language for representing information. - -The library contains parsers and serializers for RDF/XML, N3, -NTriples, Turtle, TriX, RDFa and Microdata. The library presents -a Graph interface which can be backed by any one of a number of -Store implementations. The core rdflib includes store -implementations for in memory storage, persistent storage on top -of the Berkeley DB, and a wrapper for remote SPARQL endpoints. - -This is for Python 2. - - %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} @@ -99,24 +69,13 @@ find -name "*.pyc" -delete sed -i -e 's|_sn_gen=bnode_uuid()|_sn_gen=bnode_uuid|' test/test_bnode_ncname.py -# Separate dirs needed -rm -rf %{py3dir} -cp -a . %{py3dir} - %build -pushd %{py3dir} %py3_build -popd - -%py2_build %install -%py2_install -pushd %{py3dir} %py3_install -popd # rename binaries for i in csv2rdf rdf2dot rdfgraphisomorphism rdfpipe rdfs2dot; do @@ -125,7 +84,6 @@ for i in csv2rdf rdf2dot rdfgraphisomorphism rdfpipe rdfs2dot; do ln -s $i-%{python3_version} %{buildroot}%{_bindir}/$i-3 done -cp LICENSE %{buildroot}%{python2_sitelib}/rdflib/LICENSE cp LICENSE %{buildroot}%{python3_sitelib}/rdflib/LICENSE # Various .py files within site-packages have a shebang line but aren't @@ -134,34 +92,28 @@ cp LICENSE %{buildroot}%{python3_sitelib}/rdflib/LICENSE # executable as appropriate: # __main__ parses URI as N-Triples: -chmod +x %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/rdflib/plugins/parsers/ntriples.py +chmod +x %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/ntriples.py # __main__ parses the file given on the command line: -chmod +x %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/rdflib/plugins/parsers/notation3.py +chmod +x %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/notation3.py # __main__ parses the file or URI given on the command line: -chmod +x %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/rdflib/tools/rdfpipe.py +chmod +x %{buildroot}%{python3_sitelib}/rdflib/tools/rdfpipe.py # __main__ runs a test (well, it's something) -chmod +x %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/rdflib/extras/infixowl.py \ - %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/rdflib/extras/external_graph_libs.py +chmod +x %{buildroot}%{python3_sitelib}/rdflib/extras/infixowl.py \ + %{buildroot}%{python3_sitelib}/rdflib/extras/external_graph_libs.py # sed these headers out as they include no __main__ -for lib in %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/rdflib/extras/describer.py \ - %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/rdflib/plugins/parsers/pyRdfa/extras/httpheader.py \ - %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/rdflib/plugins/parsers/structureddata.py; do +for lib in %{buildroot}%{python3_sitelib}/rdflib/extras/describer.py \ + %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/pyRdfa/extras/httpheader.py \ + %{buildroot}%{python3_sitelib}/rdflib/plugins/parsers/structureddata.py; do sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done # sed shebangs -sed -i '1s=^#!/usr/bin/\(python\|env python\).*=#!%{__python2}=' \ - %{buildroot}%{python2_sitelib}/rdflib/extras/infixowl.py \ - %{buildroot}%{python2_sitelib}/rdflib/extras/external_graph_libs.py \ - %{buildroot}%{python2_sitelib}/rdflib/plugins/parsers/ntriples.py \ - %{buildroot}%{python2_sitelib}/rdflib/tools/rdfpipe.py \ - %{buildroot}%{python2_sitelib}/rdflib/plugins/parsers/notation3.py sed -i '1s=^#!/usr/bin/\(python\|env python\).*=#!%{__python3}=' \ %{buildroot}%{python3_sitelib}/rdflib/extras/infixowl.py \ %{buildroot}%{python3_sitelib}/rdflib/extras/external_graph_libs.py \ @@ -174,23 +126,13 @@ sed -i '1s=^#!/usr/bin/\(python\|env python\).*=#!%{__python3}=' \ sed -i -e "s|'--with-doctest'|#'--with-doctest'|" run_tests.py sed -i -e "s|'--doctest-tests'|#'--doctest-tests'|" run_tests.py sed -i -e "s|with-doctest = 1|#with-doctest = 1|" setup.cfg -# skip test_issue375, need to investigate the failure -PYTHONPATH=./build/lib %{__python2} run_tests.py --verbose || : -pushd %{py3dir}/build/src # The python 3 tests are failing, but better to have them here anyway # TODO investigate the failures %{__python3} run_tests.py --verbose || : -popd %endif -%files -n python2-%{pypi_name} -%license LICENSE -%doc README.md -%{python2_sitelib}/%{pypi_name} -%{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info - %files -n python3-%{pypi_name} %license LICENSE %doc README.md @@ -208,6 +150,10 @@ popd %{_bindir}/rdfs2dot-3* %changelog +* Mon Sep 16 2019 Miro Hrončok - 4.2.1-13 +- Subpackage python2-rdflib has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + * Fri Aug 16 2019 Miro Hrončok - 4.2.1-12 - Rebuilt for Python 3.8