Skip to content

Allow fixup from path other than original#15

Open
ericlundin wants to merge 1 commit intoedwardgeorge:masterfrom
ericlundin:master
Open

Allow fixup from path other than original#15
ericlundin wants to merge 1 commit intoedwardgeorge:masterfrom
ericlundin:master

Conversation

@ericlundin
Copy link

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

@ericlundin
Copy link
Author

Hi Edward,

Any interest in this patch?

@edwardgeorge
Copy link
Owner

hey, let me take a look. thanks

@edwardgeorge
Copy link
Owner

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?

@ericlundin
Copy link
Author

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.

@timabbott
Copy link
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants