RDFLib / OWL-RL

A simple implementation of the OWL2 RL Profile on top of RDFLib: it expands the graph with all possible triples that OWL RL defines. It can be used together with RDFLib to expand an RDFLib Graph object, or as a stand alone service with its own serialization.
http://www.ivan-herman.net/Misc/2008/owlrl/
Other
139 stars 30 forks source link

Unable to run closure.py script after installation from PyPI #26

Closed wrobell closed 5 years ago

wrobell commented 5 years ago

To reproduce on Linux

  1. Install owlrl with pip install --user owlrl.
  2. Run ~/.local/bin/closure.py.
  3. You will get the error like
    $ ~/.local/bin/closure.py            
    mksh: /home/wrobell/.local/bin/closure.py: No such file or directory

The reason for that is first line in the script

#!/home/flubba86/PycharmProjects/OWL-RL/venv/bin/python3

However in the repository the line is OK. It seems owlrl needs to be released without overrides from a local environment (BTW. new release is needed then as PyPI does not allow to re-upload file with same name and different checksum if I remember well).

As workaround run

python3 ~/.local/bin/closure.py
nicholascar commented 5 years ago

Thanks for identifying, will try and update ASAP.

ashleysommer commented 5 years ago

@wrobell Upon investigating, I've found this is caused by this bug in bdist_wheel. For some reason when building bdists with python3 setup.py build bdist_wheel it replaces: #!/usr/bin/env python3 with #!/my/local/venv/bin/python3. Changing the command to python3 setup.py bdist_wheel without the build parameter fixes the issue. I'm surprised I haven't come across this issue before, because I've been building bdist wheel packages for several years now and not encountered this problem until now.

ashleysommer commented 5 years ago

Fixed in https://github.com/RDFLib/OWL-RL/commit/29c4baf6ff91dd2135a5743098b09640c4c2905e