From e34542b36547964c0742d050f5d21ea95d7a132e Mon Sep 17 00:00:00 2001 From: Conor Scott Date: Wed, 18 Apr 2018 09:22:27 +0200 Subject: [PATCH] Support pip version 10.0 and greater (#389) * Support pip version 10.0 and greater * Add to CHANGELOG --- CHANGELOG.rst | 1 + setup.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 561288677..27bb6f587 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -236,3 +236,4 @@ All notable changes to this project are documented in this file. - added additional SC Api ( ``Neo.Runtime.GetTime``, ``Neo.Transaction.GetUnspentCoins``, ``Neo.Header.GetIndex``) - added support for dynamically defined smart contract execution - added ability to alias an address in the wallet +- added support for pip versions >= 10.0 diff --git a/setup.py b/setup.py index 8e60d0b45..40eea3b08 100644 --- a/setup.py +++ b/setup.py @@ -2,8 +2,12 @@ """The setup script.""" from setuptools import setup, find_packages -from pip.req import parse_requirements -from pip.download import PipSession +try: # pip version >= 10.0 + from pip._internal.req import parse_requirements + from pip._internal.download import PipSession +except ImportError: # pip version < 10.0 + from pip.req import parse_requirements + from pip.download import PipSession with open('README.rst') as readme_file: