~cjwatson/lazr.restful/exported-interfaces-honour-all

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Barry Warsaw
  • Date: 2009-01-08 18:44:42 UTC
  • Revision ID: barry@python.org-20090108184442-x7vjj4iysajm0ipp
Initial package template for lazr packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2009 Canonical Ltd.  All rights reserved.
 
2
#
 
3
# This file is part of lazr.yourpkg
 
4
#
 
5
# lazr.config is free software: you can redistribute it and/or modify it
 
6
# under the terms of the GNU Lesser General Public License as published by
 
7
# the Free Software Foundation, either version 3 of the License, or (at your
 
8
# option) any later version.
 
9
#
 
10
# lazr.config is distributed in the hope that it will be useful, but WITHOUT
 
11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 
13
# License for more details.
 
14
#
 
15
# You should have received a copy of the GNU Lesser General Public License
 
16
# along with lazr.config.  If not, see <http://www.gnu.org/licenses/>.
 
17
 
 
18
from setuptools import setup, find_packages
 
19
 
 
20
# generic helpers primarily for the long_description
 
21
def generate(*docname_or_string):
 
22
    res = []
 
23
    for value in docname_or_string:
 
24
        if value.endswith('.txt'):
 
25
            f = open(value)
 
26
            value = f.read()
 
27
            f.close()
 
28
        res.append(value)
 
29
        if not value.endswith('\n'):
 
30
            res.append('')
 
31
    return '\n'.join(res)
 
32
# end generic helpers
 
33
 
 
34
from lazr.yourpkg import __version__
 
35
 
 
36
setup(
 
37
    name='lazr.yourpkg',
 
38
    version='1.1',
 
39
    namespace_packages=['lazr'],
 
40
    packages=find_packages('src'),
 
41
    package_dir={'':'src'},
 
42
    include_package_data=True,
 
43
    zip_safe=False,
 
44
    maintainer='LAZR Developers',
 
45
    maintainer_email='lazr-developers@lists.launchpad.net',
 
46
    description=open('README.txt').readline().strip(),
 
47
    long_description=generate(
 
48
        'src/lazr/yourpkg/README.txt',
 
49
        'src/lazr/yourpkg/NEWS.txt'),
 
50
    license='LGPL v3',
 
51
    install_requires=[
 
52
        'setuptools',
 
53
        'zope.interface',
 
54
        ],
 
55
    url='https://launchpad.net/lazr.yourpkg',
 
56
    classifiers=[
 
57
        "Development Status :: 5 - Production/Stable",
 
58
        "Intended Audience :: Developers",
 
59
        "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
 
60
        "Operating System :: OS Independent",
 
61
        "Programming Language :: Python"],
 
62
    )