{ "info": { "author": "Arlo Belshee", "author_email": "a+tg_bootstrap@arlim.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License" ], "description": "============\ntg_bootstrap\n============\n\n.. contents::\n\nStatus and License\n------------------\n\n``tg_bootstrap`` is simple glue code between `virtualenv\n`_ and `TurboGears\n`_.\n\nIt is written by Arlo Belshee. It is licensed under an\n`MIT-style permissive license\n`_.\n\nYou can install it with ``easy_install tg_bootstrap``, or from the\n`subversion repository\n`_ with\n``easy_install tg_bootstrap==dev``.\n\nWhat It Does\n------------\n\n``tg_bootstrap`` is a tool to create a TurboGears application in an\nisolated Python environment with a minimal number of system dependencies.\n\n``tg_bootstrap`` achieves the following:\n\n* Create a one-click development config script.\n* Create a one-click release deployment script.\n* Remove your TurboGears-built ``setup.py``'s dependency on TurboGears.\n\nThese install scripts will set up your app on any machine (Linux, Mac, or Windows). The\nmachine need only have a bare Python install (you will also need command-line svn\non the path for your development machine). Your app will be completely\nisolated from any other Python install on your development machine. It will not\nshare any packages either from or to your global system Python or any other Python\ninstall.\n\nBoth scripts will upgrade a previous version of your app if you install over the top of it.\nThe release script installs your app as an egg. The development script checks out\nthe source and install from there.\n\nTurboGears generates a ``setup.py`` for your app when you create it. Unfortunately, this\n``setup.py`` imports a module (``finddata.py``) from TurboGears itself. Thus, even though\nyour ``setup.py`` script indicates that TurboGears is a dependency, it cannot be used\nto install TurboGears on a machine that doesn't already have TurboGears.\n\nTo get around this problem, I have packaged TurboGears' ``finddata.py`` in this bootstrapper.\nThis way, you need only have ``tg_bootstrap`` installed to run your ``setup.py``. All the real\ndependencies - the ones that version frequently - can be controlled by each app's ``setup.py``.\n\nI will occasionally update the ``finddata.py`` that I include with ``tg_bootstrap``. However, it\ndoesn't need to support everything that the main TurboGears ``finddata.py`` supports. After all,\nyou just use this ``finddata.py`` for long enough to install TurboGears on a new development machine.\nAfter that, including during egg-based release installs, your ``setup.py`` uses TurboGears'\nthen-current ``finddata.py``.\n\nUsage\n-----\n\nGenerating Scripts\n~~~~~~~~~~~~~~~~~~\n\nAssume you were a company with two different TurboGears applications. Here is a script\nwhich will generate 4 scripts: release and development install scripts for each product::\n\n from tg_bootstrap import bootstrap\n \n bootstrap.create_scripts(\n src_repository='http://svn.example.com/app1/trunk',\n proj='someapp',\n release_version='2.3.1b3')\n\n bootstrap.create_scripts(\n src_repository='http://svn.example.com/otherapp/trunk',\n proj='otherapp',\n release_version='0.2.1')\n\nCreating a New Project\n~~~~~~~~~~~~~~~~~~~~~~\n\nTo create a brand-new TurboGears project without mucking up your system Python (by, say,\ninstalling TurboGears into it), do the following:\n\n1. If necessary, create a subversion repository for your project(s).\n2. Add an empty directory for your new project's source.\n3. Create a temporary virtualenv to work in. To do this by hand,\n\n * Download `virtualenv.py `_.\n * Using your system python, run ``python virtualenv.py /tmp/sandbox/for/now``\n * Activate that virtualenv. See the\n `virtualenv documentation `_ for\n platform-specific instructions.\n * In the virtualenv, run ``easy_install tg_bootstrap`` and ``easy_install TurboGears``.\n * Note to Vista users: easy_install is not yet aware of the Vista security model. Thus,\n it creates an easy_install.exe application that doesn't work on Vista! As a workaround,\n you can use easy_install-script.py, run via virtualenv's python. Take care, as Python's\n installer has associated .py files with your system python install. So if you have\n activated a virtualenv, then ``easy_install-script.py foo`` will install foo to your\n system Python, while ``python easy_install-script.py foo`` will install it to your\n virtualenv.\n\n4. In the active temporary virtualenv, check out your project's empty directory.\n5. Use tg-admin in the virtualenv to create your project as normal.\n6. Update your project's setup.py to use ``tg_bootstrap``'s ``finddata.py`` (see below).\n7. Commit your project.\n8. If you haven't already, add another directory to your repository to contain your bootstrapping scripts.\n9. Extend your installer script generator to contain the command for your new app. Generate\n and commit your install scripts.\n10. From any Python (system or virtualenv), run your development install script:\n ``python projname-develop.py /sandbox/for/development/of/new/app``.\n11. Delete the temporary bootstrapping virtualenv, and begin working as normal in your development\n sandbox.\n\nInstalling From Generated Scripts\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo A Development System\n+++++++++++++++++++++++\n\nTo start developing an existing project on a new machine, you need only:\n\n1. Make sure Python is installed on your machine.\n2. Make sure command-line svn is installed and on your path.\n3. Run ``python someproj-develop.py /sandbox/path/for/app``\n\nThe script will create a virtualenv at ``/sandbox/path/for/app``. Inside the virtualenv,\nit will check out your project's source to ``/sandbox/path/for/app/src``. It will then\nperform a development install of your project, including all dependencies, into that\nvirtualenv.\n\nIf your project adds dependencies or you which to freshen your dependencies to\nthe latest version, just run your app's ``setup.py`` script from within the\nvirtualenv::\n\n python setup.py develop\n\nTo A Release System\n+++++++++++++++++++\n\nTo package and deploy a project release, you need only:\n\n1. Package your application as an egg.\n2. Either upload your egg to pypi or copy it to your deployment / test server.\n3. Update the release number in your script generation script and regenerate your scripts.\n4. Make sure Python is installed on your target server.\n5. Run ``python someproj-release.py /deployment/path/for/app``\n\nThe release script will create a virtualenv at ``/sandbox/path/for/app``. It will install\nyour egg, and all its dependencies, into that virtualenv. At that point, you need only\ndo whatever your system requires to make your app live.\n\nThe `virtualenv documentation `_ describes how\nto configure common systems to run an app from a virtualenv. It includes descriptions\nof shared persistent server mechanisms such as mod_python.\n\n*Note:* ``virtualenv.py`` supports the ``--no-site-packages`` option. It defaults to\nincluding your system Python's site packages in your virtualenv. However, keeping dependencies\nclean makes upgrades easier. Thus, install scripts generated with ``tg_bootstrap``\nhave the reverse default, and a ``--with-global-site-packages`` override option.\nIf you use ``tg_bootstrap`` and don't provide a command-line option, then your virtualenv\nwill start clean and blank; it will not have access to your machine's system python libraries.\n\nThe generated scripts accept all of ``virtualenv.py``'s other options, unchanged.\n\nReducing Dependencies\n~~~~~~~~~~~~~~~~~~~~~\n\nTo use this, simply change the line of your ``setup.py`` which reads::\n\n from turbogears.finddata import find_package_data\n\nto read::\n\n try:\n\t from turbogears.finddata import find_package_data\n except ImportError:\n\t from tg_bootstrap.finddata import find_package_data\n\nThe rest of ``setup.py`` is unchanged.\n\nChanges & News\n--------------\n\nsvn trunk\n~~~~~~~~~\n\nNothing yet\n\n0.4\n~~~\n\n* Documentation\n* Initial version. Supports creating new projects without system dependencies.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/tg_bootstrap", "keywords": "setuptools deployment installation virtualenv turbogears", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "tg_bootstrap", "package_url": "https://pypi.org/project/tg_bootstrap/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tg_bootstrap/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/tg_bootstrap" }, "release_url": "https://pypi.org/project/tg_bootstrap/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "Bootstrap a TurboGears app in a VirtualEnv", "version": "0.4.0" }, "last_serial": 803391, "releases": { "0.1.0": [], "0.1.0dev-r9": [], "0.4.0": [ { "comment_text": "", "digests": { "md5": "a059e7fca9a24e1652957ebe1c8c1645", "sha256": "7b2e79c4d07871190b931a248ede01fd68ce7d0fe511eee6ad3adc77e5ea6a39" }, "downloads": -1, "filename": "tg_bootstrap-0.4.0-py2.5.egg", "has_sig": false, "md5_digest": "a059e7fca9a24e1652957ebe1c8c1645", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 16868, "upload_time": "2008-01-12T23:07:22", "url": "https://files.pythonhosted.org/packages/47/8f/c634c84195fccb869df5d2477faeb8638be480da1d38d1877c7343ff9e20/tg_bootstrap-0.4.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "81a473c2738e3e8256d6ff7dda9a21cd", "sha256": "db16b7addbafcb25d85bf1ffdcbae729ffe7e25b3642ab18545d7c5934106721" }, "downloads": -1, "filename": "tg_bootstrap-0.4.0.zip", "has_sig": false, "md5_digest": "81a473c2738e3e8256d6ff7dda9a21cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16204, "upload_time": "2008-01-12T23:07:21", "url": "https://files.pythonhosted.org/packages/45/e8/ef84e256d0a7937bfbdb1a18dbae6a6298f22c3d868995e1891d1c87ec98/tg_bootstrap-0.4.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a059e7fca9a24e1652957ebe1c8c1645", "sha256": "7b2e79c4d07871190b931a248ede01fd68ce7d0fe511eee6ad3adc77e5ea6a39" }, "downloads": -1, "filename": "tg_bootstrap-0.4.0-py2.5.egg", "has_sig": false, "md5_digest": "a059e7fca9a24e1652957ebe1c8c1645", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 16868, "upload_time": "2008-01-12T23:07:22", "url": "https://files.pythonhosted.org/packages/47/8f/c634c84195fccb869df5d2477faeb8638be480da1d38d1877c7343ff9e20/tg_bootstrap-0.4.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "81a473c2738e3e8256d6ff7dda9a21cd", "sha256": "db16b7addbafcb25d85bf1ffdcbae729ffe7e25b3642ab18545d7c5934106721" }, "downloads": -1, "filename": "tg_bootstrap-0.4.0.zip", "has_sig": false, "md5_digest": "81a473c2738e3e8256d6ff7dda9a21cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16204, "upload_time": "2008-01-12T23:07:21", "url": "https://files.pythonhosted.org/packages/45/e8/ef84e256d0a7937bfbdb1a18dbae6a6298f22c3d868995e1891d1c87ec98/tg_bootstrap-0.4.0.zip" } ] }