| 1 | #!/usr/bin/python |
|---|
| 2 | # -*- coding: UTF-8 -*- |
|---|
| 3 | # |
|---|
| 4 | # Copyright (c) 2006 Tarek Ziadé <tarek@ziade.org> |
|---|
| 5 | # |
|---|
| 6 | # This program is free software; you can redistribute it and/or |
|---|
| 7 | # modify it under the terms of the GNU General Public License |
|---|
| 8 | # as published by the Free Software Foundation; either version 2 |
|---|
| 9 | # of the License, or (at your option) any later version. |
|---|
| 10 | # |
|---|
| 11 | # This program is distributed in the hope that it will be useful, |
|---|
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | # GNU General Public License for more details. |
|---|
| 15 | # |
|---|
| 16 | # You should have received a copy of the GNU General Public License |
|---|
| 17 | # along with this program; if not, write to the Free Software |
|---|
| 18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 19 | # $Id: $ |
|---|
| 20 | """Automatic website builder, using doctests and other reST files. |
|---|
| 21 | |
|---|
| 22 | PyCommunity builds an HTML tree out of Python packages, using reST files |
|---|
| 23 | and docstrings founded. |
|---|
| 24 | """ |
|---|
| 25 | import sys |
|---|
| 26 | import os |
|---|
| 27 | |
|---|
| 28 | classifiers = """\ |
|---|
| 29 | Development Status :: 3 - Alpha |
|---|
| 30 | Intended Audience :: Developers |
|---|
| 31 | License :: OSI Approved :: GNU General Public License (GPL) |
|---|
| 32 | Programming Language :: Python |
|---|
| 33 | Topic :: Software Development |
|---|
| 34 | Operating System :: Microsoft :: Windows |
|---|
| 35 | Operating System :: Unix |
|---|
| 36 | """ |
|---|
| 37 | from setuptools import setup |
|---|
| 38 | |
|---|
| 39 | if sys.version_info < (2, 3): |
|---|
| 40 | _setup = setup |
|---|
| 41 | def setup(**kwargs): |
|---|
| 42 | if kwargs.has_key("classifiers"): |
|---|
| 43 | del kwargs["classifiers"] |
|---|
| 44 | _setup(**kwargs) |
|---|
| 45 | |
|---|
| 46 | doclines = __doc__.split("\n") |
|---|
| 47 | |
|---|
| 48 | dirname = os.path.dirname(__file__) |
|---|
| 49 | if dirname == '': |
|---|
| 50 | dirname = '.' |
|---|
| 51 | |
|---|
| 52 | etc_dir = os.path.join(dirname, 'etc') |
|---|
| 53 | etc_files = [] |
|---|
| 54 | |
|---|
| 55 | for root, dir_, files in os.walk(etc_dir): |
|---|
| 56 | for file_ in files: |
|---|
| 57 | path = os.path.join(root, file_) |
|---|
| 58 | if not os.path.isfile(path): |
|---|
| 59 | continue |
|---|
| 60 | etc_files.append(path) |
|---|
| 61 | |
|---|
| 62 | url = "http://programmation-python.org/pycommunity" |
|---|
| 63 | |
|---|
| 64 | setup(name="PyCommunity", |
|---|
| 65 | version="0.1a", |
|---|
| 66 | maintainer="Tarek Ziade", |
|---|
| 67 | maintainer_email="tarek@ziade.org", |
|---|
| 68 | url = url, |
|---|
| 69 | #download_url = '%s/PyCommunity-0.1a-py2.5.egg' % url, |
|---|
| 70 | license = "http://www.gnu.org/copyleft/gpl.html", |
|---|
| 71 | platforms = ["any"], |
|---|
| 72 | description = doclines[0], |
|---|
| 73 | classifiers = filter(None, classifiers.split("\n")), |
|---|
| 74 | long_description = "\n".join(doclines[2:]), |
|---|
| 75 | scripts = ['pycy'], |
|---|
| 76 | packages = ['pycommunity'], |
|---|
| 77 | install_requires = ['cheesecake', 'cheetah', 'epydoc' , 'pygments'], |
|---|
| 78 | data_files = [('/etc/pycommunity', etc_files)]) |
|---|