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

Help with Editable Install #114

Open
squat opened this issue Jun 21, 2024 · 0 comments
Open

Help with Editable Install #114

squat opened this issue Jun 21, 2024 · 0 comments

Comments

@squat
Copy link

squat commented Jun 21, 2024

I've had a lot of success so far with this library in conjunction with both buildPythonApplication and buildPythonModule, however I'm a bit stuck on how to get an editable install of a local package with either of these two functions.

My context is that we use a monorepo at work and have a couple of helper CLIs written in Python to aid in various development and SRE tasks. These tools have to stay up-to-date with the rest of the source code otherwise there are no guarantees that anything will work.

I have a pretty basic flake.nix that defines a devShell that installs these CLIs from source in the monorepo using pyproject.nix so that engineers can have a consistent environment, but I can't figure out how to get editable installs working. I've read the some threads on the NixOS Discourse about setting PYTHONPATH [0] or how the presence of a setup.py should magically make things work [1] but haven't had any luck yet.

Do you have any suggestions? Maybe a (flake-based) venv workflow is more suited for this challenge?

[0] https://discourse.nixos.org/t/nix-shell-buildpythonpackage-pyproject-toml-does-not-seem-to-give-editable-installation-correctly/31180/13
[1] https://discourse.nixos.org/t/installing-a-python-package-in-development-mode-in-nix-shell/18475

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

1 participant