build: add python library object reduction