* Circular dependencies in python modules
@ 2015-01-20 22:08 Andreas Enge
2015-01-21 22:24 ` Andreas Enge
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Enge @ 2015-01-20 22:08 UTC (permalink / raw)
To: guix-devel
Hello!
To package zeitgeist, I need python2-rdflib. With python 3, there was no
problem, but with python 2, there seems to be a dependency on sparqlwrapper:
...
Installed /gnu/store/kxd0yf301yz53cp8lyn7acyha78sfcjk-python2-rdflib-4.1.2/lib/python2.7/site-packages/rdflib-4.1.2-py2.7.egg
Processing dependencies for rdflib==4.1.2
Searching for SPARQLWrapper
Reading https://pypi.python.org/simple/SPARQLWrapper/
Download error on https://pypi.python.org/simple/SPARQLWrapper/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'SPARQLWrapper' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or download links found for SPARQLWrapper
error: Could not find suitable distribution for Requirement.parse('SPARQLWrapper')
phase `install' failed after 1 seconds
But sparqlwrapper depends on rdflib (I tried it out, and its web page
also states this). How is this possible, and how is it solved?
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Circular dependencies in python modules
2015-01-20 22:08 Andreas Enge
@ 2015-01-21 22:24 ` Andreas Enge
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Enge @ 2015-01-21 22:24 UTC (permalink / raw)
To: guix-devel
Looking at the code of both modules on github, there is:
https://github.com/RDFLib/sparqlwrapper/blob/master/requirements.txt
rdflib
rdflib_jsonld
and
https://github.com/RDFLib/rdflib/blob/master/requirements.py2.txt
flake8
isodate
pyparsing<=1.5.7
SPARQLWrapper
(and similarly for python3; no idea why there the installation worked
without sparqlwrapper).
So what can we do?
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Circular dependencies in python modules
@ 2015-01-22 8:50 Federico Beffa
2015-01-22 19:37 ` Andreas Enge
0 siblings, 1 reply; 6+ messages in thread
From: Federico Beffa @ 2015-01-22 8:50 UTC (permalink / raw)
To: andreas, Guix-devel
Andreas Enge <andreas@enge.fr> writes:
> Looking at the code of both modules on github, there is:
> https://github.com/RDFLib/sparqlwrapper/blob/master/requirements.txt
> rdflib
> rdflib_jsonld
> and
> https://github.com/RDFLib/rdflib/blob/master/requirements.py2.txt
> flake8
> isodate
> pyparsing<=1.5.7
> SPARQLWrapper
> (and similarly for python3; no idea why there the installation worked
> without sparqlwrapper).
>
> So what can we do?
It appears that SPARQLWrapper is not really needed and you can disable
dependency guessing with '--no-guessing-deps'. See
https://sources.debian.net/src/rdflib/4.1.2-3/debian/rules/
Regards,
Fede
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Circular dependencies in python modules
2015-01-22 8:50 Circular dependencies in python modules Federico Beffa
@ 2015-01-22 19:37 ` Andreas Enge
2015-01-22 21:15 ` Cyril Roelandt
0 siblings, 1 reply; 6+ messages in thread
From: Andreas Enge @ 2015-01-22 19:37 UTC (permalink / raw)
To: Federico Beffa; +Cc: Guix-devel
On Thu, Jan 22, 2015 at 09:50:35AM +0100, Federico Beffa wrote:
> It appears that SPARQLWrapper is not really needed and you can disable
> dependency guessing with '--no-guessing-deps'. See
> https://sources.debian.net/src/rdflib/4.1.2-3/debian/rules/
Thanks for the suggestion! This seems to be some debian specific macro in
their package recipes; I tried it as a configure flag, and setup.py chokes
on it.
However, there are these lines in setup.py:
kwargs['install_requires'] = [
'isodate',
'pyparsing', 'SPARQLWrapper']
explicitly in the "else" branch of
if sys.version_info[0] >= 3:
So this would explain why there was no problem with python-3.
I would suggest to patch this 'SPARQLWrapper' away. What is the recommended
way nowadays? A patch, I suppose? Or a snippet?
There is another occurrence of SPARQLWrapper in rdflib.egg-info/requires.txt.
But I suppose this is merely documentation?
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Circular dependencies in python modules
2015-01-22 19:37 ` Andreas Enge
@ 2015-01-22 21:15 ` Cyril Roelandt
2015-01-23 21:32 ` Andreas Enge
0 siblings, 1 reply; 6+ messages in thread
From: Cyril Roelandt @ 2015-01-22 21:15 UTC (permalink / raw)
To: guix-devel
On 01/22/2015 08:37 PM, Andreas Enge wrote:
> On Thu, Jan 22, 2015 at 09:50:35AM +0100, Federico Beffa wrote:
>> It appears that SPARQLWrapper is not really needed and you can disable
>> dependency guessing with '--no-guessing-deps'. See
>> https://sources.debian.net/src/rdflib/4.1.2-3/debian/rules/
>
> Thanks for the suggestion! This seems to be some debian specific macro in
> their package recipes; I tried it as a configure flag, and setup.py chokes
> on it.
>
> However, there are these lines in setup.py:
> kwargs['install_requires'] = [
> 'isodate',
> 'pyparsing', 'SPARQLWrapper']
> explicitly in the "else" branch of
> if sys.version_info[0] >= 3:
> So this would explain why there was no problem with python-3.
>
In Python 3, it is not in "install_requires", but it is in "requires":
https://github.com/RDFLib/rdflib/blob/master/setup.py#L43
Not sure exactly what the difference is, though.
Cyril.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Circular dependencies in python modules
2015-01-22 21:15 ` Cyril Roelandt
@ 2015-01-23 21:32 ` Andreas Enge
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Enge @ 2015-01-23 21:32 UTC (permalink / raw)
To: Cyril Roelandt; +Cc: guix-devel
On Thu, Jan 22, 2015 at 10:15:44PM +0100, Cyril Roelandt wrote:
> In Python 3, it is not in "install_requires", but it is in "requires":
> Not sure exactly what the difference is, though.
I saw it, maybe it means that it needs to be installed together with
sparqlwrapper?
Anyway, I removed the dependency for python 2. Then for the tests, it needed
python2-nose. Then a lot of tests failed.
I am giving up for now. I could disable the tests, and go on with
sparqlwrapper, zeitgeist and libqzeitgeist (my real aim!), but how would
one know that the resulting libraries actually work?
Andreas
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-23 21:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 8:50 Circular dependencies in python modules Federico Beffa
2015-01-22 19:37 ` Andreas Enge
2015-01-22 21:15 ` Cyril Roelandt
2015-01-23 21:32 ` Andreas Enge
-- strict thread matches above, loose matches on Subject: below --
2015-01-20 22:08 Andreas Enge
2015-01-21 22:24 ` Andreas Enge
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).