Hello World using Python embedded in C++, with RAII library initialization
Are you sure also scoping de-initialization of Python to main (by removing static) is not an option?
As-is, you cannot use Python in a globals initializer or destructor anyway.
Having taken a look at Py_Finalize, I actually would not deinitialize it at all, at least not in a release-build, as none of the reasons that option is provided apply to you:


  This function is provided for a number of reasons. An embedding application might want to restart Python without having to restart the application itself. An application that has loaded the Python interpreter from a dynamically loadable library (or DLL) might want to free all memory allocated by Python before unloading the DLL. During a hunt for memory leaks in an application a developer might want to free all memory allocated by Python before exiting from the application
  
  Bugs and caveats: [... lots ...]

Next, you shouldn't be using a function-pointer, use an empty function-object instead.
Using a function-object facilitates inlining and as it's empty, reduces memory-overhead.
Actually, are you sure you actually need / want a std::shared_ptr?
Either because you are already irretrievably locked into using that type, or because you actually might need weak pointers somewhere?

If the answer is no, look into boost::intrusive_ptr, as that will save you an allocation every time you hand a PyObject to a smart-pointer's oversight, and reduces smartpointer-size by half, to raw-pointer-size.

// Hooks in same scope as PyObject (global scope), so ADL in intrusive_ptr finds them:
void intrusive_ptr_add_ref(PyObject* p) noexcept { Py_INCREF(p); }
void intrusive_ptr_release(PyObject* p) noexcept { Py_DECREF(p); }
// typedef for ease of use:
typedef boost::intrusive_ptr&lt;PyObject&gt; PyPtr;
// Use as:
PyPtr string(PyString_FromString("Hello World!\n"), false);