From 0343dbcbba96534030ab409c00a73d3b2613a723 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 3 Nov 2017 20:15:21 +0100 Subject: [PATCH] makepanda: locate setup.cfg using __file__, not working directory. This fixes the buildbots, which import makewheel from inside the makepanda directory. --- makepanda/makepandacore.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 3936920ef9..e942606f9f 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -2858,7 +2858,8 @@ def GetMetadataValue(key): if not cfg_parser: # Parse the metadata from the setup.cfg file. cfg_parser = configparser.ConfigParser() - cfg_parser.read('setup.cfg') + path = os.path.join(os.path.dirname(__file__), '..', 'setup.cfg') + assert cfg_parser.read(path), "Could not read setup.cfg file." value = cfg_parser.get('metadata', key) if key == 'classifiers':