ietf-tools / xml2rfc

Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies
https://ietf-tools.github.io/xml2rfc/
BSD 3-Clause "New" or "Revised" License
64 stars 35 forks source link

Installation fails with pip3 #1049

Closed yaronf closed 7 months ago

yaronf commented 9 months ago

Describe the issue

Following is on Github Actions, with the latest Ubuntu (note: it does not reproduce on the Mac).

Installation with pipx is successful, see #1042.

sudo pip3 install xml2rfc

2023-10-20T14:01:32.6541019Z Collecting xml2rfc
2023-10-20T14:01:32.7609956Z   Downloading xml2rfc-3.18.2.tar.gz (2.7 MB)
2023-10-20T14:01:32.8559891Z      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 28.9 MB/s eta 0:00:00
2023-10-20T14:01:36.2098988Z   Installing build dependencies: started
2023-10-20T14:01:40.0596590Z   Installing build dependencies: finished with status 'done'
2023-10-20T14:01:40.0640662Z   Getting requirements to build wheel: started
2023-10-20T14:01:40.9478605Z   Getting requirements to build wheel: finished with status 'error'
2023-10-20T14:01:40.9556242Z   error: subprocess-exited-with-error
2023-10-20T14:01:40.9557220Z   
2023-10-20T14:01:40.9558678Z   × Getting requirements to build wheel did not run successfully.
2023-10-20T14:01:40.9559909Z   │ exit code: 1
2023-10-20T14:01:40.9560798Z   ╰─> [51 lines of output]
2023-10-20T14:01:40.9561763Z       Traceback (most recent call last):
2023-10-20T14:01:40.9563299Z         File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/requirements.py", line 102, in __init__
2023-10-20T14:01:40.9564442Z           req = REQUIREMENT.parseString(requirement_string)
2023-10-20T14:01:40.9566004Z         File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1654, in parseString
2023-10-20T14:01:40.9566834Z           raise exc
2023-10-20T14:01:40.9568275Z         File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1644, in parseString
2023-10-20T14:01:40.9569330Z           loc, tokens = self._parse( instring, 0 )
2023-10-20T14:01:40.9570525Z         File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache
2023-10-20T14:01:40.9571669Z           loc,tokens = self.parseImpl( instring, preloc, doActions )
2023-10-20T14:01:40.9572944Z         File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/pyparsing.py", line 3417, in parseImpl
2023-10-20T14:01:40.9573885Z           loc, exprtokens = e._parse( instring, loc, doActions )
2023-10-20T14:01:40.9574963Z         File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/pyparsing.py", line 1406, in _parseNoCache
2023-10-20T14:01:40.9576437Z           loc,tokens = self.parseImpl( instring, preloc, doActions )
2023-10-20T14:01:40.9577542Z         File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/pyparsing.py", line 3205, in parseImpl
2023-10-20T14:01:40.9578556Z           raise ParseException(instring, loc, self.errmsg, self)
2023-10-20T14:01:40.9579872Z       pkg_resources._vendor.pyparsing.ParseException: Expected stringEnd (at char 4), (line:1, col:5)
2023-10-20T14:01:40.9580945Z       
2023-10-20T14:01:40.9581518Z       During handling of the above exception, another exception occurred:
2023-10-20T14:01:40.9582566Z       
2023-10-20T14:01:40.9587454Z       Traceback (most recent call last):
2023-10-20T14:01:40.9588627Z         File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
2023-10-20T14:01:40.9589527Z           main()
2023-10-20T14:01:40.9590404Z         File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
2023-10-20T14:01:40.9591496Z           json_out['return_val'] = hook(**hook_input['kwargs'])
2023-10-20T14:01:40.9592819Z         File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
2023-10-20T14:01:40.9593852Z           return hook(config_settings)
2023-10-20T14:01:40.9594885Z         File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
2023-10-20T14:01:40.9595825Z           return self._get_build_requires(
2023-10-20T14:01:40.9597687Z         File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 143, in _get_build_requires
2023-10-20T14:01:40.9598530Z           self.run_setup()
2023-10-20T14:01:40.9599387Z         File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 158, in run_setup
2023-10-20T14:01:40.9600337Z           exec(compile(code, __file__, 'exec'), locals())
2023-10-20T14:01:40.9600911Z         File "setup.py", line 3, in <module>
2023-10-20T14:01:40.9601770Z           setup(
2023-10-20T14:01:40.9602598Z         File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 152, in setup
2023-10-20T14:01:40.9603378Z           _install_setup_requires(attrs)
2023-10-20T14:01:40.9604358Z         File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 145, in _install_setup_requires
2023-10-20T14:01:40.9605425Z           dist.parse_config_files(ignore_option_errors=True)
2023-10-20T14:01:40.9606424Z         File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 807, in parse_config_files
2023-10-20T14:01:40.9607203Z           self._finalize_requires()
2023-10-20T14:01:40.9608482Z         File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 534, in _finalize_requires
2023-10-20T14:01:40.9609365Z           self._move_install_requirements_markers()
2023-10-20T14:01:40.9610437Z         File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 573, in _move_install_requirements_markers
2023-10-20T14:01:40.9611506Z           inst_reqs = list(pkg_resources.parse_requirements(spec_inst_reqs))
2023-10-20T14:01:40.9612621Z         File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3099, in parse_requirements
2023-10-20T14:01:40.9613451Z           yield Requirement(line)
2023-10-20T14:01:40.9614280Z         File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3109, in __init__
2023-10-20T14:01:40.9615146Z           super(Requirement, self).__init__(requirement_string)
2023-10-20T14:01:40.9616274Z         File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/requirements.py", line 104, in __init__
2023-10-20T14:01:40.9617166Z           raise InvalidRequirement(
2023-10-20T14:01:40.9618410Z       pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "': requir'": Expected stringEnd
2023-10-20T14:01:40.9619331Z       [end of output]
2023-10-20T14:01:40.9619644Z   
2023-10-20T14:01:40.9620382Z   note: This error originates from a subprocess, and is likely not a problem with pip.
2023-10-20T14:01:40.9639740Z error: subprocess-exited-with-error
2023-10-20T14:01:40.9640290Z 
2023-10-20T14:01:40.9640948Z × Getting requirements to build wheel did not run successfully.
2023-10-20T14:01:40.9641664Z │ exit code: 1
2023-10-20T14:01:40.9642090Z ╰─> See above for output.
2023-10-20T14:01:40.9642362Z 
2023-10-20T14:01:40.9642830Z note: This error originates from a subprocess, and is likely not a problem with pip.
2023-10-20T14:01:41.0837206Z ##[error]Process completed with exit code 1.

CC @thomas-fossati

Code of Conduct

kesara commented 9 months ago

@yaronf What are the pip and the Python versions?

Most probably you will have to upgrade pip with

python3 -m pip install --upgrade pip

or

pip3 install --upgrade pip
yaronf commented 9 months ago

Hi @kesara,

On a fully updated Ubuntu 22.04.3 LTS, it's pip 22.0.2 and Python 3.10.

The error reproduces with the latest xml2rfc. When I upgrade pip to 23.3.1, xml2rfc installs correctly.

However IMHO it's a workaround, not a fix. A widely used package should install fine on a default OS install.

SpencerDawkins commented 8 months ago

Hi @kesara,

On a fully updated Ubuntu 22.04.3 LTS, it's pip 22.0.2 and Python 3.10.

I just noticed the same error when I installed Ubuntu 22.04 on my Windows 11 system. I reinstalled 20.04 on my system, and that still works. FWIW.

But at least I checked for an existing issue before adding one! :grin:

I upgraded pip3 as you suggested, so I'm fine, but it would be good to fix this.

kesara commented 8 months ago

Will it be sufficient to update the instructions to upgrade pip in xml2rfc README file? I'm inclined to keep the changes that declutter the setup process which does not come with Ubuntu LTS ships.

kesara commented 8 months ago

Looking further into this issue I discovered that file: requirements.txt is only supported by setuptools>=62.6 and considered betarish. This issue will be fixed with the next xml2rfc release.

SpencerDawkins commented 8 months ago

Hi, @kesara,

Looking further into this issue I discovered that file: requirements.txt is only supported by setuptools>=62.6 and considered betarish.

I googled that word, and Google Translate thought it might be Hindi, but didn't offer a definition. Is there one I could know?

cabo commented 8 months ago

considered betarish.

It is beta-ish, with the “r” sound insert between vowels that is typical of certain English speakers.

As in Lawrandorder :-)

Grüße, Carsten

kesara commented 8 months ago

@SpencerDawkins. As Castern pointed out the "r" got in the way. :) What I meant was it's listed as a beta feature in some documents. But part of the 62.6+ releases. Whether it's a beta feature or not, it's in a grey area. (at least to me).