https://pantsbuild.org/ logo
n

narrow-activity-17405

02/02/2023, 8:28 AM
At the moment,
check
fails for me on GitHub but works locally. The strange thing is that it complains that it can't download some file, but the link works. I trie to rerun the job multiple times... Any idea please? šŸ™‚
r

refined-addition-53644

02/02/2023, 9:05 AM
n

narrow-activity-17405

02/02/2023, 9:11 AM
Hmm, it used to work and the pyk4a was not updated recently - so maybe something on github changed?
r

refined-addition-53644

02/02/2023, 9:14 AM
yeah that looks more relevant
e

enough-analyst-54434

02/02/2023, 1:52 PM
Neither is relevant. @narrow-activity-17405 I too can download the tarball no problem, note though:
Copy code
1. pyk4a 1.4 from <https://files.pythonhosted.org/packages/56/97/1f1d0fb4c18809d9c310bbd5108f0ff6284bb7e4dd56a6155b2f98816751/pyk4a-1.4.0.tar.gz|https://files.pythonhosted.org/packages/56/97/1f1d0fb4c18809d9c310bbd5108f0ff6284bb7e4dd56a6155b2f98816751/pyk4a-1.4.0.tar.gz>
ERROR: Command errored out with exit status 1: /home/runner/.cache/pants/named_caches/pex_root/venvs/5d67b6432b833c644c0359600749c0f1e3b6765f/448dea173e399243594adb3552a7f52194138ecb/bin/python /home/runner/.cache/pants/named_caches/pex_root/venvs/5d67b6432b833c644c0359600749c0f1e3b6765f/448dea173e399243594adb3552a7f52194138ecb/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /home/runner/.cache/pants/named_caches/pex_root/pip_cache/.tmp/tmpxsqwauvu
In the ERROR line you'll find
get_requires_for_build_wheel
. So the tarball has downloaded fine and building a wheel from it has commenced, but fails. Looking at the build requires just means unpacking the tarball and inspecting
pyproject.toml
. I find:
Copy code
[build-system]
requires = ["setuptools", "wheel", "numpy"]
I'm willing to bet this is a problem induced by recent changes to setuptools since that dep is floating: https://setuptools.pypa.io/en/stable/history.html
My bet is the packaging upgrade to 23.0 in setuptools 67.0.0 (https://setuptools.pypa.io/en/stable/history.html#v67-0-0) not liking this requirement: https://github.com/etiennedub/pyk4a/blob/master/setup.cfg#L21 There should be no quotes around the version (nor should line be there at all! But that's another bug).
Yeah, that was it:
Copy code
jsirois@Gill-Windows:/tmp/Zdenek $ curl -fLO <https://files.pythonhosted.org/packages/56/97/1f1d0fb4c18809d9c310bbd5108f0ff6284bb7e4dd56a6155b2f98816751/pyk4a-1.4.0.tar.gz>
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 23267  100 23267    0     0  48173      0 --:--:-- --:--:-- --:--:-- 48271
jsirois@Gill-Windows:/tmp/Zdenek $ python3.10 -mvenv test.venv
jsirois@Gill-Windows:/tmp/Zdenek $ test.venv/bin/pip wheel --no-deps pyk4a-1.4.0.tar.gz
Processing ./pyk4a-1.4.0.tar.gz
  File was already downloaded /tmp/Zdenek/pyk4a-1.4.0.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  Ɨ Getting requirements to build wheel did not run successfully.
  ā”‚ exit code: 1
  ā•°ā”€> [55 lines of output]
      /tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/dist.py:775: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      Automatic kinect SDK detection did not yield any results.
      Traceback (most recent call last):
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 35, in __init__
          parsed = parse_requirement(requirement_string)
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 64, in parse_requirement
          return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 82, in _parse_requirement
          url, specifier, marker = _parse_requirement_details(tokenizer)
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 126, in _parse_requirement_details
          marker = _parse_requirement_marker(
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 147, in _parse_requirement_marker
          tokenizer.raise_syntax_error(
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 163, in raise_syntax_error
          raise ParserSyntaxError(
      pkg_resources.extern.packaging._tokenizer.ParserSyntaxError: Expected end or semicolon (after name and no valid version specifier)
          python_version >= "3.4"
                         ^

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "/tmp/Zdenek/test.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/tmp/Zdenek/test.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/tmp/Zdenek/test.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 484, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line 72, in <module>
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          _install_setup_requires(attrs)
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 78, in _install_setup_requires
          dist.parse_config_files(ignore_option_errors=True)
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 874, in parse_config_files
          self._finalize_requires()
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 581, in _finalize_requires
          self._move_install_requirements_markers()
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 621, in _move_install_requirements_markers
          inst_reqs = list(_reqs.parse(spec_inst_reqs))
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3095, in __init__
          super(Requirement, self).__init__(requirement_string)
        File "/tmp/pip-build-env-cydpuw7o/overlay/lib/python3.10/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 37, in __init__
          raise InvalidRequirement(str(e)) from e
      pkg_resources.extern.packaging.requirements.InvalidRequirement: Expected end or semicolon (after name and no valid version specifier)
          python_version >= "3.4"
                         ^
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Ɨ Getting requirements to build wheel did not run successfully.
ā”‚ exit code: 1
ā•°ā”€> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
šŸ™Œ 1
r

refined-addition-53644

02/02/2023, 4:03 PM
Does this mean we should all be pinning setuptools version also?
e

enough-analyst-54434

02/02/2023, 4:09 PM
You cannot! Since this is a
build_requires
it does not obey any of your constraints. The project being built gets full control over the definition.
šŸ˜ž 1
I'll be submitting a PR shortly. You can use a VCS requirement on my PR if you wish.
Hopefully they accept it and release soon though.
šŸ‘ 1
Ok: https://github.com/etiennedub/pyk4a/pull/195 So you should be able to try a requirement of
pyk4a @ <https://github.com/jsirois/pyk4a@2cfa90652c094717c7a8e5f6682fdd4aac4b98e4>
They were quick! @narrow-activity-17405 You can try 1.5.0: https://pypi.org/project/pyk4a/1.5.0/
šŸ™Œ 1
n

narrow-activity-17405

02/04/2023, 4:41 PM
Awesome, many thanks for your investigation on this.
4 Views