dhimmel / obonet

OBO-formatted ontologies → networkx (Python 3)
https://github.com/dhimmel/obonet/blob/main/examples/go-obonet.ipynb
Other
136 stars 28 forks source link

Installation on python2 without pandoc #6

Closed cthoyt closed 6 years ago

cthoyt commented 7 years ago

Travis CI is unable to install obonet on python2. I don't have pandoc in my builds. Here's a link to my build log: https://travis-ci.org/pybel/pybel-tools/jobs/239611981

However, it is working on python3. Could this be because of the use of print function without importing from __future__ import print_function in setup.py?

Alternatively, it could be the ordering of directory = os.path.dirname(os.path.abspath(__file__)) on line 8 of setup.py instead of directory = os.path.abspath(os.path.dirname(__file__))

Edit: also, I apologize for even bringing up the idea of python2 support. I'd rather not give python2 support in my own software, but it's been easy enough until now by avoiding just a few things.

dhimmel commented 7 years ago

In your Travis log the error is:

No such file or directory: '/tmp/pip-build-5aGhnl/obonet/README.md'

For some reason, README.md is not getting to the right place. Possibly related to https://github.com/tensorflow/tensorflow/issues/56. I don't think it's related to the print statement. In fact, I'm not sure the installation failure is due to python 2 versus 3, rather than different Travis build environments.

Regarding python 2 support, this codebase was designed to be Python 3 only. The main python 2 incompatabilities will be in io.py. I'd consider accepting a PR to add Python 2 compatibility. But just a warning that you will encounter other issues than just the setup.py failure above.

cthoyt commented 7 years ago

I'll look into python2 support!

Another idea - this might happen is because there's no MANIFEST.in file, and I don't think that .md files are copied by default

dhimmel commented 6 years ago

I am going to close this issue. If there's something outstanding please open a new issue.

Note that as of the latest release (https://pypi.org/project/obonet/0.2.3/), pandoc is no longer used since PyPI supports markdown long_description values.