How to get `setup.cfg` metadata at the command line (Python)

Maybe using the ConfigParser Python module ?

python -c "from configparser import ConfigParser; cf = ConfigParser(); cf.read('setup.cfg'); print(cf['metadata']['name'])"

Leave a Comment