From 2d13bd505fb7d1a6d2a3e33daf8c06fa4a51243d Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Wed, 16 May 2012 12:09:41 +0200 Subject: [PATCH 1/4] Modified install script for Python 3 compatibility. Requires one of the Python 3 capable forks of suds. --- libleipzig/__init__.py | 2 +- setup.py | 41 +++++++++++++++++++++++++++++++---------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/libleipzig/__init__.py b/libleipzig/__init__.py index 49b2245..6498ea0 100644 --- a/libleipzig/__init__.py +++ b/libleipzig/__init__.py @@ -4,4 +4,4 @@ from libleipzig.transport import services from suds import WebFault -__all__ = services.keys() + ['WebFault'] +__all__ = list(services.keys()) + ['WebFault'] diff --git a/setup.py b/setup.py index c8e3cdf..08a15b8 100644 --- a/setup.py +++ b/setup.py @@ -1,29 +1,50 @@ # Copyright (C) 2009, 2010 Robert Lehmann +# Python 3 support via 2to3 added by Phillip Alday from setuptools import setup import os.path setup(name='libleipzig', - version='1.3', - description="wortschatz.uni-leipzig.de binding", + version='1.4', + description='wortschatz.uni-leipzig.de binding', long_description=open(os.path.join(os.path.dirname(__file__), - "README.rst")).read(), - url="http://github.com/lehmannro/libleipzig-python/", + 'README.rst')).read(), + url='http://github.com/palday/libleipzig-python/', + setup_requires=['distribute'], install_requires = ['suds'], tests_require = ['nose'], - test_suite = "nose.collector", - author="Robert Lehmann", - author_email="libleipzig@robertlehmann.de", - license="GPLv3", + test_suite = 'nose.collector', + author='Robert Lehmann', + author_email='libleipzig@robertlehmann.de', + maintainer='Phillip Alday', + maintainer_email='phillip.alday@staff.uni-marburg.de', + license='GPLv3', packages=['libleipzig', 'libleipzig.test'], - package_dir={'libleipzig.test': "tests"}, - package_data={'libleipzig': ["README.rst", "manual.html"]}, + package_dir={'libleipzig.test': 'tests'}, + package_data={'libleipzig': ['README.rst', 'manual.html']}, entry_points={'console_scripts': ['wortschatz = libleipzig.main:main']}, zip_safe=True, + use_2to3 = True, classifiers=[ + 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Natural Language :: German', 'Topic :: Text Processing :: Linguistic', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.4', + 'Programming Language :: Python :: 2.5', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.0', + 'Programming Language :: Python :: 3.1', + 'Programming Language :: Python :: 3.2', ], + + # PEP-314 states that if possible license & plaform should be specified + # using 'classifiers'. + platforms=['(specified using classifiers)'], ) From d00b3c015bb3e7cbc2ec7411c53c3bd6d7fb5ba6 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Wed, 16 May 2012 12:19:54 +0200 Subject: [PATCH 2/4] Added .hgignore (hg-git doesn't appear to be reading .gitignore). --- .hgignore | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .hgignore diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..944b63d --- /dev/null +++ b/.hgignore @@ -0,0 +1,12 @@ +syntax: glob + +MANIFEST +build/ +dist/ +libleipzig.egg-info/ +nose-*.egg/ +suds-*.egg/ +manual.html +.test/ +pip-log.txt +*.pyc From 945f90d40e7bb82e12cee5263a4423b24ff82f9f Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Wed, 16 May 2012 12:38:50 +0200 Subject: [PATCH 3/4] Updated readme --- README.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f2fb990..315ce65 100644 --- a/README.rst +++ b/README.rst @@ -42,6 +42,8 @@ Baseform(*vectors, **options) .. ** +In Python 3, you omit the unicode prefixes. Python 3 is recommended for better support of extended Latin and other alphabets. + Dependencies ------------ @@ -49,9 +51,14 @@ Dependencies - Setuptools_ - suds_ 0.3.9 or later +- Python 3.0 or later +- Distribute_ +- suds_ 0.4.2 or later + .. _Setuptools: http://packages.python.org/distribute/ .. _suds: https://fedorahosted.org/suds/#Resources - +.. _Distribute: http://packages.python.org/distribute/ +.. _suds: https://bitbucket.org/palday/suds Service calls ------------- @@ -161,6 +168,11 @@ program will terminate with exit code 1. If the remote server reported failure Changelog --------- +1.4 + * Added support for Python 3. + * Now requires suds 0.4.2 or later for Python 3. + * Moved to distribute (Python 3 capable fork of setuptools). + * Updated various classifiers and tags for distribute. 1.3 * Added commandline script ``wortschatz`` for ad-hoc access. From b04decd303f65e01afec31e1a300653e09d0bf8a Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Wed, 16 May 2012 12:45:51 +0200 Subject: [PATCH 4/4] Fixed formatting in updated readme --- README.rst | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 315ce65..8acdfe4 100644 --- a/README.rst +++ b/README.rst @@ -46,19 +46,21 @@ In Python 3, you omit the unicode prefixes. Python 3 is recommended for better s Dependencies ------------ +- Python 2: + * Python 2.5 or later releases + * Setuptools_ + * `suds 0.3.9`_ or later -- Python 2.5 or later 2.x releases -- Setuptools_ -- suds_ 0.3.9 or later - -- Python 3.0 or later -- Distribute_ -- suds_ 0.4.2 or later +- Python 3: + * Python 3.0 or later + * Distribute_ + * `suds 0.4.2`_ or later .. _Setuptools: http://packages.python.org/distribute/ -.. _suds: https://fedorahosted.org/suds/#Resources +.. _suds 0.3.9: https://fedorahosted.org/suds/#Resources .. _Distribute: http://packages.python.org/distribute/ -.. _suds: https://bitbucket.org/palday/suds +.. _suds 0.4.2: https://bitbucket.org/palday/suds + Service calls -------------