Menu

#664 cmake modifies source openbabel.py

2.3.x
closed
Pybel (17)
5
2012-10-23
2010-10-29
No

As far as I can tell, openbabel.py and pybel.py get copied into the build directory during "setup.py build". However, there is a POST_BUILD command which adds some lines to a file called "ob.py" and then adds the content of openbabel.py to it. Afterwards, this ob.py gets copied to openbabel.py:

       COMMAND ${CMAKE_COMMAND} -E copy ob.py ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py

Here, $(openbabel_SOURCE_DIR) is used, and thus the source file is modified. I don't think this is a legit thing the build system should do.

In any case, it does not seem like "setup.py install" is being called on "make install" anyway, is this intentional?

Discussion

  • Konstantin Tokarev

    Moreover, it uses

    if sys.platform.find('linux')

    where condition for Unix-like system should be

     
  • Noel O'Boyle

    Noel O'Boyle - 2010-11-03

    Good points.

    (1) As you say, the openbabel.py provided in the distribution should not be modified. This should only happen if the user is running SWIG to generate the bindings.
    (2) sys.platform needs editing for Unix-like systems.
    (3) "setup.py install" should be called by "make install"...I think I checked this with the distribution, but I will double-check it.

     
  • Noel O'Boyle

    Noel O'Boyle - 2011-12-03

    I think that all of these issues are now resolved in trunk.

    I'm going to mark this as pending.

     
MongoDB Logo MongoDB