virtualenv-clone


Namevirtualenv-clone JSON
Version 0.5.7 PyPI version JSON
download
home_pagehttps://github.com/edwardgeorge/virtualenv-clone
Summaryscript to clone virtualenvs.
upload_time2021-09-07 23:57:44
maintainer
docs_urlNone
authorEdward George
requires_python>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            virtualenv cloning script.

[![Build Status](https://travis-ci.org/edwardgeorge/virtualenv-clone.svg?branch=master)](https://travis-ci.org/edwardgeorge/virtualenv-clone)

A script for cloning a non-relocatable virtualenv.

Virtualenv provides a way to make virtualenv's relocatable which could then be
copied as we wanted. However making a virtualenv relocatable this way breaks
the no-site-packages isolation of the virtualenv as well as other aspects that
come with relative paths and `/usr/bin/env` shebangs that may be undesirable.

Also, the .pth and .egg-link rewriting doesn't seem to work as intended. This
attempts to overcome these issues and provide a way to easily clone an
existing virtualenv.

It performs the following:

- copies `sys.argv[1]` dir to `sys.argv[2]`
- updates the hardcoded `VIRTUAL_ENV` variable in the activate script to the
  new repo location. (`--relocatable` doesn't touch this)
- updates the shebangs of the various scripts in bin to the new Python if
  they pointed to the old Python. (version numbering is retained.)

    it can also change `/usr/bin/env python` shebangs to be absolute too,
    though this functionality is not exposed at present.

- checks `sys.path` of the cloned virtualenv and if any of the paths are from
  the old environment it finds any `.pth` or `.egg` link files within sys.path
  located in the new environment and makes sure any absolute paths to the
  old environment are updated to the new environment.

- finally it double checks `sys.path` again and will fail if there are still
  paths from the old environment present.

NOTE: This script requires Python 2.7 or 3.4+



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/edwardgeorge/virtualenv-clone",
    "name": "virtualenv-clone",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
    "maintainer_email": "",
    "keywords": "",
    "author": "Edward George",
    "author_email": "edwardgeorge@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/85/76/49120db3bb8de4073ac199a08dc7f11255af8968e1e14038aee95043fafa/virtualenv-clone-0.5.7.tar.gz",
    "platform": "",
    "description": "virtualenv cloning script.\n\n[![Build Status](https://travis-ci.org/edwardgeorge/virtualenv-clone.svg?branch=master)](https://travis-ci.org/edwardgeorge/virtualenv-clone)\n\nA script for cloning a non-relocatable virtualenv.\n\nVirtualenv provides a way to make virtualenv's relocatable which could then be\ncopied as we wanted. However making a virtualenv relocatable this way breaks\nthe no-site-packages isolation of the virtualenv as well as other aspects that\ncome with relative paths and `/usr/bin/env` shebangs that may be undesirable.\n\nAlso, the .pth and .egg-link rewriting doesn't seem to work as intended. This\nattempts to overcome these issues and provide a way to easily clone an\nexisting virtualenv.\n\nIt performs the following:\n\n- copies `sys.argv[1]` dir to `sys.argv[2]`\n- updates the hardcoded `VIRTUAL_ENV` variable in the activate script to the\n  new repo location. (`--relocatable` doesn't touch this)\n- updates the shebangs of the various scripts in bin to the new Python if\n  they pointed to the old Python. (version numbering is retained.)\n\n    it can also change `/usr/bin/env python` shebangs to be absolute too,\n    though this functionality is not exposed at present.\n\n- checks `sys.path` of the cloned virtualenv and if any of the paths are from\n  the old environment it finds any `.pth` or `.egg` link files within sys.path\n  located in the new environment and makes sure any absolute paths to the\n  old environment are updated to the new environment.\n\n- finally it double checks `sys.path` again and will fail if there are still\n  paths from the old environment present.\n\nNOTE: This script requires Python 2.7 or 3.4+\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "script to clone virtualenvs.",
    "version": "0.5.7",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "e3fc74b6af88e4617576261ccb3b9eb4",
                "sha256": "44d5263bceed0bac3e1424d64f798095233b64def1c5689afa43dc3223caf5b0"
            },
            "downloads": -1,
            "filename": "virtualenv_clone-0.5.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e3fc74b6af88e4617576261ccb3b9eb4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 6624,
            "upload_time": "2021-09-07T23:57:43",
            "upload_time_iso_8601": "2021-09-07T23:57:43.440642Z",
            "url": "https://files.pythonhosted.org/packages/21/ac/e07058dc5a6c1b97f751d24f20d4b0ec14d735d77f4a1f78c471d6d13a43/virtualenv_clone-0.5.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "1c45da38faeae7447acc05a8c183d07d",
                "sha256": "418ee935c36152f8f153c79824bb93eaf6f0f7984bae31d3f48f350b9183501a"
            },
            "downloads": -1,
            "filename": "virtualenv-clone-0.5.7.tar.gz",
            "has_sig": false,
            "md5_digest": "1c45da38faeae7447acc05a8c183d07d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
            "size": 6454,
            "upload_time": "2021-09-07T23:57:44",
            "upload_time_iso_8601": "2021-09-07T23:57:44.312290Z",
            "url": "https://files.pythonhosted.org/packages/85/76/49120db3bb8de4073ac199a08dc7f11255af8968e1e14038aee95043fafa/virtualenv-clone-0.5.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-09-07 23:57:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "edwardgeorge",
    "github_project": "virtualenv-clone",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "virtualenv-clone"
}
        
Elapsed time: 0.01228s