File bpo36160-init-sysconfig_vars.patch of Package python

From 603a4461e3c889b06a5d78e57594ebbc580f1c03 Mon Sep 17 00:00:00 2001
From: Ivan Pozdeev <vano@mail.mipt.ru>
Date: Fri, 1 Mar 2019 21:44:24 +0300
Subject: [PATCH] Fix AttributeError on sysconfig._CONFIG_VARS.clear() if
 test_site is run separately

---
 Lib/test/test_site.py                                         | 4 +++-
 .../next/Tests/2019-03-01-21-45-13.bpo-36160.4JjrqB.rst       | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 Misc/NEWS.d/next/Tests/2019-03-01-21-45-13.bpo-36160.4JjrqB.rst

--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -47,6 +47,9 @@ def setUpModule():
             else:
                 raise
 
+    # sysconfig._CONFIG_VARS is None until the first call to this function
+    sysconfig.get_config_vars()
+
 
 def tearDownModule():
     sys.path[:] = OLD_SYS_PATH
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2019-03-01-21-45-13.bpo-36160.4JjrqB.rst
@@ -0,0 +1,2 @@
+Fix AttributeError on sysconfig._CONFIG_VARS.clear() if test_site is run
+separately