{ "info": { "author": "Sean Chen", "author_email": "sean.chen@leocorn.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": "`Check the GitHub Page `_ for details document\n\nGeneral Usage\n*******************\n\n.. contents:: Table of Contents\n :depth: 5\n\nOverview\n========\n\nThis buildout_ recipe provides a easy way to manage multiple packages\nwith different types.\n\nOptions\n=======\n\n:source-root:\n The root directory where we find out the packages' source files.\n\n:packages:\n A list of packages' name followed with verion number.\n\n:dist-format:\n Available formats: zip, tar, gztar, bztar.\n Default format is ``zip``.\n\n:output-root:\n The output root dir, where the archived file saved. \n Default is parts directory.\n\nSample for distribute exact packages\n====================================\n\nSamples here are based on zc.buildout's testing support.\nCheck `testing support \n`_ \nfor more details.\n\nPreparing Dirs and Files\n------------------------\n\nSome preparation.::\n\n >>> import os\n >>> srcRoot = tmpdir('src-root')\n >>> print(srcRoot)\n /.../src-root\n >>> distRoot = tmpdir('dist-root')\n >>> print(distRoot)\n /.../dist-root\n\npreparting the test pakcages:\ncreate some folders,\nwrite some testing files too.::\n\n >>> packageOne = os.path.join(srcRoot, 'test-package-one')\n >>> mkdir(packageOne)\n >>> mkdir(os.path.join(packageOne, 'folderone'))\n >>> mkdir(os.path.join(packageOne, 'foldertwo'))\n >>> mkdir(os.path.join(packageOne, 'foldertwo', 'foldertwo2'))\n >>> write(packageOne, 'README.txt', \"Readme content\")\n >>> write(packageOne, 'folderone', 'fileone.txt', 'File one content')\n >>> write(packageOne, 'foldertwo', 'filetwo.txt', 'file two content')\n >>> write(packageOne, 'foldertwo', 'foldertwo2', 'filetwo2.txt', 'file two 2 content')\n >>> packagetwo = os.path.join(srcRoot, 'test-package-two')\n >>> mkdir(packagetwo)\n >>> mkdir(os.path.join(packagetwo, 'folder2one'))\n >>> mkdir(os.path.join(packagetwo, 'folder2two'))\n >>> mkdir(os.path.join(packagetwo, 'folder2two', 'folder2two2'))\n >>> write(packagetwo, 'README.txt', \"Readme content\")\n >>> write(packagetwo, 'folder2one', 'fileone.txt', 'File one content')\n >>> write(packagetwo, 'folder2two', 'folder2two2', 'filetwo2.txt', 'file two 2 content')\n\nCreate the buildout.cfg\n-----------------------\n\nThe sample buildout config file.\nThe ``sample_buildout`` is the temp folder for testing.::\n\n >>> write(sample_buildout, 'buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = \n ... test-source-dist\n ...\n ... [test-source-dist]\n ... recipe = leocornus.recipe.distribute\n ... source-root = %(srcRoot)s\n ... packages = \n ... test-package-one=1.0\n ... test-package-two=2.0\n ... dist-format = zip\n ... output-root = %(distRoot)s\n ... \"\"\" % dict(srcRoot=srcRoot, distRoot=distRoot))\n >>> ls(sample_buildout)\n d bin\n - buildout.cfg\n d develop-eggs\n d eggs\n d parts\n\nExecute and Verify\n------------------\n\nrun the buildout::\n\n >>> os.chdir(sample_buildout)\n >>> print(system(buildout))\n Installing test-source-dist.\n test-source-dist: Found 2 packages in total!\n test-source-dist: Processing 1 of 2 packages - test-package-one\n test-source-dist: Creating package: .../dist-root/test-package-one.1.0.zip\n test-source-dist: Wiki Update: skip - Wiki update is OFF\n test-source-dist: Processing 2 of 2 packages - test-package-two\n test-source-dist: Creating package: .../dist-root/test-package-two.2.0.zip\n test-source-dist: Wiki Update: skip - Wiki update is OFF\n test-source-dist: Creating versions list file: .../dist-root/versions.txt...\n\nRead the dist file to verify the result.::\n\n >>> import zipfile\n >>> thezip = zipfile.ZipFile(os.path.join(distRoot, 'test-package-one.1.0.zip'), \"r\")\n >>> files = thezip.namelist()\n >>> print(files)\n ['test-package-one/...']\n >>> len(files)\n 4\n >>> 'test-package-one/README.txt' in files\n True\n >>> 'test-package-one/folderone/fileone.txt' in files\n True\n >>> 'test-package-one/foldertwo/filetwo.txt' in files\n True\n >>> 'test-package-one/foldertwo/foldertwo2/filetwo2.txt' in files\n True\n\nverify package two::\n\n >>> thezip = zipfile.ZipFile(os.path.join(distRoot, 'test-package-two.2.0.zip'), \"r\")\n >>> files = thezip.namelist()\n >>> len(files)\n 3\n >>> 'test-package-two/README.txt' in files\n True\n >>> 'test-package-two/folder2one/fileone.txt' in files\n True\n >>> 'test-package-two/folder2two/folder2two2/filetwo2.txt' in files\n True\n\nverify the versions list file::\n\n >>> versions = open(os.path.join(distRoot, 'versions.txt'), 'r')\n >>> for line in versions:\n ... print(line)\n test-package-one=1.0\n test-package-two=2.0\n\nSample to distribute whole folder\n=================================\n\nWe will distirbue the whole WordPress plugins or themes folder.\nHere a list of things we are going to do:\n\n- preparing some testing folders and files to simulate WordPress\n Plugins and Themes\n- create **buildout.cfg** with the distribute recipe to archive all\n plugins and themes\n- verify the generated zip files have the correct content.\n\nPrepare Plugins and Themes\n--------------------------\n\nWe will use the same testing folders and files from previous example.\n\nMake a WordPres Plugin package, could be any PHP file::\n\n >>> pluginData = \"\"\"\n ... /**\n ... * Plugin Name: Package One\n ... * Plugin URI: http://www.pluginone.com\n ... * Description: this the a dummy testing plugin.\n ... * Version: 2.3.4\n ... */\n ... ** Some other content.\n ... Testing the case for duplicate header patterns.\n ... Version: 4.5\n ... \"\"\"\n >>> write(packageOne, 'pone.php', pluginData)\n\nMake a WordPress Theme package, \nhas to be the exact file name **style.css**::\n\n >>> themeData = \"\"\"\n ... /**\n ... * Theme Name: Package Two Theme.\n ... * Theme URI: http://www.themeone.com\n ... * Description: this is a dummy theme for testing.\n ... * Version: 3.4.5\n ... * other header content.\n ... */\n ... ** other style contnet.\n ... Another duplicate header pattern.\n ... Theme Name: fake one.\n ... \"\"\"\n >>> write(packagetwo, 'style.css', themeData)\n\nCreate the buildout file\n------------------------\n\nThe buildout will be very simple::\n\n >>> write(sample_buildout, 'buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts =\n ... test-source-dist\n ...\n ... [test-source-dist]\n ... recipe = leocornus.recipe.distribute\n ... source-root = %(srcRoot)s\n ... packages = ALL\n ... dist-format = zip\n ... output-root = %(distRoot)s\n ... \"\"\" % dict(srcRoot=srcRoot, distRoot=distRoot))\n >>> ls(sample_buildout)\n - .installed.cfg\n d bin\n - buildout.cfg\n d develop-eggs\n d eggs\n d parts\n\nExecute and Verify\n------------------\n\nExecute the buildout::\n\n >>> os.chdir(sample_buildout)\n >>> print(system(buildout))\n Uninstalling test-source-dist.\n Installing test-source-dist.\n test-source-dist: Found 2 packages in total!\n test-source-dist: Processing 1 of 2 packages - test-package-one\n test-source-dist: Creating package: .../test-package-one.2.3.4.zip\n test-source-dist: Wiki Update: skip - Wiki update is OFF\n test-source-dist: Processing 2 of 2 packages - test-package-two\n test-source-dist: Creating package: .../test-package-two.3.4.5.zip\n test-source-dist: Wiki Update: skip - Wiki update is OFF\n ...\n\nRead the zip file and verify the content.\nWe will expect the following files are created::\n\n >>> pOne = os.path.join(distRoot, 'test-package-one.2.3.4.zip')\n >>> os.path.exists(pOne)\n True\n >>> tTwo = os.path.join(distRoot, 'test-package-two.3.4.5.zip')\n >>> os.path.exists(tTwo)\n True\n\n.. _buildout: https://github.com/buildout/buildout\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://github.com/leocornus/leocornus.recipe.distribute", "keywords": "development buildout recipe package distribute", "license": "GPLv2", "maintainer": null, "maintainer_email": null, "name": "leocornus.recipe.distribute", "package_url": "https://pypi.org/project/leocornus.recipe.distribute/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/leocornus.recipe.distribute/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/leocornus/leocornus.recipe.distribute" }, "release_url": "https://pypi.org/project/leocornus.recipe.distribute/2.1.5/", "requires_dist": null, "requires_python": null, "summary": "zc.buildout recipe for package and distribute files, modules, libs, archives, etc.", "version": "2.1.5" }, "last_serial": 1508773, "releases": { "1.0.0": [ { "comment_text": "built for Linux-2.6.18-128.el5-x86_64-with-glibc2.2.5", "digests": { "md5": "3ce71642cef017ce9842ffde1173dd26", "sha256": "da0c988b64f586297b9e2755eab32acd881e04dfafb0843a0238210c621650b8" }, "downloads": -1, "filename": "leocornus.recipe.distribute-1.0.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "3ce71642cef017ce9842ffde1173dd26", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 10695, "upload_time": "2015-03-06T18:55:29", "url": "https://files.pythonhosted.org/packages/a7/56/198025ee796d98f846a15744354def241a2bf3a498b4bb06aa81e0d40273/leocornus.recipe.distribute-1.0.0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "aaa81feef65d69243b53f9d005dd4a77", "sha256": "c73400fcf900b132c8e50b802387d5f3e36f5ca5152eb7c520e55fa9926867d7" }, "downloads": -1, "filename": "leocornus.recipe.distribute-1.0.0.tar.gz", "has_sig": false, "md5_digest": "aaa81feef65d69243b53f9d005dd4a77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11049, "upload_time": "2012-06-01T19:36:23", "url": "https://files.pythonhosted.org/packages/c7/5c/59b1b2749b8f2ffa91f310308700ae7eef0c4c562beb2627dc89ed1f0eed/leocornus.recipe.distribute-1.0.0.tar.gz" } ], "2.0.0": [ { "comment_text": "built for Linux-2.6.18-128.el5-x86_64-with-glibc2.2.5", "digests": { "md5": "77ae3ccb7daeb846ebc603628b1ec61a", "sha256": "8841f3e86e95f879061a317922f1187800ede9eff25339201a00f6aa94a71e5c" }, "downloads": -1, "filename": "leocornus.recipe.distribute-2.0.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "77ae3ccb7daeb846ebc603628b1ec61a", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 10756, "upload_time": "2015-03-06T18:58:34", "url": "https://files.pythonhosted.org/packages/69/f3/4c6c6217defd1da13f9793b62cd4a6cabc6d21a237d0ae0951e5542a81c7/leocornus.recipe.distribute-2.0.0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "9aeb2d9904e0ae02d7e24c10b9f7bc85", "sha256": "61ac139192d836c58010f396089c1e811196af9acf770c852975e8724b52254b" }, "downloads": -1, "filename": "leocornus.recipe.distribute-2.0.0.tar.gz", "has_sig": false, "md5_digest": "9aeb2d9904e0ae02d7e24c10b9f7bc85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14377, "upload_time": "2015-03-06T18:58:37", "url": "https://files.pythonhosted.org/packages/c7/7d/14d6f858c8cb436e3add701d840c9425cc4e1b3dbffb0db50daf32355229/leocornus.recipe.distribute-2.0.0.tar.gz" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "797c9f88fb873020b3291188da0519b5", "sha256": "0f87ac5e6111e801fd7c3cdd01bbb6fa16b9db2033d0c503ac61b0297b8798e2" }, "downloads": -1, "filename": "leocornus.recipe.distribute-2.1.0.tar.gz", "has_sig": false, "md5_digest": "797c9f88fb873020b3291188da0519b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14541, "upload_time": "2015-03-09T02:48:35", "url": "https://files.pythonhosted.org/packages/d8/08/242395a10226308ded5423591adb51a51de4dbcc58fe058443e78f9b9127/leocornus.recipe.distribute-2.1.0.tar.gz" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "e46ac1d026e5da76b44f99271dccbea7", "sha256": "8e9fc81dcac8e787484ef598036d50e9214c9e50385743c53a69798f05718242" }, "downloads": -1, "filename": "leocornus.recipe.distribute-2.1.1.tar.gz", "has_sig": false, "md5_digest": "e46ac1d026e5da76b44f99271dccbea7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14847, "upload_time": "2015-03-09T13:14:41", "url": "https://files.pythonhosted.org/packages/c5/a1/b00a6ac10433ccfb85f39fb6250f2c0e147cb5fd094388d997e1257640ae/leocornus.recipe.distribute-2.1.1.tar.gz" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "40b98351d6371aaef65722c3bbcc9288", "sha256": "0e790dfb6dc6438ce2f705f7bcbb3881b6f32dbd84382a79d9f33f3d743da3e3" }, "downloads": -1, "filename": "leocornus.recipe.distribute-2.1.2.tar.gz", "has_sig": false, "md5_digest": "40b98351d6371aaef65722c3bbcc9288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15231, "upload_time": "2015-03-24T17:56:44", "url": "https://files.pythonhosted.org/packages/0b/52/92186d078cb36ffb4dd0cce19a163f21432c988ebe31e38625ca347cba87/leocornus.recipe.distribute-2.1.2.tar.gz" } ], "2.1.3": [ { "comment_text": "", "digests": { "md5": "4c7e435d91332415099b56d7ea87cf5c", "sha256": "0c2a366e956fee415a500dd89a82d5182101f1a36ebd5fe2b0b1c3b069e3ff60" }, "downloads": -1, "filename": "leocornus.recipe.distribute-2.1.3.tar.gz", "has_sig": false, "md5_digest": "4c7e435d91332415099b56d7ea87cf5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14988, "upload_time": "2015-03-24T18:01:12", "url": "https://files.pythonhosted.org/packages/ff/f5/85452a59e823bd35cd58d834f304b4ab24052a43706f66dbb8c86623f5b7/leocornus.recipe.distribute-2.1.3.tar.gz" } ], "2.1.4": [ { "comment_text": "", "digests": { "md5": "2ad860c13da49877c33d9a4239f0836c", "sha256": "b9b450482372d99f8b89076cd9f520ee4dcc4ac0f30573e5b6750f13cd0b0195" }, "downloads": -1, "filename": "leocornus.recipe.distribute-2.1.4.tar.gz", "has_sig": false, "md5_digest": "2ad860c13da49877c33d9a4239f0836c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14981, "upload_time": "2015-03-24T18:02:52", "url": "https://files.pythonhosted.org/packages/a8/7c/1a5b87e8d110b739b3513ab16a52a884a47e92c9528b3a2508e8f54ec95c/leocornus.recipe.distribute-2.1.4.tar.gz" } ], "2.1.5": [ { "comment_text": "", "digests": { "md5": "79f0f5d54f445f2ecc29953fbd6d4340", "sha256": "180262e91722a2b7e9d5c2ce69e8f299555ddbfe2a30fccd127e7968fc206b57" }, "downloads": -1, "filename": "leocornus.recipe.distribute-2.1.5.tar.gz", "has_sig": false, "md5_digest": "79f0f5d54f445f2ecc29953fbd6d4340", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17535, "upload_time": "2015-04-17T02:41:01", "url": "https://files.pythonhosted.org/packages/a3/97/b5de7758aa028bc35ab592a50270e915ec5c1d1d4ebcba380547276f7e83/leocornus.recipe.distribute-2.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "79f0f5d54f445f2ecc29953fbd6d4340", "sha256": "180262e91722a2b7e9d5c2ce69e8f299555ddbfe2a30fccd127e7968fc206b57" }, "downloads": -1, "filename": "leocornus.recipe.distribute-2.1.5.tar.gz", "has_sig": false, "md5_digest": "79f0f5d54f445f2ecc29953fbd6d4340", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17535, "upload_time": "2015-04-17T02:41:01", "url": "https://files.pythonhosted.org/packages/a3/97/b5de7758aa028bc35ab592a50270e915ec5c1d1d4ebcba380547276f7e83/leocornus.recipe.distribute-2.1.5.tar.gz" } ] }