question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

equivalent to pip install -e . ?

See original GitHub issue

Hello, is there an equivalent to calling pip install -e . in a virtual-env for example? I’m currently using a flake and having to call flake update every time while developing a package is cumbersome. Is the right way to handle this to actually include pip in the shell and call pip install -e . in the shell hook?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
bmabsoutcommented, Nov 12, 2021

There are 2 things I would like to have an editable install for, there’s a separate repository that I am including as a submodule and there’s the package I work on directly. Right now what I do with respect to mach-nix is I run everything from the main folder so the imports work (or I create a virtualenv and pip install -e in there). But with an editable install, the current package would be in scope at all times. If you look at the poetry2nix documentation, there’s a “mkPoetryEditablePackage”

1reaction
yajocommented, Feb 17, 2022

My objective is to set up a development environment, where I need to edit multiple dependencies simultaneously (basically: odoo + extra addons).

According to my tests, while developing, purity is an enemy. Development is dirty by definition. To let mach-nix to serve as a replacement for Pipenv, Poetry, PDM… it needs to support development.

Of course, for packaging the final product, I’d use another kind of install (more or less the same requirements argument, but removing some -e flags from there). AFAIK this is a normal workflow, as flakes let us split the devShell definition from packages.

FTR Python supports deploying .pth files which point to other on-disk paths, son an editable install could just produce that file in the nix store as a python module, which the python interpreter would resolve appropriately. That would be great for development. If I’m not wrong, that’s what poetry2nix does.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install -e . equivalent? · Issue #34 · python-poetry ... - GitHub
These are roughly equivalent, in your src dir: pip install -e . python setup.py develop. It's called "installing a package in development mode"....
Read more >
When would the -e, --editable option be useful with pip install?
As the man page says it: -e,--editable <path/url> Install a project in editable mode (i.e. setuptools "develop mode") from a local project path...
Read more >
pip install - pip documentation v22.3.1
The install command has a --report option that will generate a JSON report of what pip has installed. In combination with the --dry-run...
Read more >
Installing Packages - Python Packaging User Guide - Python.org
pip can install from either Source Distributions (sdist) or Wheels, but if both are present on PyPI, pip will prefer a compatible wheel....
Read more >
pip install - pip documentation v21.1.dev0
pip supports installing from Git, Mercurial, Subversion and Bazaar, and detects the type of VCS using URL prefixes: git+ , hg+ , svn+...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found