Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Editable builds possible? #201

Open
russkel opened this issue Aug 2, 2021 · 2 comments
Open

Editable builds possible? #201

russkel opened this issue Aug 2, 2021 · 2 comments

Comments

@russkel
Copy link

russkel commented Aug 2, 2021

Hi,

Is it possible to use pip3 install -e . with these projects? When I try I get an error:

Defaulting to user installation because normal site-packages is not writeable
ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode: /home/russ/repos/xxxxxx
(A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.)

What's the best way to go about getting this to work?

Edit: should have researched a bit more: python-poetry/poetry#1135 (comment)

and more importantly: https://www.python.org/dev/peps/pep-0660/

Cheers.

@jacebrowning
Copy link
Owner

Are you looking for one of your dependencies to be editable or for your own package to be editable when installed by other projects? Are you installing from PyPI, Git, or as a local path dependency?

When I want to work on two projects in tandem, I typically use this syntax in pyproject.toml:

[tool.poetry.dependencies]

foobar = { path = "../foobar", develop = true }

where foobar is a sibling directory to whichever project I am working on.

@russkel
Copy link
Author

russkel commented Aug 2, 2021

That's a handy hint but not sure it works in my particular case.

This is for when my project (based off template-python) is a dependency for another project of mine, a setuptools based project. All local paths.

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

No branches or pull requests

2 participants