~geser/launchpadlib/toc

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-03-23 21:50:35 UTC
  • mfrom: (36.1.6 launchpadlib)
  • Revision ID: launchpad@pqm.canonical.com-20090323215035-tda8p74bhhb61mft
MergeĀ fromĀ lp:~gary/launchpadlib/buildout

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
 
# Copyright 2008 Canonical Ltd.
3
2
 
 
3
# Copyright 2008-2009 Canonical Ltd.
 
4
#
4
5
# This file is part of launchpadlib.
5
6
#
6
 
# launchpadlib is free software: you can redistribute it and/or modify
7
 
# it under the terms of the GNU Lesser General Public License as
8
 
# published by the Free Software Foundation, either version 3 of the
9
 
# License, or (at your option) any later version.
10
 
#
11
 
# launchpadlib is distributed in the hope that it will be useful, but
12
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 
# Lesser General Public License for more details.
15
 
#
16
 
# You should have received a copy of the GNU Lesser General Public
17
 
# License along with launchpadlib.  If not, see
18
 
# <http://www.gnu.org/licenses/>.
 
7
# launchpadlib is free software: you can redistribute it and/or modify it
 
8
# under the terms of the GNU Lesser General Public License as published by the
 
9
# Free Software Foundation, version 3 of the License.
 
10
#
 
11
# launchpadlib is distributed in the hope that it will be useful, but WITHOUT
 
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
13
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 
14
# for more details.
 
15
#
 
16
# You should have received a copy of the GNU Lesser General Public License
 
17
# along with launchpadlib. If not, see <http://www.gnu.org/licenses/>.
19
18
 
20
19
"""Setup for the launchpadlib library."""
21
20
 
22
21
import ez_setup
23
22
ez_setup.use_setuptools()
24
23
 
 
24
import sys
25
25
from setuptools import setup, find_packages
 
26
 
 
27
# generic helpers primarily for the long_description
 
28
def generate(*docname_or_string):
 
29
    res = []
 
30
    for value in docname_or_string:
 
31
        if value.endswith('.txt'):
 
32
            f = open(value)
 
33
            value = f.read()
 
34
            f.close()
 
35
        res.append(value)
 
36
        if not value.endswith('\n'):
 
37
            res.append('')
 
38
    return '\n'.join(res)
 
39
# end generic helpers
 
40
 
 
41
sys.path.insert(0, 'src')
26
42
from launchpadlib import __version__
27
43
 
28
 
 
29
44
setup(
30
 
    name        = 'launchpadlib',
31
 
    version     = __version__,
32
 
    description = """\
33
 
launchpadlib is a client-side library for scripting Launchpad through its web
34
 
services interface.  Launchpad <http://launchpad.net> is a a free software
35
 
hosting and development website, making it easy to collaborate across multiple
36
 
projects.""",
37
 
    author      = 'The Launchpad developers',
38
 
    author_email= 'launchpadlib@lists.launchpad.net',
39
 
    url         = 'https://help.launchpad.net/API/launchpadlib',
40
 
    license     = 'GNU LGPLv3 or later',
 
45
    name='launchpadlib',
 
46
    version=__version__,
 
47
    packages=find_packages('src'),
 
48
    package_dir={'':'src'},
 
49
    include_package_data=True,
 
50
    zip_safe=False,
 
51
    author='The Launchpad developers',
 
52
    author_email='launchpadlib@lists.launchpad.net',
 
53
    maintainer='LAZR Developers',
 
54
    maintainer_email='lazr-developers@lists.launchpad.net',
41
55
    download_url= 'https://launchpad.net/launchpadlib/+download',
42
 
    packages    = find_packages(),
43
 
    include_package_data = True,
44
 
    zip_safe    = True,
45
 
    install_requires = [
 
56
    description=open('README.txt').readline().strip(),
 
57
    long_description=generate(
 
58
        'src/launchpadlib/README.txt',
 
59
        'src/launchpadlib/NEWS.txt'),
 
60
    license='LGPL v3',
 
61
    install_requires=[
46
62
        'httplib2',
 
63
        'lazr.uri',
 
64
        'oauth',
 
65
        'setuptools',
47
66
        'simplejson',
 
67
        'wadllib',
48
68
        ],
49
 
    setup_requires = [
50
 
        'setuptools_bzr',
51
 
        ]
 
69
    url='https://help.launchpad.net/API/launchpadlib',
 
70
    classifiers=[
 
71
        "Development Status :: 5 - Production/Stable",
 
72
        "Intended Audience :: Developers",
 
73
        "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
 
74
        "Operating System :: OS Independent",
 
75
        "Programming Language :: Python"],
 
76
    setup_requires=['eggtestinfo', 'setuptools_bzr'],
 
77
    # test_suite='launchpadlib.tests.test_suite',
52
78
    )