vlasovskikh / funcparserlib

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

setup.py uses use_2to3 which is not supported in latest setuptools #70

Closed ronaldoussoren closed 2 years ago

ronaldoussoren commented 2 years ago

As the subject says: installing funcparserlib doesn't work when using a recent version of setuptools because the use_2to3 option is (appearently) no longer supported.

% ~/.local/pipx/venvs/sphinx/bin/python3 -m pip install -U funcparserlib
Requirement already satisfied: funcparserlib in ./.local/pipx/venvs/sphinx/lib/python3.9/site-packages (0.3.5)
Collecting funcparserlib
  Using cached funcparserlib-0.3.6.tar.gz (30 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/ronald/.local/pipx/venvs/sphinx/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/d3/rc5nx4v12y96knh2px3bpqsc0000gn/T/pip-install-pdhv48sd/funcparserlib_c8d48b03ba304ef99780de63a0a70b17/setup.py'"'"'; __file__='"'"'/private/var/folders/d3/rc5nx4v12y96knh2px3bpqsc0000gn/T/pip-install-pdhv48sd/funcparserlib_c8d48b03ba304ef99780de63a0a70b17/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 /private/var/folders/d3/rc5nx4v12y96knh2px3bpqsc0000gn/T/pip-pip-egg-info-xaew7zei
         cwd: /private/var/folders/d3/rc5nx4v12y96knh2px3bpqsc0000gn/T/pip-install-pdhv48sd/funcparserlib_c8d48b03ba304ef99780de63a0a70b17/
    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.

Installing setuptools 49.2.1 instead of 58.0.4 allowed me to install the library, but that's suboptimal.

grainednoise commented 2 years ago

I'm having the exact same issue (also using Sphinx, by the way). Working around this is going to be a chore, as Pipenv does not support specifying specific Setuptools versions, so I'll be forced to start using "requirements.txt" files again.

WindsOfHades commented 2 years ago

Same issue, I forced to use "setuptools==49.2.1" as the first line of my requirements.txt as remedy for now. Any estimate on the clean solution?

ViktorHaag commented 2 years ago

I've found that force-using the funcparserlib 1.0.0.a0 release has resolved this problem for me in my GithubActions-based CI pipelines that build Sphinx docs. (All these pipelines greedily upgrade to the latest available pip, setuptools, and wheel at the time of running.)

This might also work for you until we get a new non-alpha release here.

(For reference, see also issue #65)

vlasovskikh commented 2 years ago

Yes, I released a pre-release version that addresses this problem:

pip install funcparserlib==1.0.0a0

This issue duplicates #69.