瀏覽代碼

makepanda: locate setup.cfg using __file__, not working directory.

This fixes the buildbots, which import makewheel from inside the makepanda directory.
rdb 8 年之前
父節點
當前提交
0343dbcbba
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      makepanda/makepandacore.py

+ 2 - 1
makepanda/makepandacore.py

@@ -2858,7 +2858,8 @@ def GetMetadataValue(key):
     if not cfg_parser:
     if not cfg_parser:
         # Parse the metadata from the setup.cfg file.
         # Parse the metadata from the setup.cfg file.
         cfg_parser = configparser.ConfigParser()
         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)
     value = cfg_parser.get('metadata', key)
     if key == 'classifiers':
     if key == 'classifiers':