Bug 1086844 - Python 3 version of RDFLib
Summary: Python 3 version of RDFLib
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rdflib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
Depends On: 1031321 1070074
Blocks: 1116470
TreeView+ depends on / blocked
Reported: 2014-04-11 16:21 UTC by Dan Scott
Modified: 2015-04-08 06:58 UTC (History)
5 users (show)

Fixed In Version: python-rdflib-4.1.2-3.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-01-05 12:58:25 UTC
Type: Bug

Attachments (Terms of Use)
python-rdflib.spec (7.31 KB, text/x-rpm-spec)
2014-07-04 20:59 UTC, Ganapathi Kamath
no flags Details
python3-rdflib-4.2.1-2.f21.src.rpm (920.55 KB, application/x-rpm)
2014-11-13 19:48 UTC, Ganapathi Kamath
no flags Details
python-rdflib.spec (comment 6) (7.44 KB, text/x-rpm-spec)
2014-11-13 23:48 UTC, Ganapathi Kamath
no flags Details
python-rdflib.spec (comment 10) (8.19 KB, text/x-matlab)
2014-12-24 18:43 UTC, Ganapathi Kamath
no flags Details

Description Dan Scott 2014-04-11 16:21:49 UTC
Description of problem: RDFLib supports both Python 2 and Python 3, but we only package a Python 2 version

Comment 1 Dan Scott 2014-04-11 16:22:58 UTC
We need a Python3 version of python-isodate (per bug 1031321) and also want to update python-rdflib to the latest 4.1.x version (per bug 1070074) before we can add Python3 support to python-rdflib.

Comment 2 Ganapathi Kamath 2014-07-04 20:59:56 UTC
Created attachment 914768 [details]

Attached spec file that builds python3-rdflib 
one changes the line of the previous spec file to 
Requires:      python3-rdflib

The trouble is -  
python3-selenium-2.40.0-2 depends on python-rdflib 
Bug 1116470 	

python3-rdflib and python-rdflib both install some files to
and so they clas with each other

Comment 3 Ganapathi Kamath 2014-07-04 21:01:35 UTC
$ rpm -qa | egrep -i isodate

isodate is already there.

Comment 4 Ganapathi Kamath 2014-11-13 19:48:03 UTC
Created attachment 957279 [details]

Attached python3-rdflib-4.2.1-2.f21.src.rpm   
Seems to build
A patch0 was made
It requires python3-SPARQLWrapper-1.6.4-1.f21.noarch from Bug 1089553 to be preinstalled  (this yet needs to be added to spec file as a requires)

Comment 5 Ganapathi Kamath 2014-11-13 23:48:39 UTC
Created attachment 957373 [details]
python-rdflib.spec (comment 6)

added a line is spec file to change the shebang python version
for i in `find . -name "*.py"` ; do sed -i -e "s/env python/env python3/g" "$i" ; done

Comment 6 Ganapathi Kamath 2014-11-14 00:03:54 UTC
sorry, that spec update didn't do it. python2.7 shebangs are creeping in from somewhere and I can't find it.

Comment 7 Ganapathi Kamath 2014-11-14 10:23:24 UTC
I think the shebang is made when creating the rpm during the _bindir 
changing the shebang to python3 after rpm installation on about 5 tools that are installed in /usr/bin is all that is needed. 

This is just to carify that the rest of all the rdflib rpm goes to the python3 sitelib, and the simple rdf programs seem to work.

Comment 8 Matthias Runge 2014-11-28 10:54:19 UTC
Ganapathi, thank you for looking into this.

you'll need to rename python3 binaries (what goes to /usr/bin/ to something else, like python3-csv2rdf.
Otherwise, those scripts will be overwritten by their python2.7 counterparts.

Comment 9 Matthias Runge 2014-12-16 10:34:29 UTC
any progress here?

Comment 10 Ganapathi Kamath 2014-12-24 18:43:53 UTC
Created attachment 972803 [details]
python-rdflib.spec (comment 10)

spec file to rename console-scripts to be suffixed with 'python3-'

It was probably an atrpms-rpm-config-204-1.noarch.rpm macro python_burninversion.sh that kept overwriting the shebang which I uninstalled.

Comment 11 Matthias Runge 2015-01-05 12:58:25 UTC
OK, I finally went ahead and used my proven packager powers to do


Comment 12 Fedora Update System 2015-03-19 09:19:22 UTC
python-rdflib-4.1.2-3.fc21 has been submitted as an update for Fedora 21.

Comment 13 Fedora Update System 2015-04-08 06:58:38 UTC
python-rdflib-4.1.2-3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.