From 8af514950542e61a077c1aae260baa25694b58f1 Mon Sep 17 00:00:00 2001 From: Cameron Higby-Naquin Date: Mon, 31 Aug 2020 10:42:26 -0400 Subject: [PATCH] Pin setuptools to a version < 50.0 when installing pipenv Experiencing a problem where `pip install pipenv` yields: ``` SystemError: Parent module 'setuptools' not loaded, cannot perform relative import ``` Fix inspired by: https://github.com/pypa/setuptools/issues/2352 --- .circleci/config.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3fa642045..7b8f7c0f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,12 +7,15 @@ reuse-blerbs: # Set python to 3.5.2 pyenv global 3.5.2 pip install -U pip + pip install setuptools==49.6.0 pip install pipenv - pipenv install + SETUPTOOLS_USE_DISTUTILS=stdlib pipenv install version: 2 jobs: safety_check: + environment: + SETUPTOOLS_USE_DISTUTILS: stdlib machine: image: ubuntu-1604:201903-01 working_directory: ~/tracker @@ -34,6 +37,8 @@ jobs: command: make flake8 npm_audit: + environment: + SETUPTOOLS_USE_DISTUTILS: stdlib machine: image: ubuntu-1604:201903-01 working_directory: ~/tracker @@ -51,6 +56,8 @@ jobs: path: ~/tracker/test-results/ dev: + environment: + SETUPTOOLS_USE_DISTUTILS: stdlib machine: image: ubuntu-1604:201903-01 working_directory: ~/tracker @@ -84,6 +91,8 @@ jobs: path: ~/dockercomposelogs prod: + environment: + SETUPTOOLS_USE_DISTUTILS: stdlib machine: image: ubuntu-1604:201903-01 working_directory: ~/pressfreedom