Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cannot install in editable mode #190

Open
yajo opened this issue Jan 14, 2025 · 1 comment
Open

Cannot install in editable mode #190

yajo opened this issue Jan 14, 2025 · 1 comment

Comments

@yajo
Copy link
Contributor

yajo commented Jan 14, 2025

Try to install this project in editable mode and see how it fails:

uv pip install -e .
Using Python 3.11.11 environment at /home/yajo/prodevel/buffet-odoo/.data/venv/odoo-16.0
Resolved 2 packages in 55ms
error: Failed to prepare distributions
  Caused by: Failed to build `odoo-upgrade @ file:///home/yajo/prodevel/buffet-odoo/kitchen/multiversion/upgrade-util`
  Caused by: Build backend failed to build editable through `build_editable` (exit status: 1)

[stderr]
/home/yajo/.cache/uv/builds-v0/.tmp3K66DS/lib/python3.11/site-packages/setuptools_scm/version.py:352: UserWarning: <ScmVersion 0.0 dist=1110 node=g05aae80 dirty=False branch=master> does not correspond to a valid versioning date, assuming legacy version
  warnings.warn(
Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "/home/yajo/.cache/uv/builds-v0/.tmp3K66DS/lib/python3.11/site-packages/hatchling/build.py", line 83, in build_editable
    return os.path.basename(next(builder.build(directory=wheel_directory, versions=['editable'])))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yajo/.cache/uv/builds-v0/.tmp3K66DS/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 155, in build
    artifact = version_api[version](directory, **build_data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yajo/.cache/uv/builds-v0/.tmp3K66DS/lib/python3.11/site-packages/hatchling/builders/wheel.py", line 496, in build_editable
    return self.build_editable_detection(directory, **build_data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yajo/.cache/uv/builds-v0/.tmp3K66DS/lib/python3.11/site-packages/hatchling/builders/wheel.py", line 537, in build_editable_detection
    raise ValueError(message) from None
ValueError: Dev mode installations are unsupported when any path rewrite in the `sources` option changes a prefix rather than removes it, see: https://github.com/pfmoore/editables/issues/20

It would help a lot to develop it if it were possible.

@moduon MT-3426

@KangOl
Copy link
Contributor

KangOl commented Jan 16, 2025

In dev mode, don't install it and just point the odoo's --upgrade-path to the src directory.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants