Compile static Panda3D libs against static Python

I’m trying to make a 100% static program with Panda3D and static Python. I already managed to get a static Python (2.7) lib but now I need help to make Panda3D compile against it, so I don’t need pythonXX.dll at all. This is what I did:

  1. changed makepandacore.py LINK_ALL_STATIC to True
  2. called makepanda with --static

But I got this error:

[  9%] Linking executable built/bin/interrogate.exe
python27.lib(python27.dll) : error LNK2005: _PyObject_CallMethod already defined
 in libp3pystub.lib(p3pystub_pystub.obj)
<lots of errors>
python27.lib(python27.dll) : error LNK2005: _Py_InitModule4 already defined in l
ibp3pystub.lib(p3pystub_pystub.obj)
built/bin/interrogate.exe : fatal error LNK1169: one or more multiply defined sy
mbols found

The problem is not the error, it is “python27.lib(python27.dll)”. How can I force Panda3D to link the libs against my static Python lib?

PS: My plan is to manually call initXXXX for each module/lib in order to have libXXX available for Python.