diff --git a/PYTHON_LICENSE.txt b/LICENSE.txt similarity index 100% rename from PYTHON_LICENSE.txt rename to LICENSE.txt diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..5a7f8fd --- /dev/null +++ b/README.txt @@ -0,0 +1,38 @@ +======================== +EditorConfig Python Core +======================== + +EditorConfig Python Core provides the same functionality as the +`EditorConfig C Core `_. +EditorConfig Python core can be used as a command line program or as an +importable library. + +Installation +============ + +With setuptools: + + sudo python setup.py install + +Getting Help +============ +For help with the EditorConfig core code, please write to our `mailing list `_. + +If you are writing a plugin a language that can import Python libraries, you may want to import and use the EditorConfig Python Core directly. + +Using as a Library +================== + +Example use of EditorConfig Python Core as a library: + + filename = "/home/zoidberg/myfile.txt" + conf_file = ".editorconfig" + handler = EditorConfigHandler(filename, conf_filename) + options = handler.get_configurations() + for key, value in options.items(): + print "%s=%s" % (key, value) + +License +======= + +Unless otherwise stated, all files are distributed under the PSF license. The odict library (editorconfig/odict.py) is distributed under the New BSD license. See LICENSE.txt file for details on PSF license. diff --git a/editorconfig/odict.py b/editorconfig/odict.py index 460b770..41ce074 100644 --- a/editorconfig/odict.py +++ b/editorconfig/odict.py @@ -3,17 +3,50 @@ # Copyright (C) 2005 Nicola Larosa, Michael Foord # E-mail: nico AT tekNico DOT net, fuzzyman AT voidspace DOT org DOT uk -# This software is licensed under the terms of the BSD license. -# http://www.voidspace.org.uk/python/license.shtml -# Basically you're free to copy, modify, distribute and relicense it, -# So long as you keep a copy of the license with it. - # Documentation at http://www.voidspace.org.uk/python/odict.html # For information about bugfixes, updates and support, please join the # Pythonutils mailing list: # http://groups.google.com/group/pythonutils/ # Comments, suggestions and bug reports welcome. +# This software is licensed under the terms of the BSD license. +# http://www.voidspace.org.uk/python/license.shtml +# Basically you're free to copy, modify, distribute and relicense it, +# So long as you keep a copy of the license with it. + +# Copyright (c) 2003-2010, Michael Foord +# All rights reserved. +# E-mail : fuzzyman AT voidspace DOT org DOT uk +# +# 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 Michael Foord nor the name of Voidspace +# 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. + """A dict that keeps keys in insertion order""" from __future__ import generators diff --git a/setup.py b/setup.py index 152f2fd..812f53b 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,9 @@ author='EditorConfig Team', packages=['editorconfig'], url='http://editorconfig.org/', + license='LICENSE.txt', + description='EditorConfig File Locator and Interpreter for Python', + long_description=open('README.txt').read(), entry_points = { 'console_scripts': [ 'editorconfig = editorconfig.main:main',