{ "info": { "author": "John Carr", "author_email": "john.carr@isotoma.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Software Distribution" ], "description": "Python Egg Layer\n================\n\nThis package provides python classes for building Python packages on the fly.\nWhy don't we use setuptools? Well we needed to generate the egg dynamically\nfrom a Django view and not generate the temp files. Why on earth would you want\nto dynamically generate a python package? Policy is really best injected into\nPlone through GenericSetup. But a lot of the policy depends on settings in\nBuildout or other deployment systems. Simple python eggs are trivial to\ngenerate, so we decided to see how well it worked to generate policy eggs from\nour configuration management tools.\n\n\nFeatures\n--------\n\nAutomatic namespacing\n If your package is called foo.bar.baz then foo/__init__.py and foo/bar/__init__.py will automatically contain the ``pkg_resources`` magic needed for namespacing, and the setup.py will define all the namespace packages.\nAutomatic z3c.autoinclude\n If you build a Plone package, it will automatically be advertised to Plone using z3c.autoinclude.\n\n\nHello, world!\n-------------\n\nBefore we can start building an egg we need 3 things: The package name, version\nand a file-like object to write to. This can be StringIO, a file or even a\nDjango HTTPResonse::\n\n from isotoma.egglayer import Package\n p = Package(open(\"test.zip\", \"w\"), \"test.package\", \"1.0\")\n\nYou don't need to worry about directories. You just add files::\n\n p.add(\"test/package/__init__.py\", \"print 'Hello, world!'\")\n\nAny files you add are tracked so that the SOURCES.txt for the egg is correct.\n\nWhen you have finished adding content to the package you call the close()\nmethod. This will generate the egg-info directory and a setup.py::\n\n p.close()\n\nPython will automatically call ``close()`` during ``__del__`` if you do not.\n\n\nDynamically generating packages from Django\n-------------------------------------------\n\nWe set up a new view subclass like this::\n\n from django.views.generic import View\n from django.http import HttpResponse\n from django import template\n from isotoma.egglayer import Package\n\n class MyCustomizedEgg(View):\n\n def get(self, request, *args, **kwargs):\n response = HttpResponse(content_type=\"application/zip\")\n response['Cache-Control'] = 'no-cache'\n response['Content-Disposition'] = 'filename=test.customegg-1.0.zip'\n\n p = Package(response, 'test.customegg', '1.0')\n p.add(\"test/customegg/foo.py\", \"print \"hello world\")\n p.close()\n\n return response\n\n\nBecause a ``HttpResonse`` is a file like object we can wire it up directly as\nthe output of the Package object. You can set a ``Cache-Control`` header to\nstop the egg being cached while you are testing, but your final code shouldn't\nrequire it. The ``Content-Disposition`` header allows your browser to suggest a\nsensible filename when saving your dynamically generated package. If you are\nusing this view from a tool like pip or buildout it may or may not care about\nthis header.\n\n(Obviously you will need to wire this into urls.py - see the wonderful Django\ndocumentation for how to do this).\n\n\nChangelog\n=========\n\n0.0.5 (2012-01-31)\n------------------\n\n- Strings are iterable. Gah, damn you Python/Jinja2.\n\n\n0.0.4 (2012-01-31)\n------------------\n\n- Add a helper for creating properties.xml files.\n\n\n0.0.3 (2011-12-21)\n------------------\n\n- Make plone xmlns available by default in configure.zcml\n\n\n0.0.2 (2011-12-14)\n------------------\n\n- Add a helper for generating propertiestool.xml::\n\n p = Profile(\"default\")\n p.propertiestool.set(\"site_properties\", \"someproperty\", \"somevalue\")\n pkg.add_profile(p)\n\n- Add a helper for generated records in registry.xml::\n\n p = Profile(\"default\")\n p.registry.set(\"plone.app.theming.interfaces.IThemeSettings.hostnameBlacklist\", [\"localhost\"])\n pkg.add_profile(p)\n\n\n0.0.1 (2011-12-14)\n------------------\n\n- Some basic abstractions to help generating Plone GenericSetup profiles::\n\n p = Profile(\"default\")\n p.dependencies.extend([\n \"my.other.egg:default\",\n ])\n pkg.add_profile(p)\n\n- Can inject raw zcml into conficture.zcml::\n\n pkg.zcml_stanza.apend('')\n\n- ``__init__.py`` will be automatically created for the root non-namespaced\n folder in your project. For plone project it will have a no-op\n ``initialize()`` that is referenced by configure.zcml.\n\n\n0.0.0 (2011-12-09)\n------------------\n\n- Initial version.", "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/isotoma.egglayer", "keywords": "egg builder packaging", "license": "Apache Software License", "maintainer": null, "maintainer_email": null, "name": "isotoma.egglayer", "package_url": "https://pypi.org/project/isotoma.egglayer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/isotoma.egglayer/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/isotoma.egglayer" }, "release_url": "https://pypi.org/project/isotoma.egglayer/0.0.5/", "requires_dist": null, "requires_python": null, "summary": "Utility for packaging things as eggs without setuptools", "version": "0.0.5" }, "last_serial": 793471, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "26de50104d8216332dd1dd992b615ece", "sha256": "db247bb2310d03ba59976361de3fa5349a13672dbe4c5ff01fd6f483a8ae40ad" }, "downloads": -1, "filename": "isotoma.egglayer-0.0.0.zip", "has_sig": false, "md5_digest": "26de50104d8216332dd1dd992b615ece", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15019, "upload_time": "2011-12-09T22:47:59", "url": "https://files.pythonhosted.org/packages/9d/d1/2f352d44816adf6e4f07381b593bc574a34dc7d2308d6ac1cc8dbe955735/isotoma.egglayer-0.0.0.zip" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "2b9b45b624d853e4704ccbf4c4d54cd3", "sha256": "00442797f6e02beba121b3b6b69f387a223bdeba84651c1488c48aacd75dad40" }, "downloads": -1, "filename": "isotoma.egglayer-0.0.1.zip", "has_sig": false, "md5_digest": "2b9b45b624d853e4704ccbf4c4d54cd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16563, "upload_time": "2011-12-14T15:55:36", "url": "https://files.pythonhosted.org/packages/eb/e4/a5972b9a6d072ec396d7ffecf515df20bea54ea48220187b211c7eabb8b3/isotoma.egglayer-0.0.1.zip" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "e4f83ca7ba04a3fd69aafeac5a5f38e8", "sha256": "f5654a9792a1462135435c77531dfe2ed139ed670c33fe92aad72e75dc7a45ee" }, "downloads": -1, "filename": "isotoma.egglayer-0.0.2.zip", "has_sig": false, "md5_digest": "e4f83ca7ba04a3fd69aafeac5a5f38e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18006, "upload_time": "2011-12-15T00:01:04", "url": "https://files.pythonhosted.org/packages/b1/54/41edf8c6a04f5f2ba0f426d6c7509b4f6af30ac39abc0706e11bb2cba0ac/isotoma.egglayer-0.0.2.zip" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "c8d840f52fb81e00b07a7065ec7a53bf", "sha256": "e7c3c1b8a699c83d291d148d85c6b2bb5ea71c6d6436d4d63132a973a1479005" }, "downloads": -1, "filename": "isotoma.egglayer-0.0.3.zip", "has_sig": false, "md5_digest": "c8d840f52fb81e00b07a7065ec7a53bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18128, "upload_time": "2011-12-21T14:47:12", "url": "https://files.pythonhosted.org/packages/62/20/40a6ba69c1085bf0a871e01e990ca140067c9a5f5731fb3e26d3f8b30e3a/isotoma.egglayer-0.0.3.zip" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "af0915c255a864656f504d37f4e3e4dd", "sha256": "e878fe2ac30102427ba9bc5aa25f68446ca780f2a80bbedec4b41f8f5d5aeac0" }, "downloads": -1, "filename": "isotoma.egglayer-0.0.4.zip", "has_sig": false, "md5_digest": "af0915c255a864656f504d37f4e3e4dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18673, "upload_time": "2012-01-31T18:19:34", "url": "https://files.pythonhosted.org/packages/91/94/2f60c403c3fa05bb4c8c7ca191b893b19f960422c707422e463dabf9c7cc/isotoma.egglayer-0.0.4.zip" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "15f56fcd593c1cb3d1d3607adf554ec2", "sha256": "478aac232b1b07fa1fe12962e2cb75858f9723b631eaf8927fc7cce28f726e86" }, "downloads": -1, "filename": "isotoma.egglayer-0.0.5.zip", "has_sig": false, "md5_digest": "15f56fcd593c1cb3d1d3607adf554ec2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18789, "upload_time": "2012-01-31T18:58:43", "url": "https://files.pythonhosted.org/packages/82/a1/ecc85d286b0b522b7ed98344bd8919988d44a48a23d4e4b9311426c1929c/isotoma.egglayer-0.0.5.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "15f56fcd593c1cb3d1d3607adf554ec2", "sha256": "478aac232b1b07fa1fe12962e2cb75858f9723b631eaf8927fc7cce28f726e86" }, "downloads": -1, "filename": "isotoma.egglayer-0.0.5.zip", "has_sig": false, "md5_digest": "15f56fcd593c1cb3d1d3607adf554ec2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18789, "upload_time": "2012-01-31T18:58:43", "url": "https://files.pythonhosted.org/packages/82/a1/ecc85d286b0b522b7ed98344bd8919988d44a48a23d4e4b9311426c1929c/isotoma.egglayer-0.0.5.zip" } ] }