Log file Viewer
Help
|
Karma
| Search:
#pypa logs for Saturday the 14th of November, 2015
(
Back to #pypa overview
) (
Back to channel listing
) (
Animate logs
)
[
19:54:21
] <
mitsuhiko
> so sad pip install --editable does not work with --target
[
19:54:27
] <
mitsuhiko
> does anyone know any workarounds?
[
20:11:45
] <
Ivoz
> mitsuhiko, how come you're wanting to work outside of virtualenv's?
[
20:11:55
] <
mitsuhiko
> long story
[
20:12:05
] <
mitsuhiko
> but i have good reasons
[
20:12:20
] <
Ivoz
> mainly problem is 'global python environment', you are installing to lots of system places
[
20:12:33
] <
Ivoz
> maybe dist wants executable an executable script
[
20:12:43
] <
Ivoz
> should it still put it in /usr/bin when used with --target ?
[
20:13:03
] <
Ivoz
> or ~/.local/bin etc
[
20:13:39
] <
mitsuhiko
> basically pip install --editable should treat --target the same as if --editable was not provided
[
20:13:46
] <
mitsuhiko
> that's quite literally all i care about
[
20:14:37
] <
Ivoz
> workaround is you can just add a directory to PYTHONPATH
[
20:14:57
] <
mitsuhiko
> a partial workaround i have right now is this:
[
20:15:02
] <
Ivoz
> or add it to sys.path in a site.py
[
20:15:03
] <
mitsuhiko
> $ PYTHONPATH='/Users/mitsuhiko/Library/Application Support/Lektor/package-cache/9393841d133977e53557c9163c563e73/' pip install --editable example/packages/demo/ --no-deps --install-option='--install-dir=/Users/mitsuhiko/Library/Application Support/Lektor/package-cache/9393841d133977e53557c9163c563e73/'
[
20:15:20
] <
mitsuhiko
> and then manually install the deps afterwards
[
20:15:55
] <
Ivoz
> why do you want editable in particular
[
20:16:11
] <
mitsuhiko
> you can assume i know what i'm doing
[
20:16:19
] <
mitsuhiko
> it's for a plugin system
[
20:16:31
] <
mitsuhiko
> for local plugin development you do not want to install a plugin constantly
[
20:16:43
] <
Ivoz
> or figure out how .pth files work
[
20:16:57
] <
Ivoz
> mainly because I forget exactly off the top of my head
[
20:17:23
] <
Ivoz
> you're welcome to file issue btw incase someone can get around to implementing it
[
20:18:07
] <
Ivoz
> so it's not just an ephemeral complaint on irc
[
20:20:57
] <
mitsuhiko
> https://github.com/pypa/pip/issues/3246
[
20:27:39
] <
Ivoz
> mitsuhiko, so I looked into it, pip's mechanism for editable installs only works for a python's site-packages
[
20:27:57
] <
mitsuhiko
> what do you mean?
[
20:28:06
] <
mitsuhiko
> that it's broken right now i noticed
[
20:28:19
] <
mitsuhiko
> but only because it invokes the wrong commands
[
20:28:44
] <
Ivoz
> it installs a package 'editably' into a python environment
[
20:29:09
] <
mitsuhiko
> i can't follow. i know how editable installations work
[
20:29:18
] <
mitsuhiko
> the problem is not that the mechanism does not work
[
20:29:34
] <
Ivoz
> the mechanism *cannot* work for an arbitrary folder
[
20:29:35
] <
mitsuhiko
> it's that if you pass --target it invokes an invalid 'develop'
[
20:29:44
] <
mitsuhiko
> Ivoz: it's not an arbitrary folder
[
20:29:51
] <
mitsuhiko
> i even outlined that in the ticket
[
20:29:56
] <
mitsuhiko
> --target already cannot be an arbitrary folder
[
20:30:04
] <
mitsuhiko
> so that's not really relevant to the issue
[
20:30:14
] <
Ivoz
> --target is 'some folder' though right
[
20:30:21
] <
Ivoz
> that you 'want a package to be installed into'
[
20:30:43
] <
mitsuhiko
> but you need to register it with pkg resources' working set and site already
[
20:30:49
] <
mitsuhiko
> at which point it's not arbitrary
[
20:30:52
] <
mitsuhiko
> again, that's not the issue
[
20:31:23
] <
mitsuhiko
> if you look at how develop works internally, it already does a no-deps installation
[
20:31:30
] <
mitsuhiko
> with a second phase which installs the dependencies
[
20:31:46
] <
mitsuhiko
> so the only thing that is broken is the way the target folder is selected
[
20:34:47
] <
Ivoz
> so you want -e --target X to put the packages inside X/ , instead of src/ ?
[
20:34:58
] <
Ivoz
> *package
[
20:35:09
] <
mitsuhiko
> no. i want it to put the egg link and pth file into X
[
20:35:12
] <
mitsuhiko
> as well as all dependencies
[
20:36:22
] <
Ivoz
> python docs tell me a .pth file won't get run from an arbitrary X though
[
20:36:31
] <
Ivoz
> only from a site-packages or lib folder
[
20:36:59
] <
mitsuhiko
> [21:26:02] <mitsuhiko> but you need to register it with pkg resources' working set and site already
[
20:37:03
] <
mitsuhiko
> as i mentioned, that is not the issue
[
20:37:08
] <
mitsuhiko
> as i am already doing that anyways in my app
[
20:37:16
] <
mitsuhiko
> you need to do the same for *any* install with --target
[
20:37:38
] <
Ivoz
> ok so maybe this will work, with extra steps from your app
[
20:37:46
] <
Ivoz
> how will it make sense for others, though?
[
20:38:29
] <
Ivoz
> the command worked for them, it did something, but it put .pth files where they don't work
[
20:38:34
] <
Ivoz
> they report the feature as broken
[
20:39:07
] <
mitsuhiko
> Ivoz: do people report --target on pip install broken?
[
20:39:23
] <
mitsuhiko
> why do you treat regular and editable installs different?
[
20:39:28
] <
mitsuhiko
> either are broken unless you are on a site path
[
20:40:00
] <
mitsuhiko
> that's just double standard
[
20:41:22
] <
Ivoz
> yeah target may be already broken for a number of other edge cases
[
20:41:30
] <
Ivoz
> not a good reason to make it more broken though
[
20:42:40
] <
Ivoz
> so the main reason you're interacting with pip at all here is to install dependencies, I'm guessing
[
20:43:12
] <
mitsuhiko
> the reason i use pip is because i need pip
[
20:43:16
] <
mitsuhiko
> to install everything
[
20:43:36
] <
mitsuhiko
> there is also absolutely zero indication that --target would not work with --editable
[
20:56:09
] <
Ivoz
> Hmm, well I guess maybe this is moreso bug for setuptools than pip
[
20:57:02
] <
mitsuhiko
> it's pip that passes the bad parameter
[
20:58:35
] <
Ivoz
> can you pass correct paramater to setup.py manually that works?
[
20:58:54
] <
mitsuhiko
> see bug report
[
20:59:02
] <
mitsuhiko
> --install-option='--install-dir= does the trick
[
20:59:18
] <
mitsuhiko
> you just need to manually install the deps afterwards