Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system broken #39

Closed
uholzer opened this issue Jul 31, 2014 · 2 comments
Closed

Build system broken #39

uholzer opened this issue Jul 31, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@uholzer
Copy link

uholzer commented Jul 31, 2014

There are two several problems:

urs@speedy:~/p/RDFLib/sparqlwrapper$ pip install --user .
Unpacking /home/urs/p/RDFLib/sparqlwrapper
  Running setup.py (path:/tmp/pip-0_cPU0-build/setup.py) egg_info for package from file:///home/urs/p/RDFLib/sparqlwrapper
    SPARQLWrapper/Wrapper.py:101: RuntimeWarning: JSON-LD disabled because no suitable support has been found
      warnings.warn("JSON-LD disabled because no suitable support has been found", RuntimeWarning)
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-0_cPU0-build/setup.py", line 32, in <module>
        author = SPARQLWrapper__authors__,
    NameError: name 'SPARQLWrapper__authors__' is not defined
    Complete output from command python setup.py egg_info:
    SPARQLWrapper/Wrapper.py:101: RuntimeWarning: JSON-LD disabled because no suitable support has been found

  warnings.warn("JSON-LD disabled because no suitable support has been found", RuntimeWarning)

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-0_cPU0-build/setup.py", line 32, in <module>

    author = SPARQLWrapper__authors__,

NameError: name 'SPARQLWrapper__authors__' is not defined

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-0_cPU0-build
Storing debug log for failure in /home/urs/.pip/pip.log

There is a dot missing between SPARQLWrapper_ and __authors__.

Having fixed this, it works for Python 2, but running pip3 for Python 3 exposes another problem:

urs@speedy:~/p/RDFLib/sparqlwrapper$ pip3 install --user .
Unpacking /home/urs/p/RDFLib/sparqlwrapper
  Running setup.py (path:/tmp/pip-s1q1yjhc-build/setup.py) egg_info for package from file:///home/urs/p/RDFLib/sparqlwrapper
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-s1q1yjhc-build/setup.py", line 24, in <module>
        import SPARQLWrapper
      File "/tmp/pip-s1q1yjhc-build/SPARQLWrapper/__init__.py", line 187, in <module>
        from Wrapper import SPARQLWrapper
    ImportError: No module named 'Wrapper'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-s1q1yjhc-build/setup.py", line 24, in <module>

    import SPARQLWrapper

  File "/tmp/pip-s1q1yjhc-build/SPARQLWrapper/__init__.py", line 187, in <module>

    from Wrapper import SPARQLWrapper

ImportError: No module named 'Wrapper'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-s1q1yjhc-build
Storing debug log for failure in /home/urs/.pip/pip.log

It's probably a bad idea to import SPARQLWrapper before it has been tranformed by 2to3, because setup.py is also run by Python 3. (It seems this particular error occurs because relative imports in Python 3 don't work without a leading dot anymore.)

@uholzer uholzer added the bug label Jul 31, 2014
wikier added a commit that referenced this issue Aug 4, 2014
@wikier wikier self-assigned this Aug 4, 2014
@wikier wikier added this to the 1.6.3 milestone Aug 4, 2014
@wikier
Copy link
Member

wikier commented Aug 4, 2014

The current code at master (d635280a7b22fcddec7e38462c1405899ca8729e) should fix both issues. Please @uholzer test it, and fell free to re-open it if there is any missing details that should be addressed.

@wikier wikier closed this as completed Aug 4, 2014
@uholzer
Copy link
Author

uholzer commented Aug 5, 2014

Thanks, this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants