Closed SchrodingersGat closed 1 year ago
@matmair any changes to the plugin installation API recently?
@SchrodingersGat nothing I submitted in the last month at least
Interesting, the results over on https://github.com/inventree/InvenTree/pull/5544 show that it's related to pip installation of the plugin:
Trying to install 'minimal' via the API:
2023-09-15T00:42:00.0547323Z Finished reloading plugins
2023-09-15T00:42:02.6162165Z A: {'command': 'python -m pip install minimal', 'result': 'Collecting minimal\n Downloading minimal-0.1.0-py2.py3-none-any.whl (3.4 kB)\nCollecting pytest (from minimal)\n Obtaining dependency information for pytest from https://files.pythonhosted.org/packages/df/d0/e192c4275aecabf74faa1aacd75ef700091913236ec78b1a98f62a2412ee/pytest-7.4.2-py3-none-any.whl.metadata\n Downloading pytest-7.4.2-py3-none-any.whl.metadata (7.9 kB)\nCollecting iniconfig (from pytest->minimal)\n Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)\nRequirement already satisfied: packaging in /usr/local/lib/python3.10/site-packages (from pytest->minimal) (23.1)\nCollecting pluggy<2.0,>=0.12 (from pytest->minimal)\n Obtaining dependency information for pluggy<2.0,>=0.12 from https://files.pythonhosted.org/packages/05/b8/42ed91898d4784546c5f06c60506400548db3f7a4b3fb441cba4e5c17952/pluggy-1.3.0-py3-none-any.whl.metadata\n Downloading pluggy-1.3.0-py3-none-any.whl.metadata (4.3 kB)\nCollecting exceptiongroup>=1.0.0rc8 (from pytest->minimal)\n Obtaining dependency information for exceptiongroup>=1.0.0rc8 from https://files.pythonhosted.org/packages/ad/83/b71e58666f156a39fb29417e4c8ca4bc7400c0dd4ed9e8842ab54dc8c344/exceptiongroup-1.1.3-py3-none-any.whl.metadata\n Downloading exceptiongroup-1.1.3-py3-none-any.whl.metadata (6.1 kB)\nRequirement already satisfied: tomli>=1.0.0 in ./data/env/lib/python3.10/site-packages (from pytest->minimal) (2.0.1)\nDownloading pytest-7.4.2-py3-none-any.whl (324 kB)\n ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 324.5/324.5 kB 20.1 MB/s eta 0:00:00\nDownloading exceptiongroup-1.1.3-py3-none-any.whl (14 kB)\nDownloading pluggy-1.3.0-py3-none-any.whl (18 kB)\nInstalling collected packages: pluggy, iniconfig, exceptiongroup, pytest, minimal\nSuccessfully installed exceptiongroup-1.1.3 iniconfig-2.0.0 minimal-0.1.0 pluggy-1.3.0 pytest-7.4.2\n', 'success': True, 'input': {'packagename': 'minimal', 'confirm': True}}
2023-09-15T00:42:03.2117714Z Running command git clone --filter=blob:none --quiet https://github.com/geoffrey-a-reed/minimal /tmp/pip-req-build-vudl6536
2023-09-15T00:42:04.2402700Z error: subprocess-exited-with-error
2023-09-15T00:42:04.2403051Z
2023-09-15T00:42:04.2403508Z × python setup.py egg_info did not run successfully.
2023-09-15T00:42:04.2404073Z │ exit code: 1
2023-09-15T00:42:04.2404377Z ╰─> [58 lines of output]
2023-09-15T00:42:04.2404647Z running egg_info
2023-09-15T00:42:04.2405077Z creating /tmp/pip-pip-egg-info-bqufzspm/minimal.egg-info
2023-09-15T00:42:04.2405760Z writing /tmp/pip-pip-egg-info-bqufzspm/minimal.egg-info/PKG-INFO
2023-09-15T00:42:04.2407081Z Traceback (most recent call last):
2023-09-15T00:42:04.2418527Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_vendor/packaging/markers.py", line 199, in __init__
2023-09-15T00:42:04.2419082Z self._markers = _normalize_extra_values(_parse_marker(marker))
2023-09-15T00:42:04.2419829Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_vendor/packaging/_parser.py", line 255, in parse_marker
2023-09-15T00:42:04.2420474Z return _parse_marker(Tokenizer(source, rules=DEFAULT_RULES))
2023-09-15T00:42:04.2421638Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_vendor/packaging/_parser.py", line 262, in _parse_marker
2023-09-15T00:42:04.2422114Z expression = [_parse_marker_atom(tokenizer)]
2023-09-15T00:42:04.2422791Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_vendor/packaging/_parser.py", line 287, in _parse_marker_atom
2023-09-15T00:42:04.2423220Z marker = _parse_marker_item(tokenizer)
2023-09-15T00:42:04.2423833Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_vendor/packaging/_parser.py", line 297, in _parse_marker_item
2023-09-15T00:42:04.2424480Z marker_var_left = _parse_marker_var(tokenizer)
2023-09-15T00:42:04.2425109Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_vendor/packaging/_parser.py", line 315, in _parse_marker_var
2023-09-15T00:42:04.2425519Z tokenizer.raise_syntax_error(
2023-09-15T00:42:04.2426141Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_vendor/packaging/_tokenizer.py", line 165, in raise_syntax_error
2023-09-15T00:42:04.2426555Z raise ParserSyntaxError(
2023-09-15T00:42:04.2428354Z setuptools.extern.packaging._tokenizer.ParserSyntaxError: Expected a marker variable or quoted string
2023-09-15T00:42:04.2429429Z
2023-09-15T00:42:04.2429878Z ^
2023-09-15T00:42:04.2430067Z
2023-09-15T00:42:04.2430557Z The above exception was the direct cause of the following exception:
2023-09-15T00:42:04.2431066Z
2023-09-15T00:42:04.2431311Z Traceback (most recent call last):
2023-09-15T00:42:04.2432492Z File "<string>", line 2, in <module>
2023-09-15T00:42:04.2433039Z File "<pip-setuptools-caller>", line 34, in <module>
2023-09-15T00:42:04.2433544Z File "/tmp/pip-req-build-vudl6536/setup.py", line 33, in <module>
2023-09-15T00:42:04.2433838Z setup(
2023-09-15T00:42:04.2434366Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
2023-09-15T00:42:04.2434777Z return distutils.core.setup(**attrs)
2023-09-15T00:42:04.2435352Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
2023-09-15T00:42:04.2435724Z return run_commands(dist)
2023-09-15T00:42:04.2436296Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
2023-09-15T00:42:04.2436694Z dist.run_commands()
2023-09-15T00:42:04.2437307Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
2023-09-15T00:42:04.2437697Z self.run_command(cmd)
2023-09-15T00:42:04.2438227Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/dist.py", line 989, in run_command
2023-09-15T00:42:04.2438608Z super().run_command(command)
2023-09-15T00:42:04.2448655Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
2023-09-15T00:42:04.2449073Z cmd_obj.run()
2023-09-15T00:42:04.2449634Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 311, in run
2023-09-15T00:42:04.2450076Z writer(self, ep.name, os.path.join(self.egg_info, ep.name))
2023-09-15T00:42:04.2450714Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 675, in write_pkg_info
2023-09-15T00:42:04.2451147Z metadata.write_pkg_info(cmd.egg_info)
2023-09-15T00:42:04.2451741Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 134, in write_pkg_info
2023-09-15T00:42:04.2452116Z self.write_pkg_file(f)
2023-09-15T00:42:04.2452680Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 204, in write_pkg_file
2023-09-15T00:42:04.2453342Z _write_requirements(self, file)
2023-09-15T00:42:04.2453999Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 227, in _write_requirements
2023-09-15T00:42:04.2454456Z r = _include_extra(req, extra, condition.strip())
2023-09-15T00:42:04.2469931Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 240, in _include_extra
2023-09-15T00:42:04.2470694Z r.marker = Marker(" and ".join(x for x in parts if x))
2023-09-15T00:42:04.2471359Z File "/home/inventree/data/env/lib/python3.10/site-packages/setuptools/_vendor/packaging/markers.py", line 217, in __init__
2023-09-15T00:42:04.2471814Z raise InvalidMarker(str(e)) from e
2023-09-15T00:42:04.2472263Z setuptools.extern.packaging.markers.InvalidMarker: Expected a marker variable or quoted string
Running the CI tests locally I get the same error (in docker). But if I run "pip install minimal" from within the docker container, it passes.
That makes less sense - might it be a problem with pip / setuptools?
Yeah it was an issue with setuptools. I have pinned it at an older version for the docker builds, at least for now.
This has now been fixed.
Automated builds have been broken for around a week now:
https://github.com/inventree/InvenTree/actions/workflows/docker.yaml
Specific error details: