vlasovskikh / funcparserlib

Recursive descent parsing library for Python based on functional combinators
https://funcparserlib.pirx.ru
MIT License
338 stars 38 forks source link

Installation fail with setuptools 58.0.2 with `error in funcparserlib setup command: use_2to3 is invalid` #69

Closed ikus060 closed 2 years ago

ikus060 commented 2 years ago

Installation is failling with setuptools 58.0.2

$ docker run -it python:3 /bin/bash
root@cd450e462d63:/# 
root@cd450e462d63:/# 
root@cd450e462d63:/# 
root@cd450e462d63:/# pip install setuptools
Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (57.4.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@cd450e462d63:/# pip install -U setuptools
Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (57.4.0)
Collecting setuptools
  Downloading setuptools-58.0.2-py3-none-any.whl (816 kB)
     |████████████████████████████████| 816 kB 3.6 MB/s 
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 57.4.0
    Uninstalling setuptools-57.4.0:
      Successfully uninstalled setuptools-57.4.0
Successfully installed setuptools-58.0.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@cd450e462d63:/# 
root@cd450e462d63:/# pip install funcparserlib
Collecting funcparserlib
  Downloading funcparserlib-0.3.6.tar.gz (30 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hq952605/funcparserlib_dbf31c5064d84cefbccfb54691474146/setup.py'"'"'; __file__='"'"'/tmp/pip-install-hq952605/funcparserlib_dbf31c5064d84cefbccfb54691474146/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ihwenghv
         cwd: /tmp/pip-install-hq952605/funcparserlib_dbf31c5064d84cefbccfb54691474146/
    Complete output (1 lines):
    error in funcparserlib setup command: use_2to3 is invalid.
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/cb/f7/b4a59c3ccf67c0082546eaeb454da1a6610e924d2e7a2a21f337ecae7b40/funcparserlib-0.3.6.tar.gz#sha256=b7992eac1a3eb97b3d91faa342bfda0729e990bd8a43774c1592c091e563c91d (from https://pypi.org/simple/funcparserlib/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading funcparserlib-0.3.5.tar.gz (33 kB)
Building wheels for collected packages: funcparserlib
  Building wheel for funcparserlib (setup.py) ... done
  Created wheel for funcparserlib: filename=funcparserlib-0.3.5-py3-none-any.whl size=9974 sha256=64509d76c9cbc19344b67c1f72e2aea7fb40f392fd5004b5709e2195068bb46d
  Stored in directory: /root/.cache/pip/wheels/d9/15/78/13edbb605d18a8a50b5e9c0203b1eec03a9b8126a071486904
Successfully built funcparserlib
Installing collected packages: funcparserlib
Successfully installed funcparserlib-0.3.5
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
vlasovskikh commented 2 years ago

I have published a pre-release version 1.0.0a0 that addresses this problem. Please give it a try:

pip install funcparserlib==1.0.0a0