Skip to content

Make --relocatable even more relocatable #558

Closed
@omribahumi

Description

@omribahumi

Apparently even when running virtualenv --relocatable on my virtualenv, it's still not entirely relocatable:

  1. Links in ${VIRTUAL_ENV}/local are absolute instead of symbolic
  2. VIRTUAL_ENV environment variable defined in bin/activate is hard-coded

I'm thinking of fixing these myself, here's how I thought of doing it:

  1. Walk the virtualenv directory tree, make all absolute links to destinations inside the virtualenv relative (absolute links to paths outside of the virtualenv root will stay absolute)
  2. Replace hard-coded virtualenv path with bash magic (similar to this):
VIRTUAL_ENV="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

Any thoughts?

Omri.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions