~cjwatson/lazr.restful/django-zope-compatibility

23.1.8 by Gary Poster
make setup.py executable
1
#!/usr/bin/env python
2
1 by Barry Warsaw
Initial package template for lazr packages.
3
# Copyright 2009 Canonical Ltd.  All rights reserved.
4
#
24 by Leonard Richardson
Initial preparation.
5
# This file is part of lazr.restful
1 by Barry Warsaw
Initial package template for lazr packages.
6
#
24 by Leonard Richardson
Initial preparation.
7
# lazr.restful is free software: you can redistribute it and/or modify it
1 by Barry Warsaw
Initial package template for lazr packages.
8
# under the terms of the GNU Lesser General Public License as published by
23.1.16 by Gary Poster
Remove "or later" from licensing; add some docstrings and make some whitespace cleanups.
9
# the Free Software Foundation, version 3 of the License.
1 by Barry Warsaw
Initial package template for lazr packages.
10
#
24 by Leonard Richardson
Initial preparation.
11
# lazr.restful is distributed in the hope that it will be useful, but WITHOUT
1 by Barry Warsaw
Initial package template for lazr packages.
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14
# License for more details.
15
#
16
# You should have received a copy of the GNU Lesser General Public License
24 by Leonard Richardson
Initial preparation.
17
# along with lazr.restful.  If not, see <http://www.gnu.org/licenses/>.
1 by Barry Warsaw
Initial package template for lazr packages.
18
23.1.7 by Gary Poster
use use_setuptools
19
import ez_setup
20
ez_setup.use_setuptools()
21
1 by Barry Warsaw
Initial package template for lazr packages.
22
from setuptools import setup, find_packages
23
24
# generic helpers primarily for the long_description
25
def generate(*docname_or_string):
26
    res = []
27
    for value in docname_or_string:
28
        if value.endswith('.txt'):
29
            f = open(value)
34.2.1 by Gary Poster
possible way to get pypi happy with reasonable docs.
30
            value = f.read().split('..\n    end-pypi', 1)[0]
1 by Barry Warsaw
Initial package template for lazr packages.
31
            f.close()
32
        res.append(value)
33
        if not value.endswith('\n'):
34
            res.append('')
35
    return '\n'.join(res)
36
# end generic helpers
37
42.1.4 by Leonard Richardson
First attempt at not hacking sys.path.
38
__version__ = open("src/lazr/restful/version.txt").read().strip()
1 by Barry Warsaw
Initial package template for lazr packages.
39
40
setup(
24 by Leonard Richardson
Initial preparation.
41
    name='lazr.restful',
7 by Barry Warsaw
A few more updates, prepping for push to LP.
42
    version=__version__,
1 by Barry Warsaw
Initial package template for lazr packages.
43
    namespace_packages=['lazr'],
44
    packages=find_packages('src'),
45
    package_dir={'':'src'},
46
    include_package_data=True,
47
    zip_safe=False,
48
    maintainer='LAZR Developers',
49
    maintainer_email='lazr-developers@lists.launchpad.net',
50
    description=open('README.txt').readline().strip(),
51
    long_description=generate(
24 by Leonard Richardson
Initial preparation.
52
        'src/lazr/restful/README.txt',
53
        'src/lazr/restful/NEWS.txt'),
23.1.14 by Gary Poster
only LGPL v3, not later
54
    license='LGPL v3',
1 by Barry Warsaw
Initial package template for lazr packages.
55
    install_requires=[
216.1.1 by Colin Watson
Fix compatibility with docutils >= 0.8 under "zope.testrunner --subunit".
56
        'docutils>=0.3.7',
24.2.8 by Gary Poster
significantly reduce dependencies
57
        'epydoc', # used by wadl generation
66.2.2 by Leonard Richardson
First stab at an implementation.
58
        'grokcore.component==1.6',
134.3.23 by Benji York
be willing to use the -dev version of lazr.batchnavigator 1.2.0
59
        'lazr.batchnavigator>=1.2.0-dev',
212 by Colin Watson
Switch zope.interface, zope.component, and lazr.delegates users from class advice to class decorators.
60
        'lazr.delegates>=2.0.3',
24.1.2 by Gary Poster
a broken but "complete" commit of the first draft. names are all changed, setup.py and buildout.cfg are on the right track hopefully, and we have all the files we need, to the best of mu knowledge. Only a couple of docs have been converted to ReST, and there is no intro doc.
61
        'lazr.enum',
24.1.3 by Gary Poster
closer to working
62
        'lazr.lifecycle',
24.1.4 by Gary Poster
progress...
63
        'lazr.uri',
66.2.2 by Leonard Richardson
First stab at an implementation.
64
        'martian==0.11',
153 by Benji York
add missing dependency
65
        'pytz',
1 by Barry Warsaw
Initial package template for lazr packages.
66
        'setuptools',
187.1.1 by William Grant
Upgrade to simplejson 2.1.3, with JSONEncoderForHTML support.
67
        'simplejson>=2.1.0',
184.2.13 by Ian Booth
Merge trunk and fix an import
68
        'testtools',
24.2.8 by Gary Poster
significantly reduce dependencies
69
        'van.testing',
80.1.1 by Leonard Richardson
Made wsgiref an external dependency.
70
        'wsgiref',
25.1.7 by Leonard Richardson
Copied over Gary's setup.py.
71
        'zope.app.pagetemplate',
72
        'zope.component [zcml]',
73
        'zope.configuration',
24.1.2 by Gary Poster
a broken but "complete" commit of the first draft. names are all changed, setup.py and buildout.cfg are on the right track hopefully, and we have all the files we need, to the best of mu knowledge. Only a couple of docs have been converted to ReST, and there is no intro doc.
74
        'zope.event',
212 by Colin Watson
Switch zope.interface, zope.component, and lazr.delegates users from class advice to class decorators.
75
        'zope.interface>=3.6.0',
24.1.2 by Gary Poster
a broken but "complete" commit of the first draft. names are all changed, setup.py and buildout.cfg are on the right track hopefully, and we have all the files we need, to the best of mu knowledge. Only a couple of docs have been converted to ReST, and there is no intro doc.
76
        'zope.pagetemplate',
184.1.2 by Leonard Richardson
Trying to make the sanity check run last.
77
        'zope.processlifetime',
24.1.2 by Gary Poster
a broken but "complete" commit of the first draft. names are all changed, setup.py and buildout.cfg are on the right track hopefully, and we have all the files we need, to the best of mu knowledge. Only a couple of docs have been converted to ReST, and there is no intro doc.
78
        'zope.proxy',
79
        'zope.publisher',
80
        'zope.schema',
81
        'zope.security',
82
        'zope.traversing',
1 by Barry Warsaw
Initial package template for lazr packages.
83
        ],
24 by Leonard Richardson
Initial preparation.
84
    url='https://launchpad.net/lazr.restful',
24.1.1 by Gary Poster
changes to catch up with most recent versions of lazr.yourpkg patterns
85
    download_url= 'https://launchpad.net/lazr.restful/+download',
1 by Barry Warsaw
Initial package template for lazr packages.
86
    classifiers=[
87
        "Development Status :: 5 - Production/Stable",
88
        "Intended Audience :: Developers",
89
        "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
90
        "Operating System :: OS Independent",
91
        "Programming Language :: Python"],
23.1.12 by Gary Poster
move to tests directory, meaningful README.txt, initially empty docs directory, pkg_resources, `additional_tests` for the setuptools test runner, and Sphinx.
92
    extras_require=dict(
93
        docs=['Sphinx',
24.2.8 by Gary Poster
significantly reduce dependencies
94
              'z3c.recipe.sphinxdoc'],
95
        xml=['lxml',] # requiring this of normal users is too much
23.1.12 by Gary Poster
move to tests directory, meaningful README.txt, initially empty docs directory, pkg_resources, `additional_tests` for the setuptools test runner, and Sphinx.
96
    ),
40.4.1 by James Westby
Fix a remaining template variable
97
    test_suite='lazr.restful.tests',
1 by Barry Warsaw
Initial package template for lazr packages.
98
    )