Skip to content
This repository
Browse code

Issue #49, update setup.py for packaging

* MANIFEST.in listing all deps (js and otherwise)
* Remove requirements file in favor of install_requires in setup.py
* Copy of LICENSE and NOTICES for Python only package
* Fixes to install doc
  • Loading branch information...
commit 2df148e8f345657475507109ab63d68c4bc964d7 1 parent 8a5cecd
Peter Parente parente authored
6 docs/tutorial/install.rst
Source Rendered
@@ -114,7 +114,7 @@ If you want to create a virtualenv containing all the pre-requisites needed to d
114 114 .. sourcecode:: console
115 115
116 116 $ cd servers/python
117   - $ pip install -r requirements.txt
  117 + $ pip install .
118 118
119 119 #. Use the `pycoweb` command to create a new coweb deployment in the virtual environment root.
120 120
@@ -152,10 +152,10 @@ The http://github.com/opencoweb/cowebx repository on GitHub contains the coweb e
152 152
153 153 .. sourcecode:: console
154 154
155   - $ cd cowebx/apps
  155 + $ cd cowebx/cowebx-apps
156 156 $ python setup.py deploy /desired/project/path --force
157 157
158   - .. note:: This command will overwrite any :file:`run_server` script that already exists in :file:`/desired/project/path/bin` (e.g., if you ran :file:`pycoweb` previously to seed an empty application in the virtualenv).
  158 + .. note:: This command will overwrite any :file:`run_server.py` script that already exists in :file:`/desired/project/path/bin` (e.g., if you ran :file:`pycoweb` previously to seed an empty application in the virtualenv).
159 159
160 160 #. Execute the generated coweb application container script to start the server.
161 161
199 servers/python/LICENSE
... ... @@ -0,0 +1,199 @@
  1 +The Open Cooperative Web Framework, herein referred to as OpenCoweb, is
  2 +available under *either* the terms of the modified BSD license *or* the
  3 +Academic Free License version 2.1. As a recipient of OpenCoweb, you may choose
  4 +which license to receive this code under (except as noted in per-module LICENSE
  5 +files). Some modules may not be the copyright of the Dojo Foundation. These
  6 +modules contain explicit declarations of copyright in both the LICENSE files in
  7 +the directories in which they reside and in the code itself. No external
  8 +contributions are allowed under licenses which are fundamentally incompatible
  9 +with the AFL or BSD licenses that OpenCoweb is distributed under.
  10 +
  11 +The Program may include third party code that is not covered under the
  12 +OpenCoweb License. These third party dependencies can be found in the Program's
  13 +NOTICES file.
  14 +
  15 +The text of the AFL and BSD licenses is reproduced below.
  16 +
  17 +-------------------------------------------------------------------------------
  18 +The "New" BSD License:
  19 +**********************
  20 +
  21 +Copyright (c) 2011 The Dojo Foundation. All rights reserved.
  22 +
  23 +Redistribution and use in source and binary forms, with or without
  24 +modification, are permitted provided that the following conditions are met:
  25 +
  26 + * Redistributions of source code must retain the above copyright notice, this
  27 + list of conditions and the following disclaimer.
  28 + * Redistributions in binary form must reproduce the above copyright notice,
  29 + this list of conditions and the following disclaimer in the documentation
  30 + and/or other materials provided with the distribution.
  31 + * Neither the name of the Dojo Foundation nor the names of its contributors
  32 + may be used to endorse or promote products derived from this software
  33 + without specific prior written permission.
  34 +
  35 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  36 +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  37 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  38 +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  39 +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  40 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  41 +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  42 +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  43 +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  44 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  45 +
  46 +-------------------------------------------------------------------------------
  47 +The Academic Free License, v. 2.1:
  48 +**********************************
  49 +
  50 +This Academic Free License (the "License") applies to any original work of
  51 +authorship (the "Original Work") whose owner (the "Licensor") has placed the
  52 +following notice immediately following the copyright notice for the Original
  53 +Work:
  54 +
  55 +Licensed under the Academic Free License version 2.1
  56 +
  57 +1) Grant of Copyright License. Licensor hereby grants You a world-wide,
  58 +royalty-free, non-exclusive, perpetual, sublicenseable license to do the
  59 +following:
  60 +
  61 +a) to reproduce the Original Work in copies;
  62 +
  63 +b) to prepare derivative works ("Derivative Works") based upon the Original
  64 +Work;
  65 +
  66 +c) to distribute copies of the Original Work and Derivative Works to the
  67 +public;
  68 +
  69 +d) to perform the Original Work publicly; and
  70 +
  71 +e) to display the Original Work publicly.
  72 +
  73 +2) Grant of Patent License. Licensor hereby grants You a world-wide,
  74 +royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
  75 +claims owned or controlled by the Licensor that are embodied in the Original
  76 +Work as furnished by the Licensor, to make, use, sell and offer for sale the
  77 +Original Work and Derivative Works.
  78 +
  79 +3) Grant of Source Code License. The term "Source Code" means the preferred
  80 +form of the Original Work for making modifications to it and all available
  81 +documentation describing how to modify the Original Work. Licensor hereby
  82 +agrees to provide a machine-readable copy of the Source Code of the Original
  83 +Work along with each copy of the Original Work that Licensor distributes.
  84 +Licensor reserves the right to satisfy this obligation by placing a
  85 +machine-readable copy of the Source Code in an information repository
  86 +reasonably calculated to permit inexpensive and convenient access by You for as
  87 +long as Licensor continues to distribute the Original Work, and by publishing
  88 +the address of that information repository in a notice immediately following
  89 +the copyright notice that applies to the Original Work.
  90 +
  91 +4) Exclusions From License Grant. Neither the names of Licensor, nor the names
  92 +of any contributors to the Original Work, nor any of their trademarks or
  93 +service marks, may be used to endorse or promote products derived from this
  94 +Original Work without express prior written permission of the Licensor. Nothing
  95 +in this License shall be deemed to grant any rights to trademarks, copyrights,
  96 +patents, trade secrets or any other intellectual property of Licensor except as
  97 +expressly stated herein. No patent license is granted to make, use, sell or
  98 +offer to sell embodiments of any patent claims other than the licensed claims
  99 +defined in Section 2. No right is granted to the trademarks of Licensor even if
  100 +such marks are included in the Original Work. Nothing in this License shall be
  101 +interpreted to prohibit Licensor from licensing under different terms from this
  102 +License any Original Work that Licensor otherwise would have a right to
  103 +license.
  104 +
  105 +5) This section intentionally omitted.
  106 +
  107 +6) Attribution Rights. You must retain, in the Source Code of any Derivative
  108 +Works that You create, all copyright, patent or trademark notices from the
  109 +Source Code of the Original Work, as well as any notices of licensing and any
  110 +descriptive text identified therein as an "Attribution Notice." You must cause
  111 +the Source Code for any Derivative Works that You create to carry a prominent
  112 +Attribution Notice reasonably calculated to inform recipients that You have
  113 +modified the Original Work.
  114 +
  115 +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
  116 +the copyright in and to the Original Work and the patent rights granted herein
  117 +by Licensor are owned by the Licensor or are sublicensed to You under the terms
  118 +of this License with the permission of the contributor(s) of those copyrights
  119 +and patent rights. Except as expressly stated in the immediately proceeding
  120 +sentence, the Original Work is provided under this License on an "AS IS" BASIS
  121 +and WITHOUT WARRANTY, either express or implied, including, without limitation,
  122 +the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
  123 +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
  124 +This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
  125 +license to Original Work is granted hereunder except under this disclaimer.
  126 +
  127 +8) Limitation of Liability. Under no circumstances and under no legal theory,
  128 +whether in tort (including negligence), contract, or otherwise, shall the
  129 +Licensor be liable to any person for any direct, indirect, special, incidental,
  130 +or consequential damages of any character arising as a result of this License
  131 +or the use of the Original Work including, without limitation, damages for loss
  132 +of goodwill, work stoppage, computer failure or malfunction, or any and all
  133 +other commercial damages or losses. This limitation of liability shall not
  134 +apply to liability for death or personal injury resulting from Licensor's
  135 +negligence to the extent applicable law prohibits such limitation. Some
  136 +jurisdictions do not allow the exclusion or limitation of incidental or
  137 +consequential damages, so this exclusion and limitation may not apply to You.
  138 +
  139 +9) Acceptance and Termination. If You distribute copies of the Original Work or
  140 +a Derivative Work, You must make a reasonable effort under the circumstances to
  141 +obtain the express assent of recipients to the terms of this License. Nothing
  142 +else but this License (or another written agreement between Licensor and You)
  143 +grants You permission to create Derivative Works based upon the Original Work
  144 +or to exercise any of the rights granted in Section 1 herein, and any attempt
  145 +to do so except under the terms of this License (or another written agreement
  146 +between Licensor and You) is expressly prohibited by U.S. copyright law, the
  147 +equivalent laws of other countries, and by international treaty. Therefore, by
  148 +exercising any of the rights granted to You in Section 1 herein, You indicate
  149 +Your acceptance of this License and all of its terms and conditions.
  150 +
  151 +10) Termination for Patent Action. This License shall terminate automatically
  152 +and You may no longer exercise any of the rights granted to You by this License
  153 +as of the date You commence an action, including a cross-claim or counterclaim,
  154 +against Licensor or any licensee alleging that the Original Work infringes a
  155 +patent. This termination provision shall not apply for an action alleging
  156 +patent infringement by combinations of the Original Work with other software or
  157 +hardware.
  158 +
  159 +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
  160 +License may be brought only in the courts of a jurisdiction wherein the
  161 +Licensor resides or in which Licensor conducts its primary business, and under
  162 +the laws of that jurisdiction excluding its conflict-of-law provisions. The
  163 +application of the United Nations Convention on Contracts for the International
  164 +Sale of Goods is expressly excluded. Any use of the Original Work outside the
  165 +scope of this License or after its termination shall be subject to the
  166 +requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
  167 +seq., the equivalent laws of other countries, and international treaty. This
  168 +section shall survive the termination of this License.
  169 +
  170 +12) Attorneys Fees. In any action to enforce the terms of this License or
  171 +seeking damages relating thereto, the prevailing party shall be entitled to
  172 +recover its costs and expenses, including, without limitation, reasonable
  173 +attorneys' fees and costs incurred in connection with such action, including
  174 +any appeal of such action. This section shall survive the termination of this
  175 +License.
  176 +
  177 +13) Miscellaneous. This License represents the complete agreement concerning
  178 +the subject matter hereof. If any provision of this License is held to be
  179 +unenforceable, such provision shall be reformed only to the extent necessary to
  180 +make it enforceable.
  181 +
  182 +14) Definition of "You" in This License. "You" throughout this License, whether
  183 +in upper or lower case, means an individual or a legal entity exercising rights
  184 +under, and complying with all of the terms of, this License. For legal
  185 +entities, "You" includes any entity that controls, is controlled by, or is
  186 +under common control with you. For purposes of this definition, "control" means
  187 +(i) the power, direct or indirect, to cause the direction or management of such
  188 +entity, whether by contract or otherwise, or (ii) ownership of fifty percent
  189 +(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
  190 +entity.
  191 +
  192 +15) Right to Use. You may use the Original Work in all ways not otherwise
  193 +restricted or conditioned by this License or by law, and Licensor promises not
  194 +to interfere with or be responsible for such uses by You.
  195 +
  196 +This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
  197 +Permission is hereby granted to copy and distribute this license without
  198 +modification. This license may not be modified without the express written
  199 +permission of its copyright owner.
6 servers/python/MANIFEST.in
... ... @@ -0,0 +1,6 @@
  1 +include README
  2 +include LICENSE
  3 +include NOTICES
  4 +include pycoweb
  5 +recursive-include coweb *.py *.tmpl
  6 +recursive-include js *
51 servers/python/NOTICES
... ... @@ -0,0 +1,51 @@
  1 +NOTICES AND INFORMATION
  2 +=======================
  3 +
  4 +OpenCoweb
  5 +
  6 +The Open Cooperative Web Framework, herein referred to as OpenCoweb, license
  7 +agreement and any applicable information on the web download page for OpenCoweb
  8 +products refers Licensee to this file for details concerning notices applicable
  9 +to code included in the products listed above ("the Program").
  10 +
  11 +Packaged builds of the Program located in coweb/js/release include the
  12 +following third-party code that is not covered under the OpenCoweb License:
  13 +
  14 +- OpenAjax Hub
  15 +- CometD
  16 +- RequireJS
  17 +
  18 +The copyright and licenses of these third-party products are reproduced below.
  19 +
  20 +*******************************************************************************
  21 +
  22 +OpenAjax Hub 1.0
  23 +
  24 +Copyright (c) 2006-2008 OpenAjax Alliance
  25 +
  26 +Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  27 +this file except in compliance with the License. You may obtain a copy of the
  28 +License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by
  29 +applicable law or agreed to in writing, software distributed under the License
  30 +is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  31 +KIND, either express or implied. See the License for the specific language
  32 +governing permissions and limitations under the License.
  33 +
  34 +*******************************************************************************
  35 +
  36 +cometD 2.1.0 (cometd-javascript common)
  37 +
  38 +Copyright (c) 2005-2011 The Dojo Foundation. All rights reserved.
  39 +
  40 +Dual licensed under the Apache License 2.0 at
  41 +http://www.apache.org/licenses/LICENSE-2.0 and the MIT license at
  42 +http://www.opensource.org/licenses/mit-license.php.
  43 +
  44 +*******************************************************************************
  45 +
  46 +RequireJS 0.23.0
  47 +
  48 +Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
  49 +
  50 +Available via the MIT new BSD license at
  51 +https://github.com/jrburke/requirejs/blob/0.23.0/LICENSE.
2  servers/python/README.txt → servers/python/README
@@ -9,7 +9,7 @@ To install the coweb server dependencies and minified coweb JavaScript into a vi
9 9 # activate it
10 10 source /some/path/bin/activate
11 11 # use pip to install coweb package and dependencies
12   - pip install -r requirements.txt
  12 + pip install .
13 13 # deploy a coweb server container and js libs
14 14 pycoweb deploy /some/path
15 15 # start the server
2  servers/python/requirements.txt
... ... @@ -1,2 +0,0 @@
1   -.
2   -tornado>=1.1
30 servers/python/setup.py
@@ -6,14 +6,28 @@
6 6 Copyright (c) IBM Corporation 2008, 2011. All Rights Reserved.
7 7 '''
8 8 from distutils.core import setup
  9 +import sys
9 10 import os
10 11
11 12 VERSION = '0.4'
12 13
  14 +isSDist = len(sys.argv) > 1 and sys.argv[1] == 'sdist'
  15 +srcDir = os.path.join(os.environ['PWD'], '../../js/release/coweb-%s' % VERSION)
  16 +if os.path.isdir('js') or os.path.islink('js'):
  17 + srcDir = 'js'
  18 +elif os.path.isdir(srcDir):
  19 + if isSDist:
  20 + try:
  21 + os.symlink(srcDir, 'js')
  22 + except OSError:
  23 + pass
  24 + srcDir = 'js'
  25 +else:
  26 + raise RuntimeError('missing: js framework release v%s' % VERSION)
  27 +
13 28 # collect js release as data files
14 29 cowebJSFiles = []
15 30 shareDir = 'share/coweb/js/coweb-%s' % VERSION
16   -srcDir = os.path.join(os.environ['PWD'], '../../js/release/coweb-%s' % VERSION)
17 31 for d, sd, fs in os.walk(srcDir):
18 32 for fn in fs:
19 33 sd = d[len(srcDir)+1:]
@@ -26,8 +40,9 @@
26 40 setup(name='OpenCoweb',
27 41 version=VERSION,
28 42 description='Tornado-based Python server for the Open Cooperative Web Framework',
29   - url='http://github.com/opencoweb',
  43 + url='http://opencoweb.org',
30 44 license='New BSD License / Academic Free License',
  45 + maintainer='Dojo Foundation',
31 46 packages=[
32 47 'coweb',
33 48 'coweb.access',
@@ -50,5 +65,12 @@
50 65 'templates/*.html'
51 66 ]
52 67 },
53   - scripts=['pycoweb']
54   -)
  68 + scripts=['pycoweb'],
  69 + install_requires=['tornado>=1.1'],
  70 +)
  71 +
  72 +if isSDist:
  73 + try:
  74 + os.remove('js')
  75 + except OSError:
  76 + pass

0 comments on commit 2df148e

Please sign in to comment.
Something went wrong with that request. Please try again.