The problem of PIL: the latest version is of 2009 and so there are dependency problems with the new version of numpy and matplotlib
I'm using python2.7 and conda. With pillow there are no dependency problems with the newest numpy and matplotlib versions and "the molecule drawing functianality" works well (y)
While running the code as given originally would work, the re`import` of openbabel made it seem that the second and third examples would work independently when in fact they won't without defining `mol = openbabel.OBMol()`.
This commit contains a few minor changes to the Python setup.py file that is used for independent installation of the Python bindings.
- Version bumped to 2.4.0 to match the main Open Babel version.
- The custom install command sublcass was fixed to just call the superclass install method after the extra build_ext command. This resolved an issue with running bdist_wheel.
- `zip_safe` changed to `False`, so running `python setup.py install` behaviour is more like `pip install openbabel`.
distutils/setuptools now appear to add some default SWIG `include_dirs` and `library_dirs`, so we should append the openbabel paths to these lists rather than overwriting them entirely.
- Remove the duplicate swig interface files from the `python` directory.
- Remove the rule specifying those files from `MANIFEST.in`.
- Modify `setup.py` to pull in the interface files from the parent directory when preparing the distrubution using `sdist`.
- Add the rule `exclude openbabel.py` to `MANIFEST.in`, to help prevent accidentally including a copy of the resulting swig bindings in the source distribution.
- Bump the python bindings version number to 1.8.2 to allow these changes to be pushed to PyPI.
Change the python bindings package name back to 'openbabel', but make clear in the Python README that this is just the python bindings, not the main Open Babel library, just in case anyone stumbles across the PyPI page by accident.
Add a sensible fallback if pkg-config fails to locate the Open Babel include and library directories, and a helpful error message if that fallback also fails.
Allow Open Babel include and library directories to be manually specified as command line options to setup.py using the build_ext command with -I and -L options.
The setup.py build and install commands run a number of subcommands, including build_ext, which runs SWIG to generate openbabel.py, and build_py, which copies openbabel.py and other python sources to the build directory.
The default ordering is for build_py to be run before build_ext, causing errors as build_py attempts to copy openbabel.py before it exists. This change ensures build_ext is always run first at the start of both the build and install commands.