Add a scikit-build-core Python package entry point for the in-tree Open Babel bindings and wire cibuildwheel to build release artifacts for Linux, macOS, and Windows.
Keep regular CMake installs unchanged by only installing into the wheel package layout when BUILD_BY_PIP is enabled.
Authored by OpenClaw (model: gpt-5.5)
- perl
- assume perl-binding version is different from Open Babel's
- python
- assume tarball from github release page
- note: `python scripts/python/setup.py install` does not work since `__init__.py` is missing
- `from __future__ import print_function`
- replace deprecated `unittest.TestCase.assertEquals` with
`assertEqual`, `assertTrue`, or `assertFalse`
- use `obj is None` instead of `obj == None`
- remove modules and functions that are imported but not used
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.