app/gviz/setup.py
author James Levy <jamesalexanderlevy@gmail.com>
Sun, 28 Jun 2009 14:46:31 +0200
changeset 2435 dd16e9b3c2d0
parent 2373 05ab9393303d
permissions -rwxr-xr-x
Added View for Surveys. Patch by: James Levy, Daniel Diniz Reviewed by: to-be-reviewed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2373
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/python
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     2
#
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     3
# Copyright (C) 2009 Google Inc.
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     4
#
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     8
#
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
     9
#      http://www.apache.org/licenses/LICENSE-2.0
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    10
#
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    15
# limitations under the License.
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    16
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    17
"""Setup module for Google Visualization Python API."""
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    18
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    19
__author__ = "Misha Seltzer"
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    20
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    21
import distutils.core
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    22
import unittest
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    23
import gviz_api_test
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    24
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    25
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    26
class TestCommand(distutils.core.Command):
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    27
  """Class that provides the 'test' command for setup."""
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    28
  user_options = []
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    29
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    30
  def initialize_options(self):
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    31
    """Must override this method in the Command class."""
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    32
    pass
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    33
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    34
  def finalize_options(self):
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    35
    """Must override this method in the Command class."""
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    36
    pass
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    37
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    38
  def run(self):
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    39
    """The run method - running the tests on invocation."""
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    40
    suite = unittest.TestLoader().loadTestsFromTestCase(
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    41
        gviz_api_test.DataTableTest)
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    42
    unittest.TextTestRunner().run(suite)
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    43
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    44
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    45
distutils.core.setup(
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    46
    name="gviz_api.py",
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    47
    version="1.6",
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    48
    description="Python API for Google Visualization",
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    49
    long_description="""
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    50
The Python API for Google Visualization makes it easy to convert python data
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    51
structures into Google Visualization JS code, DataTable JSon construction
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    52
string or JSon response for Query object.
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    53
""".strip(),
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    54
    author="Amit Weinstein, Misha Seltzer",
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    55
    license="Apache 2.0",
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    56
    url="http://code.google.com/p/google-visualization-python/",
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    57
    py_modules=["gviz_api"],
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    58
    cmdclass={"test": TestCommand},
05ab9393303d Add google-visualization-python project to Melange repository.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    59
)