Solution: parse the OBS prjconf and the user env variable DEB_BUILD_OPTIONS. If either of those define "drafts" then build with draft APIs enabled.