{ "info": { "author": "Erik M. Bray", "author_email": "embray@stsci.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Archiving :: Packaging" ], "description": "Introduction\n============\nThis package contains utilities used to package some of STScI's Python\nprojects; specifically those projects that comprise stsci_python_ and\nAstrolib_.\n\nIt currently consists mostly of some setup_hook scripts meant for use with\n`distutils2/packaging`_ and/or d2to1_, and a customized easy_install command\nmeant for use with distribute_.\n\nThis package is not meant for general consumption, though it might be worth\nlooking at for examples of how to do certain things with your own packages, but\nYMMV.\n\nFeatures\n========\n\nHook Scripts\n------------\nCurrently the main features of this package are a couple of setup_hook scripts.\nIn distutils2, a setup_hook is a script that runs at the beginning of any\npysetup command, and can modify the package configuration read from setup.cfg.\nThere are also pre- and post-command hooks that only run before/after a\nspecific setup command (eg. build_ext, install) is run.\n\nstsci.distutils.hooks.use_packages_root\n'''''''''''''''''''''''''''''''''''''''\nIf using the ``packages_root`` option under the ``[files]`` section of\nsetup.cfg, this hook will add that path to ``sys.path`` so that modules in your\npackage can be imported and used in setup. This can be used even if\n``packages_root`` is not specified--in this case it adds ``''`` to\n``sys.path``.\n\nstsci.distutils.hooks.version_setup_hook\n''''''''''''''''''''''''''''''''''''''''\nCreates a Python module called version.py which currently contains four\nvariables:\n\n* ``__version__`` (the release version)\n* ``__svn_revision__`` (the SVN revision info as returned by the ``svnversion``\n command)\n* ``__svn_full_info__`` (as returned by the ``svn info`` command)\n* ``__setup_datetime__`` (the date and time that setup.py was last run).\n\nThese variables can be imported in the package's ``__init__.py`` for degugging\npurposes. The version.py module will *only* be created in a package that\nimports from the version module in its ``__init__.py``. It should be noted\nthat this is generally preferable to writing these variables directly into\n``__init__.py``, since this provides more control and is less likely to\nunexpectedly break things in ``__init__.py``.\n\nstsci.distutils.hooks.version_pre_command_hook\n''''''''''''''''''''''''''''''''''''''''''''''\nIdentical to version_setup_hook, but designed to be used as a pre-command\nhook.\n\nstsci.distutils.hooks.version_post_command_hook\n'''''''''''''''''''''''''''''''''''''''''''''''\nThe complement to version_pre_command_hook. This will delete any version.py\nfiles created during a build in order to prevent them from cluttering an SVN\nworking copy (note, however, that version.py is *not* deleted from the build/\ndirectory, so a copy of it is still preserved). It will also not be deleted\nif the current directory is not an SVN working copy. For example, if source\ncode extracted from a source tarball it will be preserved.\n\nstsci.distutils.hooks.tag_svn_revision\n''''''''''''''''''''''''''''''''''''''\nA setup_hook to add the SVN revision of the current working copy path to the\npackage version string, but only if the version ends in .dev.\n\nFor example, ``mypackage-1.0.dev`` becomes ``mypackage-1.0.dev1234``. This is\nin accordance with the version string format standardized by PEP 386.\n\nThis should be used as a replacement for the ``tag_svn_revision`` option to\nthe egg_info command. This hook is more compatible with packaging/distutils2,\nwhich does not include any VCS support. This hook is also more flexible in\nthat it turns the revision number on/off depending on the presence of ``.dev``\nin the version string, so that it's not automatically added to the version in\nfinal releases.\n\nThis hook does require the ``svnversion`` command to be available in order to\nwork. It does not examine the working copy metadata directly.\n\nstsci.distutils.hooks.numpy_extension_hook\n''''''''''''''''''''''''''''''''''''''''''\nThis is a pre-command hook for the build_ext command. To use it, add a\n``[build_ext]`` section to your setup.cfg, and add to it::\n\n pre-hook.numpy-extension-hook = stsci.distutils.hooks.numpy_extension_hook\n\nThis hook must be used to build extension modules that use Numpy. The primary\nside-effect of this hook is to add the correct numpy include directories to\n`include_dirs`. To use it, add 'numpy' to the 'include-dirs' option of each\nextension module that requires numpy to build. The value 'numpy' will be\nreplaced with the actual path to the numpy includes.\n\nstsci.distutils.hooks.is_display_option\n'''''''''''''''''''''''''''''''''''''''\nThis is not actually a hook, but is a useful utility function that can be used\nin writing other hooks. Basically, it returns ``True`` if setup.py was run\nwith a \"display option\" such as --version or --help. This can be used to\nprevent your hook from running in such cases.\n\nstsci.distutils.hooks.glob_data_files\n'''''''''''''''''''''''''''''''''''''\nA pre-command hook for the install_data command. Allows filename wildcards as\nunderstood by ``glob.glob()`` to be used in the data_files option. This hook\nmust be used in order to have this functionality since it does not normally\nexist in distutils.\n\nThis hook also ensures that data files are installed relative to the package\npath. data_files shouldn't normally be installed this way, but the\nfunctionality is required for a few special cases.\n\n\nCommands\n--------\nbuild_optional_ext\n''''''''''''''''''\nThis serves as an optional replacement for the default built_ext command,\nwhich compiles C extension modules. Its purpose is to allow extension modules\nto be *optional*, so that if their build fails the rest of the package is\nstill allowed to be built and installed. This can be used when an extension\nmodule is not definitely required to use the package.\n\nTo use this custom command, add::\n\n commands = stsci.distutils.command.build_optional_ext.build_optional_ext\n\nunder the ``[global]`` section of your package's setup.cfg. Then, to mark\nan individual extension module as optional, under the setup.cfg section for\nthat extension add::\n\n optional = True\n\nOptionally, you may also add a custom failure message by adding::\n\n fail_message = The foobar extension module failed to compile.\n This could be because you lack such and such headers.\n This package will still work, but such and such features\n will be disabled.\n\n\n.. _stsci_python: http://www.stsci.edu/resources/software_hardware/pyraf/stsci_python\n.. _Astrolib: http://www.scipy.org/AstroLib/\n.. _distutils2/packaging: http://distutils2.notmyidea.org/\n.. _d2to1: http://pypi.python.org/pypi/d2to1\n.. _distribute: http://pypi.python.org/pypi/distribute\n\nChangelog\n===========\n\n0.3.7 (2013-12-23)\n------------------\n\n- Avoid using ``Popen.stdout`` directly in the version.py SVN revision\n auto-update script to avoid possible ResourceWarnings on Python >= 3.2.\n See https://github.com/spacetelescope/PyFITS/issues/45\n\n\n0.3.6 (2013-11-21)\n------------------\n\n- Fixed a syntax error in Python 3 that was introduced in 0.3.5. This\n could occur very early in the setup such that it bailed before even 2to3\n could run on the rest of the package.\n\n\n0.3.5 (2013-11-18)\n------------------\n\n- Fixed an obscure issue that could occur when trying to install with\n easy_install on Python 2 systems that have lib2to3 installed but have never\n used it.\n\n\n0.3.4 (2013-07-31)\n------------------\n\n- Updated the check for ``__loader__`` added in v0.3.3 to only perform\n that check on Python >= 3.3, since the issue doesn't apply to older\n Python versions.\n\n\n0.3.3 (2013-07-25)\n------------------\n\n- Updated the import-time SVN revision update mechanism in the ``version.py``\n module generated by the ``version_setup_hook`` to avoid running when not in\n a dev version of the package. This saves time on importing released\n packages when installed on users' systems.\n\n- Added a workaround to a bug on Python 3.3 that could cause stsci.distutils\n to crash during installation.\n\n\n0.3.2 (2013-03-27)\n------------------\n\n- Fixed a bug in the version hook that could occur if the svnversion command\n fails.\n\n- Updated the template for the version.py module generated by the version hook\n so that ``from .version import *`` will work for applications.\n\n- Added a ``__vdate__`` variable in version.py which may contain a release\n date string by specifying a ``vdate`` option in the ``[metadata]`` section\n of setup.cfg.\n\n- Added a ``stsci_distutils_version`` variable in version.py containing the\n version of stsci.distutils used to generate the file--useful primarily for\n debugging purposes.\n\n- Version 0.3.1 added a new zest.releaser hooks to ensure that source\n distributes are created as tar.gz files instead of zip files--this was left\n out of the changelog for 0.3.1.\n\n- The tar.gz zest.releaser hook is updated in 0.3.2 to only run on stsci\n packages.\n\n\n0.3.1 (2012-06-28)\n------------------\n\n- Fixed a bug where console output from svn-related programs was assumed to be\n ascii, leading to possible crashes on non-English systems.\n\n\n0.3 (2012-02-20)\n----------------\n\n- The ``glob_data_files`` hook became a pre-command hook for the install_data\n command instead of being a setup-hook. This is to support the additional\n functionality of requiring data_files with relative destination paths to be\n install relative to the package's install path (i.e. site-packages).\n\n- Dropped support for and deprecated the easier_install custom command.\n Although it should still work, it probably won't be used anymore for\n stsci_python packages.\n\n- Added support for the ``build_optional_ext`` command, which replaces/extends\n the default ``build_ext`` command. See the README for more details.\n\n- Added the ``tag_svn_revision`` setup_hook as a replacement for the\n setuptools-specific tag_svn_revision option to the egg_info command. This\n new hook is easier to use than the old tag_svn_revision option: It's\n automatically enabled by the presence of ``.dev`` in the version string, and\n disabled otherwise.\n\n- The ``svn_info_pre_hook`` and ``svn_info_post_hook`` have been replaced with\n ``version_pre_command_hook`` and ``version_post_command_hook`` respectively.\n However, a new ``version_setup_hook``, which has the same purpose, has been\n added. It is generally easier to use and will give more consistent results\n in that it will run every time setup.py is run, regardless of which command\n is used. ``stsci.distutils`` itself uses this hook--see the `setup.cfg` file\n and `stsci/distutils/__init__.py` for example usage.\n\n- Instead of creating an `svninfo.py` module, the new ``version_`` hooks create\n a file called `version.py`. In addition to the SVN info that was included\n in `svninfo.py`, it includes a ``__version__`` variable to be used by the\n package's `__init__.py`. This allows there to be a hard-coded\n ``__version__`` variable included in the source code, rather than using\n pkg_resources to get the version.\n\n- In `version.py`, the variables previously named ``__svn_version__`` and\n ``__full_svn_info__`` are now named ``__svn_revision__`` and\n ``__svn_full_info__``.\n\n- Fixed a bug when using stsci.distutils in the installation of other packages\n in the ``stsci.*`` namespace package. If stsci.distutils was not already\n installed, and was downloaded automatically by distribute through the\n setup_requires option, then ``stsci.distutils`` would fail to import. This\n is because the way the namespace package (nspkg) mechanism currently works,\n all packages belonging to the nspkg *must* be on the import path at initial\n import time.\n\n So when installing stsci.tools, for example, if ``stsci.tools`` is imported\n from within the source code at install time, but before ``stsci.distutils``\n is downloaded and added to the path, the ``stsci`` package is already\n imported and can't be extended to include the path of ``stsci.distutils``\n after the fact. The easiest way of dealing with this, it seems, is to\n delete ``stsci`` from ``sys.modules``, which forces it to be reimported, now\n the its ``__path__`` extended to include ``stsci.distutil``'s path.\n\n- Added zest.releaser hooks for tweaking the development version string\n template, and for uploading new releases to STScI's local package index.\n\n\n0.2.2 (2011-11-09)\n------------------\n\n- Fixed check for the issue205 bug on actual setuptools installs; before it\n only worked on distribute. setuptools has the issue205 bug prior to version\n 0.6c10.\n\n- Improved the fix for the issue205 bug, especially on setuptools.\n setuptools, prior to 0.6c10, did not back of sys.modules either before\n sandboxing, which causes serious problems. In fact, it's so bad that it's\n not enough to add a sys.modules backup to the current sandbox: It's in fact\n necessary to monkeypatch setuptools.sandbox.run_setup so that any subsequent\n calls to it also back up sys.modules.\n\n\n0.2.1 (2011-09-02)\n------------------\n\n- Fixed the dependencies so that setuptools is requirement but 'distribute'\n specifically. Previously installation could fail if users had plain\n setuptools installed and not distribute\n\n0.2 (2011-08-23)\n------------------\n\n- Initial public release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.stsci.edu/resources/software_hardware/stsci_python", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "stsci.distutils", "package_url": "https://pypi.org/project/stsci.distutils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/stsci.distutils/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.stsci.edu/resources/software_hardware/stsci_python" }, "release_url": "https://pypi.org/project/stsci.distutils/0.3.7/", "requires_dist": null, "requires_python": null, "summary": "distutils/packaging-related utilities used by some of STScI's packages", "version": "0.3.7" }, "last_serial": 1901270, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "b148e3562f62e106bf2c495ac35e395a", "sha256": "7be067d0221ef8dd58a83a9a9fe68e2b3e84bf27d75a8acc5ded1b364d520ee8" }, "downloads": -1, "filename": "stsci.distutils-0.2.tar.gz", "has_sig": false, "md5_digest": "b148e3562f62e106bf2c495ac35e395a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10548, "upload_time": "2011-08-23T23:15:58", "url": "https://files.pythonhosted.org/packages/2a/37/16d42079a9d2f14d90d88b68b64db910398105e2e7fa99995761f4349edf/stsci.distutils-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "1cf6cd75c43480669c8f8d634d690214", "sha256": "971c5b3c25d2f0730df995db8fba572cb192466cd67d01d1048f6d81b41fa18c" }, "downloads": -1, "filename": "stsci.distutils-0.2.1.tar.gz", "has_sig": false, "md5_digest": "1cf6cd75c43480669c8f8d634d690214", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15721, "upload_time": "2011-09-03T00:14:55", "url": "https://files.pythonhosted.org/packages/d9/49/99059e9b5dd212427f59a1b049286497fd113bfc6417386a3e4458f17851/stsci.distutils-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "c3ac6f292f5f000b2457a72bc789a64a", "sha256": "ca8b67360546f9e824d70c7d5bfefd122bafcd3d9ee4632f2ff708cb9ae2df99" }, "downloads": -1, "filename": "stsci.distutils-0.2.2.tar.gz", "has_sig": false, "md5_digest": "c3ac6f292f5f000b2457a72bc789a64a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18474, "upload_time": "2011-11-09T23:06:44", "url": "https://files.pythonhosted.org/packages/a1/c6/197e07b0eeb1b6f4ac80fb0fb91852ad3b2906b5df83f768a1c79a8f6bdb/stsci.distutils-0.2.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "4eda709410dfd8d0182b90b3142fb65e", "sha256": "5af743b67f908fda5d7ebffa2e96d2ff1d7843b6755965a98275f7547d384c06" }, "downloads": -1, "filename": "stsci.distutils-0.3.tar.gz", "has_sig": false, "md5_digest": "4eda709410dfd8d0182b90b3142fb65e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42482, "upload_time": "2012-02-21T00:41:34", "url": "https://files.pythonhosted.org/packages/b6/96/930b86cd20b30d6cb2c20d90a39df7c3c66aef8f6a3211f153a2d0d44b35/stsci.distutils-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "e3be3010830b7cb3c78b7b3889447711", "sha256": "fdd3408e9b6f3f95cfd4b59b997617c64046d3d1d2f726f67ccc69683d6892a8" }, "downloads": -1, "filename": "stsci.distutils-0.3.1.tar.gz", "has_sig": false, "md5_digest": "e3be3010830b7cb3c78b7b3889447711", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26288, "upload_time": "2012-06-28T19:17:04", "url": "https://files.pythonhosted.org/packages/a6/46/a58f5d543ebb2ed13b24b4c8843ac5ff6ee3fee6fb104714a56ec6a04119/stsci.distutils-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "9a5f2d4ba04ae428a5830014c9e6c0c1", "sha256": "47cf2d86232061ba3727c59846af9463d334a5c110e58c5573626e02c1d70aa8" }, "downloads": -1, "filename": "stsci.distutils-0.3.2.tar.gz", "has_sig": false, "md5_digest": "9a5f2d4ba04ae428a5830014c9e6c0c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47012, "upload_time": "2013-03-27T17:52:31", "url": "https://files.pythonhosted.org/packages/cf/ce/af5047f47ba7b253be16d466e929e44b9bdb48c4e95e54bad488b367083e/stsci.distutils-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "8ebafee772fc0cd862186398d5ae6864", "sha256": "445dd96d10b86be3049e4b0c649fea9fde6be5df00822abf2fa307f94cf07473" }, "downloads": -1, "filename": "stsci.distutils-0.3.3.tar.gz", "has_sig": false, "md5_digest": "8ebafee772fc0cd862186398d5ae6864", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28071, "upload_time": "2013-07-25T20:52:06", "url": "https://files.pythonhosted.org/packages/68/28/2afc578143b1e93bc48472afae0448d0b8fba5612ca5996ec35cbf9cf321/stsci.distutils-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "2c53fb185bc015f581b512207af163d7", "sha256": "75aad63b53b037a0f235528b8494bb1d3c38e525d436803b4721eb6f5d0c7591" }, "downloads": -1, "filename": "stsci.distutils-0.3.4.tar.gz", "has_sig": false, "md5_digest": "2c53fb185bc015f581b512207af163d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29565, "upload_time": "2013-08-16T15:48:23", "url": "https://files.pythonhosted.org/packages/ba/61/cf228b9fee1a2d4a3d1b264a831bcc083bc4d13408b2fcc22f1ce40ee9a9/stsci.distutils-0.3.4.tar.gz" }, { "comment_text": "", "digests": { "md5": "dbde535413bc554bea0ab22c5069410d", "sha256": "1c2377f8b679f7c8b38c16c1bd615b10ee6c915c910bc7a2ba1fa8bd2c7e42d6" }, "downloads": -1, "filename": "stsci.distutils-0.3.4.zip", "has_sig": false, "md5_digest": "dbde535413bc554bea0ab22c5069410d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43300, "upload_time": "2013-07-31T15:37:24", "url": "https://files.pythonhosted.org/packages/06/34/055041fbc21f91cc65e1ac5993a2131da890fd7cab509c2984259c3d4ec1/stsci.distutils-0.3.4.zip" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "d058ed14bd406819d3adbf9aa5985af0", "sha256": "cddb8e2a5f318b559357411c3cd8a977956a04de8d08b312816f79fe98aa2c09" }, "downloads": -1, "filename": "stsci.distutils-0.3.5.tar.gz", "has_sig": false, "md5_digest": "d058ed14bd406819d3adbf9aa5985af0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28538, "upload_time": "2013-11-18T20:28:41", "url": "https://files.pythonhosted.org/packages/f5/ed/bc5e3ab85e18999c3e54890d38662b871f5167dafabdcac2625839c676da/stsci.distutils-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "11bd73ef520b4bf4539281180ca6deb2", "sha256": "1a9734ed6ad29d4f5e72826949c623b8cc3d4f09fa6849a67dc709143598383a" }, "downloads": -1, "filename": "stsci.distutils-0.3.6.tar.gz", "has_sig": false, "md5_digest": "11bd73ef520b4bf4539281180ca6deb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48462, "upload_time": "2013-11-21T20:40:25", "url": "https://files.pythonhosted.org/packages/c3/1a/e4bbcea7a5124446913a90118dbf0a7ade4287c28751e4e192d684f3d149/stsci.distutils-0.3.6.tar.gz" } ], "0.3.7": [ { "comment_text": "", "digests": { "md5": "65c866c0444f6a8effe2d41688606a0c", "sha256": "e0f115126ec1e27b345e338ce9cbca0fe87cd30e409e052acccfea05a9e9783c" }, "downloads": -1, "filename": "stsci.distutils-0.3.7.tar.gz", "has_sig": false, "md5_digest": "65c866c0444f6a8effe2d41688606a0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48831, "upload_time": "2013-12-23T23:22:47", "url": "https://files.pythonhosted.org/packages/f7/ec/c389250a555ab8429ca91becaf2a22948fd2d0952d693b99b34cad8ecf08/stsci.distutils-0.3.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "65c866c0444f6a8effe2d41688606a0c", "sha256": "e0f115126ec1e27b345e338ce9cbca0fe87cd30e409e052acccfea05a9e9783c" }, "downloads": -1, "filename": "stsci.distutils-0.3.7.tar.gz", "has_sig": false, "md5_digest": "65c866c0444f6a8effe2d41688606a0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48831, "upload_time": "2013-12-23T23:22:47", "url": "https://files.pythonhosted.org/packages/f7/ec/c389250a555ab8429ca91becaf2a22948fd2d0952d693b99b34cad8ecf08/stsci.distutils-0.3.7.tar.gz" } ] }