{ "info": { "author": "Peter Uittenbroek", "author_email": "uittenbroek@goldmund-wyldebeast-wunderliebe.com", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Topic :: Software Development :: Build Tools" ], "description": "Buildout Garbage Collector\n==========================\n\nIntroduction\n------------\nThe buildout.gc extensions can be used to ensure your egg directory only contains 'used' eggs.\nThe extension can report, move unused eggs to a specified directory or just remove egss.\n\nThis package is fork of https://github.com/thepjot/buildout.eggscleaner\n\n\nInstallation\n------------\nGarbase Collector is a buildout extensions, can add it like so ::\n\n [buildout]\n extensions =\n buildout.gc\n\n\nOptions\n-------\n\nold-eggs-directory\n The directory you want buildout.gc to move your unused eggs to.\n Should an excact egg already exist, we remove the one in the ''used'' eggs directory\n\nold-eggs-remove\n Remove eggs instead of moving\n\nold-eggs-factor\n Remove/move eggs directories when number unused eggs less * .\n Some times buildout out can be failed and in this case this extension determinate\n that ALL packages are not used. This parameter prevent removing ALL eggs in this case.\n\n\nExample ::\n\n [buildout]\n extensions =\n buildout.gc\n old-eggs-directory = ${buildout:directory}/old-eggs/\n\nTested with\n-----------\n\nzc.buildout: 2.xx\npython: 2.4.6, 2.6.8, 2.7.12, 3.3, 3.5\n\nWorking with other extensions\n-----------------------------\n\nI looked at how buildout.dumppickedversions works and made this extension work in a similar manner.\nThis extension will run alongside that one perfectly well.\n\n\nExample outputs\n---------------\n\nMoving eggs ::\n\n Moved unused egg: webcouturier.dropdownmenu-2.3-py2.6.egg\n Moved unused egg: collective.uploadify-1.0-py2.6.egg\n Moved unused egg: collective.simplesocial-1.6-py2.6.egg\n Moved unused egg: collective.autopermission-1.0b2-py2.6.egg\n\nReporting ::\n\n Don't have a 'old-eggs-directory' or 'old-eggs-remove' set, only reporting\n Can add it by adding 'old-eggs-directory = ${buildout:directory}/old-eggs' to your [buildout]\n Found unused egg: webcouturier.dropdownmenu-2.3-py2.6.egg\n Found unused egg: plone.recipe.command-1.1-py2.6.egg\n Found unused egg: collective.uploadify-1.0-py2.6.egg\n Found unused egg: Products.DocFinderTab-1.0.5-py2.6.egg\n Found unused egg: collective.simplesocial-1.6-py2.6.egg\n Found unused egg: collective.autopermission-1.0b2-py2.6.egg\n Found unused egg: Products.Clouseau-1.0-py2.6.egg\n\n\nDetailed Documentation\n======================\n\n\nLet's create an egg to use it in our tests::\n\n >>> mkdir('myegg')\n >>> write('myegg', 'setup.py',\n ... '''\n ... from setuptools import setup\n ... setup(name='myegg', version='1.0',)\n ... ''')\n >>> write('myegg', 'README', '')\n >>> print_(system(buildout+' setup myegg bdist_egg')), # doctest: +ELLIPSIS\n Running setup script 'myegg...\n ...\n\n >>> mkdir('baregg')\n >>> write('baregg', 'setup.py',\n ... '''\n ... from setuptools import setup\n ... setup(name='baregg', version='1.0',)\n ... ''')\n >>> write('baregg', 'README', '')\n >>> print_(system(buildout+' setup baregg bdist_egg')), # doctest: +ELLIPSIS\n Running setup script 'baregg...\n ...\n\nNow let's create a buildout to install the egg and to use buildout.gc::\n\n >>> write('buildout.cfg',\n ... '''\n ... [buildout]\n ... index = http://pypi.python.org/simple\n ... extensions = buildout.gc\n ... eggs-directory = ${buildout:directory}/eggs\n ... parts = foo\n ... find-links += %s\n ... [foo]\n ... recipe = zc.recipe.egg\n ... eggs = myegg\n ... ''' % join('myegg', 'dist'))\n\nRunning the buildout will print information about unused eggs::\n\n >>> print_(system(buildout)), # doctest: +ELLIPSIS\n Installing foo.\n Getting distribution for 'myegg'.\n ...\n Don't have a 'old-eggs-directory' or 'old-eggs-remove' set, only reporting\n ...\n\nWhen we only want to report unused eggs we omit the ``old-eggs-directory`` and ``old-eggs-remove`` options.\n\n >>> write('buildout.cfg',\n ... '''\n ... [buildout]\n ... index = http://pypi.python.org/simple\n ... extensions = buildout.gc\n ... eggs-directory = ${buildout:directory}/eggs\n ... parts = foo\n ... find-links += %s\n ... [foo]\n ... recipe = zc.recipe.egg\n ... eggs = baregg\n ... ''' % join('baregg', 'dist'))\n\n >>> print_(system(buildout)) # doctest:+ELLIPSIS\n Uninstalling foo.\n Installing foo.\n Getting distribution for 'baregg'.\n Got baregg 1.0.\n Don't have a 'old-eggs-directory' or 'old-eggs-remove' set, only reporting\n Can add it by adding 'old-eggs-directory = ${buildout:directory}/old-eggs' to your [buildout]\n Found unused egg: myegg...\n \n\n\n\nCheck that indeed nothing has been moved nor deleted::\n\n >>> assert 'myegg' in ''.join(os.listdir('eggs'))\n\nIf we want to move unused eggs, we just add an ``old-eggs-directory`` option and give a directory target::\n\n >>> write('buildout.cfg',\n ... '''\n ... [buildout]\n ... index = http://pypi.python.org/simple\n ... extensions = buildout.gc\n ... eggs-directory = ${buildout:directory}/eggs\n ... old-eggs-directory = ${buildout:directory}/old-eggs\n ... parts = foo\n ... find-links += %s\n ... [foo]\n ... recipe = zc.recipe.egg\n ... eggs = baregg\n ... ''' % join('baregg', 'dist'))\n\n >>> print_(system(buildout)) # doctest:+ELLIPSIS\n Updating foo.\n Moved unused egg: myegg...\n \n\nCheck that indeed 'myegg' has been moved::\n\n >>> assert 'myegg' not in ''.join(os.listdir('eggs')), 'myegg has not been moved out of egg dir'\n >>> assert 'myegg' in ''.join(os.listdir('old-eggs')), 'myegg has not been moved to old-egg dir'\n\nAnd baregg is still present::\n\n >>> assert 'baregg' in ''.join(os.listdir('eggs')), 'baregg is not present in egg dir'\n\nIf we want to remove unused eggs, we just add an ``old-eggs-remove`` option::\n\n >>> write('buildout.cfg',\n ... '''\n ... [buildout]\n ... index = http://pypi.python.org/simple\n ... extensions = buildout.gc\n ... eggs-directory = ${buildout:directory}/eggs\n ... old-eggs-directory = ${buildout:directory}/old-eggs\n ... old-eggs-remove = true\n ... parts = foo\n ... find-links += %s\n ... [foo]\n ... recipe = zc.recipe.egg\n ... eggs = myegg\n ... ''' % join('myegg', 'dist'))\n\n >>> print_(system(buildout)) # doctest:+ELLIPSIS\n Uninstalling foo.\n Installing foo.\n Getting distribution for 'myegg'.\n Got myegg 1.0.\n Moved unused egg: baregg...\n \n\nCheck that indeed 'baregg' has been removed::\n\n >>> assert 'baregg' not in ''.join(os.listdir('eggs')), 'baregg has not been removed'\n >>> assert 'baregg' not in ''.join(os.listdir('old-eggs')), 'baregg has been moved to old-egg dir'\n\nAnd 'myegg' is still present::\n\n >>> assert 'myegg' in ''.join(os.listdir('eggs')), 'myegg is not present in egg dir'\n\nContributors\n============\n\n- Peter Uittenbroek, Author\n- Anton Tagunov\n\nChange history\n==============\n\n1.2.dev\n-------\n\n- Fixed incorrect messages after restarting of buildout.\n\n1.0 (2016-01-21)\n----------------\n\n- Created public fork\n\n0.1.5 (2012-08-17)\n------------------\n\n- Redid documentation\n [thepjot]\n\n- Added doctest\n [thepjot]\n\n0.1 (internal release)\n-----------------------\n- Creation\n [thepjot]\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/atagunov/buildout.gc", "keywords": "buildout extensions eggs directory clean", "license": "ZPL", "maintainer": "", "maintainer_email": "", "name": "buildout.gc", "package_url": "https://pypi.org/project/buildout.gc/", "platform": "", "project_url": "https://pypi.org/project/buildout.gc/", "project_urls": { "Homepage": "https://bitbucket.org/atagunov/buildout.gc" }, "release_url": "https://pypi.org/project/buildout.gc/1.2/", "requires_dist": null, "requires_python": "", "summary": "A buildout extension to move non-used eggs to a specified directory", "version": "1.2" }, "last_serial": 2486094, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "3535e1159a83fd61db5d7580f027935c", "sha256": "85405c5819ec057a86ab99a0d6396bc2f6e211ce5ccb1e61f177732ef1719929" }, "downloads": -1, "filename": "buildout.gc-1.0.zip", "has_sig": false, "md5_digest": "3535e1159a83fd61db5d7580f027935c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12402, "upload_time": "2016-01-21T12:18:16", "url": "https://files.pythonhosted.org/packages/39/37/2f891aa97710cb00f40b86905a81caa1aa2e76581a52c3560d21fcdb58c6/buildout.gc-1.0.zip" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "6e9d2bcfd9554ce80f1b0befa497a7e6", "sha256": "beb9dda137eaf4883931c5a335e3339592fab799d1318be92fe60df8024c4d69" }, "downloads": -1, "filename": "buildout.gc-1.1.zip", "has_sig": false, "md5_digest": "6e9d2bcfd9554ce80f1b0befa497a7e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12906, "upload_time": "2016-01-21T12:33:12", "url": "https://files.pythonhosted.org/packages/37/d8/7b5ed9abf5e0d625fb1660ad80b5ee3e2d92b733cde714988ad4193838fb/buildout.gc-1.1.zip" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "6060b41dd2dd5d454745d739192522ee", "sha256": "b7003132509c8c164d2902710a2626064c6460c02cf008873f8b8d624805e0d3" }, "downloads": -1, "filename": "buildout.gc-1.2.tar.gz", "has_sig": false, "md5_digest": "6060b41dd2dd5d454745d739192522ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6583, "upload_time": "2016-11-28T10:21:01", "url": "https://files.pythonhosted.org/packages/a4/66/fec0abd4c2503ec1cef72f97bfa1a9ea044621c283fee390c80d83cee76a/buildout.gc-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6060b41dd2dd5d454745d739192522ee", "sha256": "b7003132509c8c164d2902710a2626064c6460c02cf008873f8b8d624805e0d3" }, "downloads": -1, "filename": "buildout.gc-1.2.tar.gz", "has_sig": false, "md5_digest": "6060b41dd2dd5d454745d739192522ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6583, "upload_time": "2016-11-28T10:21:01", "url": "https://files.pythonhosted.org/packages/a4/66/fec0abd4c2503ec1cef72f97bfa1a9ea044621c283fee390c80d83cee76a/buildout.gc-1.2.tar.gz" } ] }