sashahart / vex

Run a command in the named virtualenv.
MIT License
372 stars 26 forks source link

Support for .project file and venv + project folder association #56

Closed wooyek closed 5 years ago

wooyek commented 6 years ago

berdario/pew supports setproject which is a nice convenience to cd into a project folder associated with a venv activation.

I like vex's shorter command to activate venv (instead od pew workon) but it meas I have to cd use a second command to enter project folder.

It would be nice if vex checked for .project file existence and entered the project folder upon subshell activation.

brianbruggeman commented 6 years ago

I like the idea, but not the implementation.

.project isn't a universal python file.

wooyek commented 6 years ago

Yeah, but since pew used that, it would be nice to use the same file for compatibility.

It would be even nicer if python pyvenvallowed venv + project association internally, but I think it's harder to put anything into standard lib.

@brianbruggeman what would you propose?

sashahart commented 5 years ago

I don't know yet.

What defines what .project is? Is it some kind of standard, or just something pew uses?

I don't care about compatibility with pew, just python and virtualenv for this reason: if someone is using pew, they're probably not using this and if they're using this, they're probably not using pew.

So if .project is just a pew thing then I don't understand the use case where you're creating this file with pew and then using vex with it.

If pew's behavior is what you want, but you don't like the spelling of pew workon then you can create an alias to pew workon.

sashahart commented 5 years ago

It would be important to get real answers to these questions to go further into this issue.