virtualenv-clone icon indicating copy to clipboard operation
virtualenv-clone copied to clipboard

Allow fixup from path other than original

Open ericlundin opened this issue 10 years ago • 5 comments

Allows cloning a virtual env from a directory other than where it was created.

ericlundin avatar Apr 04 '14 18:04 ericlundin

Hi Edward,

Any interest in this patch?

ericlundin avatar Apr 11 '14 19:04 ericlundin

hey, let me take a look. thanks

edwardgeorge avatar Apr 27 '14 14:04 edwardgeorge

can you just explain the motivation for this? what would you pass in as original_dir and when would that be desirable?

is this for when you've copied a virtualenv to another directory (not through cloning) and then want to retrospectively clone it to another location?

edwardgeorge avatar Apr 27 '14 14:04 edwardgeorge

Yes, we have a build server where multiple jobs are pulling different versions of a prebuilt venv and cloning it somewhere for use by the given job.

Having the requirement that all jobs clone from the path the venv was originally created means we have to implement locking logic around the venv clone phase to ensure another job doesn't overwrite the venv we are currently cloning.

So in our usecase the original_dir will always be where we created the venv i.e. /tmp/venv and the source/destination arguments will be paths within the workspace of the current build job.

ericlundin avatar Apr 28 '14 15:04 ericlundin

@ericlundin I just got involved in maintaining this package and want to clear out the open PRs. I understand the use case here. Would you be up for adding some tests to this? This looks like the kind of thing that's likely to bitrot without tests.

timabbott avatar Oct 06 '17 23:10 timabbott