{ "info": { "author": "Niall Douglas", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 6 - Mature", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Build Tools" ], "description": "automodinit v0.16 5th March 2017:\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\nNiall Douglas http://www.nedproductions.biz/\nSee http://pypi.python.org/pypi/automodinit for latest version\nGo to http://github.com/ned14/automodinit to report bugs\n\nThis package fixes a small problem which has been bugging me throughout\nyears of python development: forgetting to keep a module's __init__.py\nup to date with new files added. This causes the following, irritating\nproblems:\n\n1. Test suites don't find docstring tests.\n2. Static analysis tools don't see some module content in __all__.\n3. Things which scan themselves for plugins mismatch what os.listdir()\n returns as against what the module import table has.\n4. I waste time over something which should take care of itself.\n5. os.listdir() based solutions tend to fail when freezed into\n an executable binary because they don't understand running from\n inside a ZIP archive.\n\nSo here's how to make the problem go away forever:\n\n1. Include the automodinit package into your setup.py dependencies.\n2. Replace all __init__.py files like this:\n\n__all__ = [\"I will get rewritten\"]\n# Don't modify the line above, or this line!\nimport automodinit\nautomodinit.automodinit(__name__, __file__, globals())\ndel automodinit\n# Anything else you want can go after here, it won't get modified.\n\n3. That's it! From now on importing a module will set __all__ to\n a list of .py[co] files in the module and will also import each\n of those files as though you had typed:\n\n for x in __all__: import x\n\n Therefore the effect of \"from M import *\" matches exactly \"import M\".\n\nCustomising:\n-=-=-=-=-=-=\nautomodinit can take the following additional parameters:\n\nfilter: This is a callable which will be passed a list of tuples\n (loader, modulename, ispkg) which is the output of\n pkgutil.iter_modules() for the calling module. Return only\n those which you want to be imported.\nimportFindings: Defaults to True. Set to False to not auto-import\n the contents of __all__.\n\nVersion history:\n-=-=-=-=-=-=-=-=\n * v0.16 5th Mar 2017\n * Fixed stripping of __init__.py file encoding. Thanks to wtyerogers\nfor reporting this.\n * Removed suggestion this is the smallest package on pypi. Thanks to\nasl97 for reporting this.\n * Tell PyPi we are under the MIT licence. Thanks to njwhite for\nreporting this.\n\n * v0.13 9th Feb 2013\n * Fixed a bug where the source distribution would fail to install due\nto not including distribute_setup.py. Thanks to kanzure for reporting this.\n\n * v0.12 5th Mar 2012\n * Fixed a bug where isinstance would occasionally fail. Turns out the\npkgutil loading mechanism doesn't check to see if the module is already\nloaded, so it was loading duplicates whose types wouldn't compare.\n\n * v0.11 5th Mar 2012\n * Fixed some typos in Readme.txt\n * Typically what worked before packaging did not work after. Fixed!\n\n * v0.10 5th Mar 2012\n First release", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/automodinit", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "automodinit", "package_url": "https://pypi.org/project/automodinit/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/automodinit/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/automodinit" }, "release_url": "https://pypi.org/project/automodinit/0.16/", "requires_dist": null, "requires_python": null, "summary": "Solves the problem of forgetting to keep __init__.py files up to date", "version": "0.16" }, "last_serial": 2684088, "releases": { "0.10": [], "0.11": [], "0.12": [ { "comment_text": "", "digests": { "md5": "0099fbf3eef50e4bc600ff532edeaeb7", "sha256": "a546fc8509cb996680404b58fee40893aa2d6d3aa3d39514321af9d4b691690a" }, "downloads": -1, "filename": "automodinit-0.12.zip", "has_sig": false, "md5_digest": "0099fbf3eef50e4bc600ff532edeaeb7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11251, "upload_time": "2013-02-09T18:52:06", "url": "https://files.pythonhosted.org/packages/7e/c2/cce2afb690003b627a36fb80e56b6ab419a8369825da5175a3ed8e5faa80/automodinit-0.12.zip" } ], "0.13": [ { "comment_text": "", "digests": { "md5": "05c9c9ba1f6492b679213f469c0e3e0e", "sha256": "cd62cc776c42fb90fb7404f2821294c311ec7c1b1bbfff10af4e6e0d14fb16a3" }, "downloads": -1, "filename": "automodinit-0.14.tar.gz", "has_sig": false, "md5_digest": "05c9c9ba1f6492b679213f469c0e3e0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1786, "upload_time": "2017-03-05T16:15:43", "url": "https://files.pythonhosted.org/packages/e6/88/74ed0fd66e3959911b834b4ba3c0c3c84a2d985c0659aa40e0a584764f34/automodinit-0.14.tar.gz" } ], "0.14": [], "0.15": [ { "comment_text": "", "digests": { "md5": "bb5b2b004ee1c9b8f3d44596612c620d", "sha256": "b37656b11446518add475ef2d1b944f1285a475a7bbdeebfa21238ebf379ce32" }, "downloads": -1, "filename": "automodinit-0.15.tar.gz", "has_sig": false, "md5_digest": "bb5b2b004ee1c9b8f3d44596612c620d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3376, "upload_time": "2017-03-05T16:24:06", "url": "https://files.pythonhosted.org/packages/e9/e6/b1827d8c4702b7db04e38a81e18904a87fac59b134026b1a09ba93026e96/automodinit-0.15.tar.gz" } ], "0.16": [ { "comment_text": "", "digests": { "md5": "1e0c657845cc89e5bfb54617850d6aa4", "sha256": "fc0d340865be7378fe591c8db162609dea713cfef2e25d9b15836f4cd690c831" }, "downloads": -1, "filename": "automodinit-0.16.tar.gz", "has_sig": false, "md5_digest": "1e0c657845cc89e5bfb54617850d6aa4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3674, "upload_time": "2017-03-05T16:46:49", "url": "https://files.pythonhosted.org/packages/7c/28/214fff05c552d333433ca43f6cabd6d9f5577f878adff9d11e418f28917b/automodinit-0.16.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1e0c657845cc89e5bfb54617850d6aa4", "sha256": "fc0d340865be7378fe591c8db162609dea713cfef2e25d9b15836f4cd690c831" }, "downloads": -1, "filename": "automodinit-0.16.tar.gz", "has_sig": false, "md5_digest": "1e0c657845cc89e5bfb54617850d6aa4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3674, "upload_time": "2017-03-05T16:46:49", "url": "https://files.pythonhosted.org/packages/7c/28/214fff05c552d333433ca43f6cabd6d9f5577f878adff9d11e418f28917b/automodinit-0.16.tar.gz" } ] }