{ "info": { "author": "Tommy Yu", "author_email": "tommy.yu@auckland.ac.nz", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Framework :: Setuptools Plugin", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "calmjs.bower\n============\n\n`Bower`_ support for the `calmjs`_ framework.\n\n.. image:: https://travis-ci.org/calmjs/calmjs.bower.svg?branch=1.0.x\n :target: https://travis-ci.org/calmjs/calmjs.bower\n.. image:: https://ci.appveyor.com/api/projects/status/ji5vpf7f0kqp0qmq/branch/1.0.x?svg=true\n :target: https://ci.appveyor.com/project/metatoaster/calmjs-bower/branch/1.0.x\n.. image:: https://coveralls.io/repos/github/calmjs/calmjs.bower/badge.svg?branch=1.0.x\n :target: https://coveralls.io/github/calmjs/calmjs.bower?branch=1.0.x\n\n\nIntroduction\n------------\n\nThis package provides the support for Bower into Python through the\n|calmjs|_ framework. Through the use of this package it is possible to\ndeclare dependencies on |bower| packages through a ``bower_json``\nsection within a |setuptools|_ compatible ``setup.py`` for the given\nPython package, to generate a ``bower.json`` file metadata which can be\nreferenced and reused by other Python packages that make use of the\n|calmjs| framework.\n\nFor details on how this works, please refer to the documentation for the\n|calmjs|_ package.\n\n.. |bower| replace:: ``bower``\n.. |calmjs| replace:: ``calmjs``\n.. |calmjs.bower| replace:: ``calmjs.bower``\n.. |npm| replace:: ``npm``\n.. |setuptools| replace:: ``setuptools``\n.. _calmjs: https://pypi.python.org/pypi/calmjs\n.. _Bower: https://bower.io/\n.. _Node.js: https://nodejs.org/\n.. _setuptools: https://pypi.python.org/pypi/setuptools\n\n\nInstallation\n------------\n\nWhile the goal of |calmjs.bower| is to bring in the support of Bower\ninto |calmjs|, this library can function without Bower already installed\nbeforehand, as |calmjs| can be leveraged to bring Bower into the current\nPython environment. However, `Node.js`_ and |npm| must be installed and\navailable for this to be realized; if they are not installed please\nfollow the installation steps for Node.js appropriate for the running\nenvironment/platform.\n\nTo install |calmjs.bower| into a given Python environment, it may be\ninstalled directly from PyPI with the following command:\n\n.. code:: sh\n\n $ pip install calmjs.bower\n\nIf a local installation of Bower into the current directory is desired,\nit can be done through |calmjs| with the following command:\n\n.. code:: sh\n\n $ calmjs npm --install calmjs.bower\n\nWhich does the equivalent of ``npm install bower``; while this does not\nseem immediately advantageous, other Python packages that declared their\ndependencies for specific sets of tool can be invoked like so, and to\nfollow through on that. As an example, ``example.package`` may declare\ndependencies on Bower through |npm| plus a number of other packages\navailable through |bower|, the process then simply become this:\n\n.. code:: sh\n\n $ calmjs npm --install example.package\n $ calmjs bower --install example.package\n\nAll standard JavaScript and Node.js dependencies for ``example.package``\nwill now be installed into the current directory through the relevant\ntools. This process will also install all the other dependencies\nthrough |npm| or |bower| that other Python packages depended on by\n``example.package`` have declared. For more usage please refer to\nfurther down this document or the documentation for |calmjs|_.\n\nAlternative installation methods (advanced users)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nDevelopment is still ongoing with |calmjs.bower|, for the latest\nfeatures and bug fixes, the development version can be installed through\ngit like so:\n\n.. code:: sh\n\n $ pip install calmjs\n $ pip install git+https://github.com/calmjs/calmjs.bower.git#egg=calmjs.bower\n\nAlternatively, the git repository can be cloned directly and execute\n``python setup.py develop`` while inside the root of the source\ndirectory.\n\nKeep in mind that |calmjs| MUST be available before the ``setup.py``\nwithin the |calmjs.bower| source tree is executed, for it needs the\n``package_json`` writing capabilities in |calmjs|. Please refer to the\nbase package for further information.\n\nAs |calmjs| is declared as both a namespace and a package, mixing\ninstallation methods as described above when installing with other\n|calmjs| packages may result in the module importer being unable to look\nup the target module. While this normally will not affect end users,\nprovided they use the same, standard installation method (i.e. wheel),\nfor developers it can be troublesome. To resolve this, either stick to\nthe same installation method for all packages (i.e. ``python setup.py\ndevelop``), or import a module from the main |calmjs| package. Here\nis an example run:\n\n.. code:: python\n\n >>> import calmjs.bower\n Traceback (most recent call last):\n File \"\", line 1, in \n ImportError: No module named 'calmjs.bower'\n >>> import calmjs.base\n >>> import calmjs.bower\n >>> \n\nIf this behavior (and workaround) is undesirable, please ensure the\ninstallation of all |calmjs| related packages follow the same method\n(i.e. either ``python setup.py develop`` for all packages, or using the\nwheels acquired through ``pip``).\n\nTesting the installation\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo ensure that the |calmjs| installation is functioning correctly, the\nbuilt-in testsuite can be executed by the following command:\n\n.. code:: sh\n\n $ python -m unittest calmjs.bower.tests.make_suite\n\nIf there are failures, please file an issue on the issue tracker with\nthe full traceback, and/or the method of installation. Please also\nremember to include platform specific information, such as Python\nversion, operating system environments and version, and other related\ninformation related to the issue at hand.\n\n\nUsage\n-----\n\nThe |calmjs.bower| package will install the appropriate hooks into the\n|calmjs| console entry point and also |setuptools| to facilitate the\ngeneration of ``bower.json`` from the ``bower_json`` declarations in the\ncurrent package or other packages installed in the current environment.\n\nIf no packages with conflicting declarations are installed, with the\n|bower| binary available through the ``PATH`` environment variable (or\nin the current directory's ``node_modules``), running the utility will\nresult in something like this:\n\n.. code:: sh\n\n $ calmjs\n usage: calmjs [-h] [-d] [-q] [-v] [-V] ...\n\n positional arguments:\n \n npm npm compatibility helper\n bower bower compatibility helper\n\nIf |bower| was not available, a warning will also be displayed,\nhowever this should only affect operations that need the binary itself.\nAs for details with usage, please invoke ``calmjs bower --help``.\n\nThe following help outlines typical usage of |bower| with declarations\nby supporting Python packages through |calmjs|, so much of the help is\ncopied and shared from that package, modified from its support for\n|npm|.\n\nDeclare a ``bower.json`` for a given Python package\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf a package wish to declare dependencies on packages available through\n|bower|, it may do something like this in its ``setup.py``:\n\n.. code:: python\n\n from setuptools import setup\n\n bower_json = {\n \"dependencies\": {\n \"jquery\": \"~3.0.0\",\n \"underscore\": \"~1.8.0\",\n }\n }\n\n setup(\n name='example.package',\n ...\n install_requires=[\n 'calmjs.bower',\n ...\n ],\n bower_json=bower_json,\n ...\n )\n\nThis will let users of this package install all the dependencies through\nthe appropriate package managers as outlined above in the installation\nsection.\n\nDeclare explicit dependencies on paths inside ``bower_components``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nGiven that the dependencies on specific versions of packages sourced\nfrom |bower| is explicitly specified, build tools will benefit again\nfrom explicit declarations on files needed from those packages. Namely,\nthe compiled packages could be declared in the ``extras_calmjs`` section\nin JSON string much like ``bower_json``, like so:\n\n.. code:: python\n\n extras_calmjs = {\n 'bower_components': {\n 'jquery': 'jquery/dist/jquery.js',\n 'underscore': 'underscore/underscore.js',\n },\n }\n\n setup(\n name='example.package',\n ...\n extras_calmjs=extras_calmjs,\n ...\n )\n\nSince ``bower_components`` is declared to be an ``extras_key``,\nconflicts with existing declarations in other packages within the\nenvironment will be merged like how dependencies sections declared in\n``bower_json``.\n\nPlease do note that complete paths must be declared (note that the\n``.js`` filename suffix is included in the example); directories can\nalso be declared. However, as these declarations are done from within\nPython, explicit, full paths are required thus it is up to downstream\nintegration packages to properly handle and/or convert this into the\nconventions that standard Node.js tools might expect (i.e. where the\n``.js`` filename suffix is omitted).\n\nAs of now, the support of ``.bowerrc`` configuration settings is not\ncurrently implemented, so behavior of usage of |bower| through calmjs\nwill not account for locations that may be specified in that file. For\nthe standard use case where dependencies are installed to some separate\ndirectory as part of a typical |calmjs| workflow it should not pose a\nproblem.\n\n\nTroubleshooting\n---------------\n\nHere are some common issues that may be encountered with typical usage\nof |calmjs.bower|.\n\nRuntimeWarning: Unable to locate the 'bower' binary;\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf this message appears, this simply means the default module setup\n(i.e. ``from calmjs import bower``) could not find a usable |bower|\nbinary/runtime when it was imported. As the default runtime does\nvarious setup it only means that the helper methods may not be usable\nout of the box. This can always be rectified by having |bower| already\ninstalled in the current directory (through |npm|) or have it be\navailable through the ``PATH`` environment variable. Full details on\nwhat can be done is written in the error message.\n\n\nContribute\n----------\n\n- Issue Tracker: https://github.com/calmjs/calmjs.bower/issues\n- Source Code: https://github.com/calmjs/calmjs.bower\n\n\nLegal\n-----\n\nThe |calmjs.bower| package is part of the calmjs project.\n\nThe calmjs project is copyright (c) 2016 Auckland Bioengineering\nInstitute, University of Auckland. |calmjs.bower| is licensed under the\nterms of the GPLv2 or later.\n\nChangelog\n=========\n\n1.0.2 (2016-09-07)\n------------------\n\n- Introduced CI on Windows via appveyor and a number of issues specific\n to Python 2.7 on Windows have been fixed here and in both upstream.\n\n1.0.0 (2016-09-04)\n------------------\n\n- Initial implementation that enables the availability of bower-1.7.x\n into the calmjs framework through the framework itself.\n- Allow the declaration of bower.json through setuptools (as bower_json\n setup field)\n- Enable ``calmjs bower`` option in the same manner as ``calmjs npm``.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/calmjs/calmjs.bower", "keywords": "", "license": "gpl", "maintainer": null, "maintainer_email": null, "name": "calmjs.bower", "package_url": "https://pypi.org/project/calmjs.bower/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/calmjs.bower/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/calmjs/calmjs.bower" }, "release_url": "https://pypi.org/project/calmjs.bower/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Bower support for the calmjs framework.", "version": "1.0.2" }, "last_serial": 2328829, "releases": { "0.0": [], "1.0.0": [ { "comment_text": "", "digests": { "md5": "48a750da846392222c99833f7495d3d8", "sha256": "0832bfad56305115d2d15eadcd9b5d56c3cb44a3f47a698a41b616707fe04f25" }, "downloads": -1, "filename": "calmjs.bower-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "48a750da846392222c99833f7495d3d8", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 18696, "upload_time": "2016-09-04T13:17:04", "url": "https://files.pythonhosted.org/packages/bd/f7/b6afd6db1f2df708d617cb8b0ed8d931701e8df822a4d37c3159bf2077c3/calmjs.bower-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "08018e10512f4b54c105228441336900", "sha256": "d4116ca35030cd9c1a900b5811464020800f85cf4ed66d9ef164667cbf72b168" }, "downloads": -1, "filename": "calmjs.bower-1.0.0.tar.gz", "has_sig": false, "md5_digest": "08018e10512f4b54c105228441336900", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11793, "upload_time": "2016-09-04T13:17:07", "url": "https://files.pythonhosted.org/packages/a9/50/7acb6dab7bcee04489557714c274b7c962cd7f7a78f52efa118fb4b5e38c/calmjs.bower-1.0.0.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "890942ea4966fd74155548e12d08bb02", "sha256": "e16452deb1476ad5edb6ec35412e0db487945f3b86f1f9fd9c71742555205c0d" }, "downloads": -1, "filename": "calmjs.bower-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "890942ea4966fd74155548e12d08bb02", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 52207, "upload_time": "2016-09-07T06:42:23", "url": "https://files.pythonhosted.org/packages/41/df/fc0e492b68a4d9dc00e3e8b7d7fb254dd746f309adcad5b6a291f5b142c8/calmjs.bower-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "326e7486c785af9a1b5c9dd0d7b4a45f", "sha256": "844b268353f63d0be7cdd981595f2157c7c51dcb1b2222547d5f6a16cf3b9ece" }, "downloads": -1, "filename": "calmjs.bower-1.0.2.tar.gz", "has_sig": false, "md5_digest": "326e7486c785af9a1b5c9dd0d7b4a45f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34771, "upload_time": "2016-09-07T06:42:19", "url": "https://files.pythonhosted.org/packages/a5/54/74b8be2b46075ff0b1c73f67f9c311b0c685cc654a0418a463ad24cbfda4/calmjs.bower-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "890942ea4966fd74155548e12d08bb02", "sha256": "e16452deb1476ad5edb6ec35412e0db487945f3b86f1f9fd9c71742555205c0d" }, "downloads": -1, "filename": "calmjs.bower-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "890942ea4966fd74155548e12d08bb02", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 52207, "upload_time": "2016-09-07T06:42:23", "url": "https://files.pythonhosted.org/packages/41/df/fc0e492b68a4d9dc00e3e8b7d7fb254dd746f309adcad5b6a291f5b142c8/calmjs.bower-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "326e7486c785af9a1b5c9dd0d7b4a45f", "sha256": "844b268353f63d0be7cdd981595f2157c7c51dcb1b2222547d5f6a16cf3b9ece" }, "downloads": -1, "filename": "calmjs.bower-1.0.2.tar.gz", "has_sig": false, "md5_digest": "326e7486c785af9a1b5c9dd0d7b4a45f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34771, "upload_time": "2016-09-07T06:42:19", "url": "https://files.pythonhosted.org/packages/a5/54/74b8be2b46075ff0b1c73f67f9c311b0c685cc654a0418a463ad24cbfda4/calmjs.bower-1.0.2.tar.gz" } ] }