I have a setup.py file like this (not in pwd, not in Python path, a random file somewhere):
import ext_modules config = { 'name': 'mesos.executor', 'version': '1.4.1', 'description': 'Mesos native executor driver implementation', 'author': 'Apache Mesos', 'author_email': '[email protected]', 'url': 'http://pypi.python.org/pypi/mesos.executor', 'namespace_packages': [ 'mesos' ], 'packages': [ 'mesos', 'mesos.executor' ], 'package_dir': { '': 'src' }, 'install_requires': [ 'mesos.interface == 1.4.1' ], 'license': 'Apache 2.0', 'keywords': 'mesos', 'classifiers': [ ], 'ext_modules': [ ext_modules.executor_module ] } from setuptools import setup setup(**config) And from an external (Python) script I'd like to import config["install_requires"]. I'm looking for the most minimalist way of doing this as it's intended to be run from other scripts that might even not be Python.
A Python one-liner would be awesome.
from setup import config; config['install_requires']?