Skip to content

Poetry based on pyproject.toml installing from hpobench development branch fails due to yahpo-gym subdir #161

@LGro

Description

@LGro

With the following pyproject.toml in a Python 3.9 environment with Poetry version 1.2.0:

[tool.poetry]
name = "hpobench-yahpo-failure"
version = "0.1.0"
description = "Example repo to demonstrate setup error with hpobench yahpo integration."
authors = ["Grossberger Lukas <[email protected]>"]
readme = "README.md"
packages = [{include = "hpobench_yahpo_failure"}]

[tool.poetry.dependencies]
python = "^3.8"
hpobench = {git = "https://github.com/automl/HPOBench.git", branch = "development"}


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

the following error occurs:

Unable to determine package info for path: /tmp/.venv/src/yahpo_gym

Command ['/tmp/tmpsrspcer5/.venv/bin/python', '-'] errored with the following return code 1, and output: 
Traceback (most recent call last):
  File "<stdin>", line 9, in <module>
  File "/tmp/tmpsrspcer5/.venv/lib/python3.9/site-packages/build/__init__.py", line 208, in __init__
    _validate_source_directory(srcdir)
  File "/tmp/tmpsrspcer5/.venv/lib/python3.9/site-packages/build/__init__.py", line 109, in _validate_source_directory
    raise BuildException(f'Source {srcdir} does not appear to be a Python project: no pyproject.toml or setup.py')
build.BuildException: Source /tmp/.venv/src/yahpo_gym does not appear to be a Python project: no pyproject.toml or setup.py
input was : import build
import build.env
import pep517

source = '/tmp/.venv/src/yahpo_gym'
dest = '/tmp/tmpsrspcer5/dist'

with build.env.IsolatedEnvBuilder() as env:
    builder = build.ProjectBuilder(
        srcdir=source,
        scripts_dir=env.scripts_dir,
        python_executable=env.executable,
        runner=pep517.quiet_subprocess_runner,
    )
    env.install(builder.build_system_requires)
    env.install(builder.get_requires_for_build('wheel'))
    builder.metadata_path(dest)

No fallback setup.py file was found to generate egg_info.

which I don't get when just using vanilla pip to

pip install git+https://github.com/automl/HPOBench.git@development

This makes me think that poetry might miss the subdirectory specification in the hpobench dependencies and I'm wondering if it might be viable to switch in hpobench to the wheel from pypi.org instead of installing the yahpo-gym dependency from source in hpobench.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions