# HG changeset patch # User Peter Sanchez # Date 1541020028 25200 # Wed Oct 31 14:07:08 2018 -0700 # Node ID 5d2d311e264f3487a016b794f63e76acc57e2aa2 # Parent 4eef7e014a5263766fb6c7372ea0bbf952544ec8 Moving files around diff --git a/BSD-LICENSE b/BSD-LICENSE new file mode 100644 --- /dev/null +++ b/BSD-LICENSE @@ -0,0 +1,32 @@ +Copyright (c) 2009, Peter Sanchez +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. diff --git a/LICENSE b/LICENSE deleted file mode 100644 --- a/LICENSE +++ /dev/null @@ -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. diff --git a/MANIFEST.in b/MANIFEST.in --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ -include LICENSE -include README +include BSD-LICENSE +include README.rst recursive-include examples * diff --git a/README b/README.rst rename from README rename to README.rst diff --git a/djeploy/__init__.py b/djeploy/__init__.py --- a/djeploy/__init__.py +++ b/djeploy/__init__.py @@ -3,10 +3,32 @@ 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 = { diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -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 @@ 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', + 'Programming Language :: Python :: 2.7', 'Environment :: Web Environment', ], + include_package_data=True, )