{ "info": { "author": "Sean Gillies", "author_email": "sean.gillies@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "**********************\nzgeo.recipe.openlayers\n**********************\n\n.. contents::\n\nThe recipe provides the means to create `custom build profiles`_ for the\nOpenLayers_ javascript library. A compressed, single OpenLayers.js file, and\naccompanying ``img`` and ``theme`` directories are created in the named\ndirectory under the buildout's ``parts`` directory.\n\nFor example, consider the following buildout.cfg file::\n\n [buildout]\n parts = openlayers-2.7-wms\n \n [openlayers-2.7-wms]\n recipe = zgeo.recipe.openlayers\n url = http://openlayers.org/download/OpenLayers-2.7.tar.gz\n include =\n OpenLayers/Map.js\n OpenLayers/Layer/WMS.js\n\nBuilding it out::\n\n $ bin/buildout -c buildout.cfg\n Installing openlayers.\n openlayers-2.7-wms: Creating download directory: /Users/seang/code/ol-recipes/downloads\n openlayers-2.7-wms: Extracting package to /Users/seang/code/ol-recipes/parts/openlayers__compile__\n Merging libraries.\n Importing: OpenLayers.js\n Importing: OpenLayers/BaseTypes.js\n Importing: OpenLayers/Map.js\n Importing: OpenLayers/SingleFile.js\n Importing: OpenLayers/Util.js\n Importing: OpenLayers/BaseTypes/Class.js\n Importing: OpenLayers/Layer/WMS.js\n \n Resolution pass 1... \n Importing: OpenLayers/BaseTypes/Bounds.js\n ...\n \n Re-ordering files...\n \n Exporting: OpenLayers/SingleFile.js\n Exporting: OpenLayers.js\n ...\n Exporting: OpenLayers/Layer/WMS.js\n \n Total files merged: 22 \n Compressing using jsmin.\n Adding license file.\n Writing to OpenLayers.js.\n Done.\n \nProduces these files::\n\n $ ls -l parts/openlayers-2.7-wms/\n total 224\n -rw-r--r-- 1 seang staff 112535 Jun 3 13:41 OpenLayers.js\n drwxr-xr-x 25 seang staff 850 Jun 3 13:41 img\n drwxr-xr-x 3 seang staff 102 Jun 3 13:41 theme\n\n.. _custom build profiles: http://docs.openlayers.org/library/deploying.html#custom-build-profiles\n.. _OpenLayers: http://openlayers.org\n\nDetailed Documentation\n**********************\n\nSupported options\n=================\n\nurl\n URL to the package that will be downloaded and extracted. The\n supported package formats are .tar.gz, .tar.bz2, and .zip. The\n value must be a full URL,\n e.g. http://openlayers.org/download/OpenLayers-2.7.tar.gz. The\n ``path`` option can not be used at the same time with ``url``.\n\npath\n Path to a local directory containing the source code to be built\n and installed. The directory must contain the ``configure``\n script. The ``url`` option can not be used at the same time with\n ``path``.\n\nfilename\n Name of javascript file to be written. Defaults to ``OpenLayers.js``.\n\nmd5sum\n MD5 checksum for the package file. If available the MD5\n checksum of the downloaded package will be compared to this value\n and if the values do not match the execution of the recipe will\n fail.\n\npatch-binary\n Path to the ``patch`` program. Defaults to 'patch' which should\n work on any system that has the ``patch`` program available in the\n system ``PATH``.\n\npatch-options\n Options passed to the ``patch`` program. Defaults to ``-p0``.\n\npatches\n List of patch files to the applied to the extracted source. Each\n file should be given on a separate line.\n\nkeep-compile-dir\n Switch to optionally keep the temporary directory where the\n package was compiled. This is mostly useful for other recipes that\n use this recipe to compile a software but wish to do some\n additional steps not handled by this recipe. The location of the\n compile directory is stored in ``options['compile-directory']``.\n Accepted values are 'true' or 'false', defaults to 'false'.\n\n\nAdditionally, the recipe honors the ``download-directory`` option set\nin the ``[buildout]`` section and stores the downloaded files under\nit. If the value is not set a directory called ``downloads`` will be\ncreated in the root of the buildout and the ``download-directory``\noption set accordingly.\n\nThe recipe will first check if there is a local copy of the package\nbefore downloading it from the net. Files can be shared among\ndifferent buildouts by setting the ``download-directory`` to the same\nlocation.\n\nExample usage\n=============\n\nWe'll use a simple tarball to demonstrate the recipe\n\n >>> import os.path\n >>> src = join(os.path.dirname(__file__), 'testdata')\n >>> ls(src)\n - OpenLayers-2.7.tar.gz\n - README.txt\n\nLet's create a buildout to build and install the package\n\n >>> write('buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = package\n ...\n ... [package]\n ... recipe = zgeo.recipe.openlayers\n ... url = file://%s/OpenLayers-2.7.tar.gz\n ... include =\n ... OpenLayers/Map.js\n ... OpenLayers/Layer/WMS.js\n ... \"\"\" % src)\n\nThis will download, extract and build our demo package with the\ndefault build options\n\n >>> print system(buildout)\n Installing package.\n package: Creating download directory: /sample-buildout/downloads\n package: Extracting package to /sample-buildout/parts/package__compile__\n Merging libraries.\n Importing: OpenLayers.js\n Importing: OpenLayers/BaseTypes.js\n Importing: OpenLayers/Map.js\n Importing: OpenLayers/SingleFile.js\n Importing: OpenLayers/Util.js\n Importing: OpenLayers/BaseTypes/Class.js\n Importing: OpenLayers/Layer/WMS.js\n \n Resolution pass 1... \n Importing: OpenLayers/BaseTypes/Bounds.js\n Importing: OpenLayers/BaseTypes/Element.js\n Importing: OpenLayers/BaseTypes/LonLat.js\n Importing: OpenLayers/BaseTypes/Pixel.js\n Importing: OpenLayers/BaseTypes/Size.js\n Importing: OpenLayers/Events.js\n Importing: OpenLayers/Lang/en.js\n Importing: OpenLayers/Layer/Grid.js\n Importing: OpenLayers/Tile/Image.js\n Importing: OpenLayers/Tween.js\n \n Resolution pass 2... \n Importing: OpenLayers/Lang.js\n Importing: OpenLayers/Layer/HTTPRequest.js\n Importing: OpenLayers/Tile.js\n \n Resolution pass 3... \n Importing: OpenLayers/Layer.js\n \n Resolution pass 4... \n Importing: OpenLayers/Projection.js\n \n Resolution pass 5... \n \n Re-ordering files...\n \n Exporting: OpenLayers/SingleFile.js\n Exporting: OpenLayers.js\n Exporting: OpenLayers/BaseTypes.js\n Exporting: OpenLayers/BaseTypes/Class.js\n Exporting: OpenLayers/Util.js\n Exporting: OpenLayers/BaseTypes/Bounds.js\n Exporting: OpenLayers/BaseTypes/Element.js\n Exporting: OpenLayers/BaseTypes/LonLat.js\n Exporting: OpenLayers/BaseTypes/Pixel.js\n Exporting: OpenLayers/BaseTypes/Size.js\n Exporting: OpenLayers/Lang.js\n Exporting: OpenLayers/Tween.js\n Exporting: OpenLayers/Events.js\n Exporting: OpenLayers/Lang/en.js\n Exporting: OpenLayers/Projection.js\n Exporting: OpenLayers/Tile.js\n Exporting: OpenLayers/Map.js\n Exporting: OpenLayers/Tile/Image.js\n Exporting: OpenLayers/Layer.js\n Exporting: OpenLayers/Layer/HTTPRequest.js\n Exporting: OpenLayers/Layer/Grid.js\n Exporting: OpenLayers/Layer/WMS.js\n \n Total files merged: 22 \n Compressing using jsmin.\n Adding license file.\n Writing to OpenLayers.js.\n Done.\n \n \nInstalling checkouts\n====================\n\nSometimes instead of downloading and building an existing tarball we\nneed to work with code that is already available on the filesystem,\nfor example an SVN checkout.\n\nInstead of providing the ``url`` option we will provide a ``path``\noption to the directory containing the source code.\n\nLet's demonstrate this by first unpacking our test package to the\nfilesystem and building that\n\n >>> checkout_dir = tmpdir('checkout')\n >>> import setuptools.archive_util\n >>> setuptools.archive_util.unpack_archive('%s/OpenLayers-2.7.tar.gz' % src,\n ... checkout_dir)\n >>> ls(checkout_dir)\n d OpenLayers-2.7\n\n >>> write('buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = package\n ...\n ... [package]\n ... recipe = zgeo.recipe.openlayers\n ... path = %s/OpenLayers-2.7\n ... filename = ol-wms.js\n ... include =\n ... OpenLayers/Map.js\n ... OpenLayers/Layer/WMS.js\n ... \"\"\" % checkout_dir)\n\n >>> print system(buildout)\n Uninstalling package.\n Installing package.\n package: Using local source directory: /checkout/OpenLayers-2.7\n Merging libraries.\n Importing: OpenLayers.js\n Importing: OpenLayers/BaseTypes.js\n Importing: OpenLayers/Map.js\n Importing: OpenLayers/SingleFile.js\n Importing: OpenLayers/Util.js\n Importing: OpenLayers/BaseTypes/Class.js\n Importing: OpenLayers/Layer/WMS.js\n \n Resolution pass 1... \n Importing: OpenLayers/BaseTypes/Bounds.js\n Importing: OpenLayers/BaseTypes/Element.js\n Importing: OpenLayers/BaseTypes/LonLat.js\n Importing: OpenLayers/BaseTypes/Pixel.js\n Importing: OpenLayers/BaseTypes/Size.js\n Importing: OpenLayers/Events.js\n Importing: OpenLayers/Lang/en.js\n Importing: OpenLayers/Layer/Grid.js\n Importing: OpenLayers/Tile/Image.js\n Importing: OpenLayers/Tween.js\n \n Resolution pass 2... \n Importing: OpenLayers/Lang.js\n Importing: OpenLayers/Layer/HTTPRequest.js\n Importing: OpenLayers/Tile.js\n \n Resolution pass 3... \n Importing: OpenLayers/Layer.js\n \n Resolution pass 4... \n Importing: OpenLayers/Projection.js\n \n Resolution pass 5... \n \n Re-ordering files...\n \n Exporting: OpenLayers/SingleFile.js\n Exporting: OpenLayers.js\n Exporting: OpenLayers/BaseTypes.js\n Exporting: OpenLayers/BaseTypes/Class.js\n Exporting: OpenLayers/Util.js\n Exporting: OpenLayers/BaseTypes/Bounds.js\n Exporting: OpenLayers/BaseTypes/Element.js\n Exporting: OpenLayers/BaseTypes/LonLat.js\n Exporting: OpenLayers/BaseTypes/Pixel.js\n Exporting: OpenLayers/BaseTypes/Size.js\n Exporting: OpenLayers/Lang.js\n Exporting: OpenLayers/Tween.js\n Exporting: OpenLayers/Events.js\n Exporting: OpenLayers/Lang/en.js\n Exporting: OpenLayers/Projection.js\n Exporting: OpenLayers/Tile.js\n Exporting: OpenLayers/Map.js\n Exporting: OpenLayers/Tile/Image.js\n Exporting: OpenLayers/Layer.js\n Exporting: OpenLayers/Layer/HTTPRequest.js\n Exporting: OpenLayers/Layer/Grid.js\n Exporting: OpenLayers/Layer/WMS.js\n \n Total files merged: 22 \n Compressing using jsmin.\n Adding license file.\n Writing to ol-wms.js.\n Done.\n \n \n >>> ls('parts/package')\n d img\n - ol-wms.js\n d theme\n\n\nSince using the ``path`` implies that the source code has been\nacquired outside of the control of the recipe also the responsibility\nof managing it is outside of the recipe.\n\nContributors\n************\n\nSean Gillies, Author\n\n\nChange history\n**************\n\n0.2 (2009-06-04)\n================\n\n- Add output filename option.\n\n0.1 (2009-06-03)\n================\n\n- Created recipe with ZopeSkel.\n\nDownload\n********", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/sgillies/zgeorecipeopenlayers/", "keywords": "buildout recipe openlayers", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "zgeo.recipe.openlayers", "package_url": "https://pypi.org/project/zgeo.recipe.openlayers/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zgeo.recipe.openlayers/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/sgillies/zgeorecipeopenlayers/" }, "release_url": "https://pypi.org/project/zgeo.recipe.openlayers/0.2/", "requires_dist": null, "requires_python": null, "summary": "Build standard or custom profiles of the OpenLayers library", "version": "0.2" }, "last_serial": 802273, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "879f23fd184e3ca31bea6f4aa4aebd60", "sha256": "6ea2f5c358b28647ad737100e838fa71b0ab2cc703df9a7ce575a728e1f38881" }, "downloads": -1, "filename": "zgeo.recipe.openlayers-0.1.tar.gz", "has_sig": false, "md5_digest": "879f23fd184e3ca31bea6f4aa4aebd60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9777, "upload_time": "2009-06-03T22:31:16", "url": "https://files.pythonhosted.org/packages/94/ca/d8c9847207d80cc19b3778b41192b4f5befd5067561ff6a9b7650eebba89/zgeo.recipe.openlayers-0.1.tar.gz" } ], "0.1dev": [ { "comment_text": "", "digests": { "md5": "4333ef0f00ba69576044f26912ac09d8", "sha256": "82f2345f3d663a0c91221f2b08473da97dff739c49f477b3412f63fae879a60d" }, "downloads": -1, "filename": "zgeo.recipe.openlayers-0.1dev.tar.gz", "has_sig": false, "md5_digest": "4333ef0f00ba69576044f26912ac09d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9428, "upload_time": "2009-06-03T22:10:56", "url": "https://files.pythonhosted.org/packages/d6/82/bec047c5114d96868b8461253ca566aa4107c11d5d3acd767be1b876d3a2/zgeo.recipe.openlayers-0.1dev.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "62bb0b38acba81284236e67abefab6b4", "sha256": "dc09eaa2f88ec7aacf2f0cad111235ce5aadcb3e80526a3e46c724f77c89c3f5" }, "downloads": -1, "filename": "zgeo.recipe.openlayers-0.2.tar.gz", "has_sig": false, "md5_digest": "62bb0b38acba81284236e67abefab6b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9779, "upload_time": "2009-06-04T21:34:11", "url": "https://files.pythonhosted.org/packages/04/e2/1c6cc4544924806d294ebc5db75dd77417b274cdaec2fcd8e1b456531c91/zgeo.recipe.openlayers-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62bb0b38acba81284236e67abefab6b4", "sha256": "dc09eaa2f88ec7aacf2f0cad111235ce5aadcb3e80526a3e46c724f77c89c3f5" }, "downloads": -1, "filename": "zgeo.recipe.openlayers-0.2.tar.gz", "has_sig": false, "md5_digest": "62bb0b38acba81284236e67abefab6b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9779, "upload_time": "2009-06-04T21:34:11", "url": "https://files.pythonhosted.org/packages/04/e2/1c6cc4544924806d294ebc5db75dd77417b274cdaec2fcd8e1b456531c91/zgeo.recipe.openlayers-0.2.tar.gz" } ] }