py-pyparsing: add 3.0.6 (#27693)

* py-pyparsing: add 3.0.6

* Add suggestions
This commit is contained in:
Manuela Kuhn 2021-11-29 22:02:08 +01:00 committed by GitHub
parent a98e8ad4b5
commit 22eebff261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 27 deletions

View File

@ -11,6 +11,7 @@ class PyPyparsing(PythonPackage):
homepage = "https://pyparsing-docs.readthedocs.io/en/latest/"
pypi = "pyparsing/pyparsing-2.4.2.tar.gz"
version('3.0.6', sha256='d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81')
version('2.4.7', sha256='c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1')
version('2.4.2', sha256='6f98a7b9397e206d78cc01df10131398f1c8b8510a2f4d97d9abd82e1aacdd80')
version('2.4.0', sha256='1873c03321fc118f4e9746baf201ff990ceb915f433f23b395f5580d1840cb2a')
@ -19,11 +20,8 @@ class PyPyparsing(PythonPackage):
version('2.1.10', sha256='811c3e7b0031021137fc83e051795025fcb98674d07eb8fe922ba4de53d39188')
version('2.0.3', sha256='06e729e1cbf5274703b1f47b6135ed8335999d547f9d8cf048b210fb8ebf844f')
patch('setuptools-import.patch', when='@:2.1.10')
depends_on('python@3.6:', when='@3:', type=('build', 'run'))
depends_on('python@2.6:2.8,3.3:', type=('build', 'run'))
# Newer versions of setuptools require pyparsing. Although setuptools is an
# optional dependency of pyparsing, if it is not found, setup.py will
# fallback on distutils.core instead. Don't add a setuptools dependency
# or we won't be able to bootstrap setuptools.
depends_on('py-setuptools', type='build', when='@2.3.1:')
depends_on('py-setuptools', when='@2.1:', type='build')
import_modules = ['pyparsing']

View File

@ -1,20 +0,0 @@
diff --git a/setup.py b/setup.py
index 82061c6..ff342af 100644
--- a/setup.py
+++ b/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