h2oai / sparkling-water

Sparkling Water provides H2O functionality inside Spark cluster
https://docs.h2o.ai/sparkling-water/3.3/latest-stable/doc/index.html
Apache License 2.0
961 stars 361 forks source link

h2o-pysparkling-3.x does not support pep517 builds #5695

Closed philptt closed 6 months ago

philptt commented 10 months ago

Sparkling Water Version

3.40.0.4

Issue description

Hello :)

I recently came across some build issues related to the use of poetry (build-backend poetry-core) refusing to install "h2o-pysparkling-3.2" = "3.40.0.4.post1" due to the fact that this package does not support pep 517 builds.

Indeed, running: pip wheel --use-pep517 --no-cache-dir "h2o-pysparkling-3-2 (==3.40.0.4-1)"

leads to:

  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
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "/home/etab255/.conda/envs/test_build/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/etab255/.conda/envs/test_build/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/etab255/.conda/envs/test_build/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-vjfl0pjw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-vjfl0pjw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-vjfl0pjw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-vjfl0pjw/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 13, in <module>
        File "/tmp/pip-build-env-vjfl0pjw/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-vjfl0pjw/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "/tmp/pip-build-env-vjfl0pjw/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 314, in __init__
          self.metadata.version = self._normalize_version(self.metadata.version)
        File "/tmp/pip-build-env-vjfl0pjw/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 350, in _normalize_version
          normalized = str(Version(version))
        File "/tmp/pip-build-env-vjfl0pjw/overlay/lib/python3.9/site-packages/setuptools/_vendor/packaging/version.py", line 198, in __init__
          raise InvalidVersion(f"Invalid version: '{version}'")
      setuptools.extern.packaging.version.InvalidVersion: Invalid version: '3.40.0.4_1'
      [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.

Do you plan to make h2o-pysparkling support pep 517 builds in the near future ? Thx Philippe

Programming language used

Python

Programming language version

3.9

What environment are you running Sparkling Water on?

Hadoop (YARN)

Environment version info

poetry 1.4.2, python 3.9.16, pyspark 3.2.3, ubuntu:18.04

Brief cluster specification

nodes:42, cores: 672, memory: 3.3T

Relevant log output

ChefBuildError
  Backend subprocess exited when trying to invoke get_requires_for_build_wheel

  Traceback (most recent call last):
    File "/opt/poetry/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/opt/poetry/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/opt/poetry/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/tmpibwgkqr4/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/tmp/tmpibwgkqr4/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "/tmp/tmpibwgkqr4/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 480, in run_setup
      super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
    File "/tmp/tmpibwgkqr4/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 13, in <module>
    File "/tmp/tmpibwgkqr4/.venv/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/tmpibwgkqr4/.venv/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 147, in setup
      _setup_distribution = dist = klass(attrs)
    File "/tmp/tmpibwgkqr4/.venv/lib/python3.9/site-packages/setuptools/dist.py", line 314, in __init__
      self.metadata.version = self._normalize_version(self.metadata.version)
    File "/tmp/tmpibwgkqr4/.venv/lib/python3.9/site-packages/setuptools/dist.py", line 350, in _normalize_version
      normalized = str(Version(version))
    File "/tmp/tmpibwgkqr4/.venv/lib/python3.9/site-packages/setuptools/_vendor/packaging/version.py", line 198, in __init__
      raise InvalidVersion(f"Invalid version: '{version}'")
  setuptools.extern.packaging.version.InvalidVersion: Invalid version: '3.40.0.4_1'

  at /opt/poetry/lib/python3.9/site-packages/poetry/installation/chef.py:152 in _prepare
      148│ 
      149│                 error = ChefBuildError("\n\n".join(message_parts))
      150│ 
      151│             if error is not None:
    → 152│                 raise error from None
      153│ 
      154│             return path
      155│ 
      156│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with h2o-pysparkling-3-2 (3.40.0.4-1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "h2o-pysparkling-3-2 (==3.40.0.4-1)"'.

Code to reproduce the issue

pip wheel --use-pep517 --no-cache-dir "h2o-pysparkling-3-2 (==3.40.0.4-1)"
krasinski commented 10 months ago

hey @philptt we'll fix that soon!

philptt commented 10 months ago

Great! Thank you!

JeroenSchmidt commented 8 months ago

Hi @krasinski is there an eta on this fix?

krasinski commented 6 months ago

@philptt @JeroenSchmidt 3.46.0.1-1 should fix that problem, will be released this week probably