pypa / flit

Simplified packaging of Python modules
https://flit.pypa.io/
BSD 3-Clause "New" or "Revised" License
2.15k stars 131 forks source link

Add `flit install --editable` option #512

Open chrisjsewell opened 2 years ago

chrisjsewell commented 2 years ago

With the introduction of standardised editable installations in version 3.4, would it now make sense to have a flit install --editable option?

Would this be the same as flit install --pth-file? Even if so, I feel --editable would be easier for people to understand, especially if they are coming from using pip

pradyunsg commented 2 years ago

I don't think it's necessary to try and mirror pip, since pip install --editable exists and works as well.

There's two mechanisms that you can perform an editable install with flit:

lwasser commented 1 year ago

hi friends. i'm curious about this too. it would be nice to have flit install --editable given there is flit install and it would make a unified front-end for users - one less thing to remember :) .

But work is work and I get the importance of focused project scope!

this might be user error but when i tried flit install -s i got a bit confused as to whether my package is installed in editable mode. I think i see it "symlinking"

Symlinking processStrava -> /Users/leahawasser/opt/miniconda3/envs/stravalib-dev/lib/python3.9/site-packages/processStrava 

but pip show doesn't suggest that it's in editable mode. it shows a very clean output with the install location in site-packages.

-> pip show processstrava -f

Name: processStrava
Version: 0.1
Summary: Init file for processing
Home-page: 
Author: 
Author-email: law <law@example.com>
License: 
Location: /Users/leahawasser/opt/miniconda3/envs/stravalib-dev/lib/python3.9/site-packages
Requires: geopandas, stravalib
Required-by: 
Files:
  processStrava
  processstrava-0.1.dist-info/INSTALLER
  processstrava-0.1.dist-info/METADATA
  processstrava-0.1.dist-info/RECORD
  processstrava-0.1.dist-info/REQUESTED
  processstrava-0.1.dist-info/direct_url.json

I really appreciate flit and just wonder if you don't allow a flit install -e option for consistency (which would be lovely for those newer to packaging as it would lower cognitive load) if you could mention in the docs that a user should do

pip install -e . or how pip install -e is different from flit install -s

This is such a fantastic package - thank you for your work on it!