Menu

#7 fixes for -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION

v1.6.0.0
closed
None
5
2014-12-11
2014-12-11
No

When compiling pymol 1.7.4.0 against numpy 1.9.1 with -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION passed on CFLAGS, the compilation fails on several files due to missing casts of (PyArrayObject ) or (const PyArrayObject ). The attach patch eliminates these compile errors.

1 Attachments

Discussion

  • Jack Howarth

    Jack Howarth - 2014-12-11

    Note that setup.py should either append -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION to CFLAGS or

    #define NPY_NO_DEPRECATED_API NPY_API_VERSION
    

    should be added to the effected files (layer0/Field.cpp, layer2/CoordSet.cpp and layer3/Selector.cpp) to avoid the warnings...

    /sw/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
    #warning "Using deprecated NumPy API, disable it by " \
     ^
    

    Passing the -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION across all of the files in pymol might be wiser since it will capture any future code additions which tickle this ABI issue.

     

    Last edit: Thomas Holder 2014-12-11
  • Thomas Holder

    Thomas Holder - 2014-12-11

    Thanks for the patch, applied to SVN rev 4106:
    http://sourceforge.net/p/pymol/code/4106/

     

    Last edit: Thomas Holder 2014-12-11
  • Thomas Holder

    Thomas Holder - 2014-12-11
    • status: open --> closed
    • assigned_to: Thomas Holder
     

Log in to post a comment.