Moving files around
6 files changed, 68 insertions(+), 56 deletions(-)

A => BSD-LICENSE
R LICENSE => 
M MANIFEST.in
M README => README.rst
M djeploy/__init__.py
M setup.py
A => BSD-LICENSE +32 -0
@@ 0,0 1,32 @@ 
+Copyright (c) 2009, Peter Sanchez <petersanchez@gmail.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or 
+without modification, are permitted provided that the 
+following conditions are met:
+
+ * Redistributions of source code must retain the above 
+   copyright notice, this list of conditions and the 
+   following disclaimer.
+
+ * Redistributions in binary form must reproduce the above 
+   copyright notice, this list of conditions and the following 
+   disclaimer in the documentation and/or other materials 
+   provided with the distribution.
+
+ * Neither the name of Peter Sanchez nor the names of its 
+   contributors may be used to endorse or promote products 
+   derived from this software without specific prior written 
+   permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

          
R LICENSE =>  +0 -27
@@ 1,27 0,0 @@ 
-Copyright (c) Participatory Culture Foundation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    1. Redistributions of source code must retain the above copyright notice, 
-       this list of conditions and the following disclaimer.
-    
-    2. Redistributions in binary form must reproduce the above copyright 
-       notice, this list of conditions and the following disclaimer in the
-       documentation and/or other materials provided with the distribution.
-
-    3. Neither the name of the Participatory Culture Foundation nor the names
-       of its contributors may be used to endorse or promote products derived
-       from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

          
M MANIFEST.in +2 -2
@@ 1,3 1,3 @@ 
-include LICENSE
-include README
+include BSD-LICENSE
+include README.rst
 recursive-include examples *

          
M README => README.rst +0 -0

M djeploy/__init__.py +24 -2
@@ 3,10 3,32 @@ import json
 from fabric.api import env
 from .globals import set_env, djeploy_require, get_env, command
 
+__all__ = ['set_env', 'djeploy_require', 'get_env', 'command', 'DeployConfig']
 
-__version__ = '0.2.5-dev'
+name = 'djeploy'
+
+VERSION = (0, 2, 5, 'beta', 0)
+
+
+def get_version():
+    "Returns a PEP 386-compliant version number from VERSION."
+    assert len(VERSION) == 5
+    assert VERSION[3] in ('alpha', 'beta', 'rc', 'final')
 
-__all__ = ['set_env', 'djeploy_require', 'get_env', 'command', 'DeployConfig']
+    # Now build the two parts of the version number:
+    # main = X.Y[.Z]
+    # sub = .devN - for pre-alpha releases
+    #     | {a|b|c}N - for alpha, beta and rc releases
+
+    parts = 2 if VERSION[2] == 0 else 3
+    main = '.'.join(str(x) for x in VERSION[:parts])
+
+    sub = ''
+    if VERSION[3] != 'final':
+        mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
+        sub = mapping[VERSION[3]] + str(VERSION[4])
+
+    return str(main + sub)
 
 
 default_configs = {

          
M setup.py +10 -25
@@ 1,37 1,20 @@ 
 import os
-from distutils.core import setup
+from setuptools import setup, find_packages
 
 
 project_name = 'djeploy'
-long_description = open('README').read()
-
-# Idea from django-registration setup.py
-packages, data_files = [], []
-root_dir = os.path.dirname(__file__)
-if root_dir:
-    os.chdir(root_dir)
 
-for dirpath, dirnames, filenames in os.walk(project_name):
-    # Ignore dirnames that start with '.'
-    for i, dirname in enumerate(dirnames):
-        if dirname.startswith('.'):
-            del dirnames[i]
-    if '__init__.py' in filenames:
-        pkg = dirpath.replace(os.path.sep, '.')
-        if os.path.altsep:
-            pkg = pkg.replace(os.path.altsep, '.')
-        packages.append(pkg)
-    elif filenames:
-        prefix = dirpath[(len(project_name) + 1):]
-        for f in filenames:
-            data_files.append(os.path.join(prefix, f))
+if os.path.exists('README.rst'):
+    long_description = open('README.rst', 'r').read()
+else:
+    long_description = 'See https://bitbucket.org/petersanchez/djeploy/'
+
 
 setup(
     name=project_name,
-    version='0.2.5-dev',
+    version=__import__(project_name).get_version(),
     package_dir={project_name: project_name},
-    packages=packages,
-    package_data={project_name: data_files},
+    packages=find_packages(),
     description=\
         'Common tasks used to deploy Django powered websites via Fabric.',
     author='Peter Sanchez',

          
@@ 47,6 30,8 @@ setup(
         'Natural Language :: English',
         'Operating System :: OS Independent',
         'Programming Language :: Python',
+        'Programming Language :: Python :: 2.7',
         'Environment :: Web Environment',
     ],
+    include_package_data=True,
 )