From 782f0b0b6924a0e7e9e4d5c17072506a42da9519 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Tue, 28 Feb 2017 04:41:39 +0000 Subject: Updated setup.py to address recursive import problems now that pyparsing is part of 'packaging' (used by setuptools). git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@455 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b --- src/setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/setup.py b/src/setup.py index 82061c6..dbe2743 100644 --- a/src/setup.py +++ b/src/setup.py @@ -1,7 +1,13 @@ #!/usr/bin/env python """Setup script for the pyparsing module distribution.""" -from setuptools import setup + +# Setuptools depends on pyparsing (via packaging) as of version 34, so allow +# installing without it to avoid bootstrap problems. +try: + from setuptools import setup +except ImportError: + from distutils.core import setup import sys import os -- cgit v1.2.1