[Python-modules-commits] [utidylib] 08/16: Imported Upstream version 0.3
Michal Cihar
nijel at moszumanska.debian.org
Thu Jul 7 12:53:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
nijel pushed a commit to branch master
in repository utidylib.
commit 1b69e6220487f80248feb93862bf0daa674f86c7
Author: Michal Čihař <michal at cihar.com>
Date: Thu Jul 7 14:40:23 2016 +0200
Imported Upstream version 0.3
---
INSTALL.txt | 123 -------
LICENSE | 2 +
MANIFEST.in | 10 +-
PKG-INFO | 32 +-
README.path | 10 -
README.rst | 63 ++++
README.txt | 37 --
debian/.git-dpm | 11 -
debian/README.Debian | 19 --
debian/README.source | 16 -
debian/changelog | 106 ------
debian/compat | 1 -
debian/control | 31 --
debian/copyright | 29 --
debian/docs | 1 -
debian/patches/fix-pointer-size.patch | 103 ------
debian/patches/fix_libtidy_import.patch | 24 --
debian/patches/series | 3 -
debian/patches/unicode-strings.patch | 30 --
debian/rules | 4 -
debian/source/format | 1 -
debian/watch | 2 -
docs/Makefile | 177 ++++++++++
docs/conf.py | 332 ++++++++++++++++++
docs/index.rst | 69 ++++
docs/make.bat | 242 +++++++++++++
gendoc.py | 12 -
path.py | 587 --------------------------------
pytest.ini | 2 +
requirements-test.txt | 6 +
requirements.txt | 1 +
setup.cfg | 5 +
setup.py | 104 ++----
tidy/README.tidydll | 41 ---
tidy/__init__.py | 27 +-
tidy/error.py | 34 +-
tidy/lib.py | 293 ++++++++++------
tidy/pvt_ctypes/README.ctypes | 24 --
tidy/test_data/test.html | 8 +
tidy/test_tidy.py | 149 ++++----
uTidylib.egg-info/PKG-INFO | 20 ++
uTidylib.egg-info/SOURCES.txt | 20 ++
uTidylib.egg-info/dependency_links.txt | 1 +
uTidylib.egg-info/top_level.txt | 1 +
44 files changed, 1324 insertions(+), 1489 deletions(-)
diff --git a/INSTALL.txt b/INSTALL.txt
deleted file mode 100644
index 928576d..0000000
--- a/INSTALL.txt
+++ /dev/null
@@ -1,123 +0,0 @@
-If you're reading this, you are probably using a platform that
-doesn't have binaries available. Check anyway:
-
-http://sourceforge.net/project/showfiles.php?group_id=84459
-
-You may also want to consult this document if you get the message:
-"Couldn't find libtidy, please make sure it is installed correctly."
-
-==================================================================
-On Linux (instructions for other flavors of Unix mostly the same):
-___________________
-1. Install libtidy:
-
-TidyLib can be obtained from http://tidy.sourceforge.net/src/tidy_src.tgz
-
-(1a) Compile
-
-$ tar xvfz tidy_src.tgz
-$ cd tidy
-$ sh build/gnuauto/setup.sh
-$ ./configure # may want to specify --prefix=/usr here, see below
-$ make
-
-
-(1b) Install
-(become root)
-# make install
-
-This will place libtidy in /usr/local/lib. If you use --prefix=/usr in
-the configure line flagged above, your library will go to /usr/lib
-instead. The directory you install the library into MUST be
-configured with ldconfig, so if you installed into /usr/local/lib and
-it's mysteriously not working:
-
-# man ldconfig
-# man ld.so.conf
-
-Other Unices may have some variant of ldconfig, or they may use an
-environment variable such as LIBPATH, LD_LIBRARY_PATH, etc.
-
-__________________
-2. Install ctypes:
-
-Ctypes is available from:
-http://sourceforge.net/project/showfiles.php?group_id=71702
-
-_________________________________
-3. Install uLibtidy python files:
-
-(as root)
-# cd uTidylib
-# python setup.py install
-
-
-
-==================================================================
-On Windows:
-__________________
-1. Install libtidy
-
-TidyLib can be obtained from http://tidy.sourceforge.net/src/tidy_src.tgz
-
-libtidy provides 2 ways to compile on Windows. The first way is to
-use the project and makefiles in uTidylib/libtidy/build/msvc. This
-way is not recommended as it requires you to purchase MS Visual C++.
-
-1a) Install Cygwin
-The second, recommended way is to install Cygwin, with at least the
-following packages:
-make, automake, libtool, gcc, and gcc-mingw
-It is recommended that you do _not_ install Cygwin Python; instead use
-the Windows installer at http://python.org/download/ .
-
-1b) Compile
-We will compile with the mingw compiler, which produces binaries that
-do not depend on the Cygwin DLLs.
-$ tar xvfz tidy_src.tgz
-$ cd tidy
-$ sh build/gnuauto/setup.sh
-$ CFLAGS=-mno-cygwin ./configure
-$ make
-
-1c) Copy DLL to a directory in the PATH:
-
-$ cp src/.libs/cygtidy-0-99-0.dll $SYSTEMROOT
-
-__________________
-2. Install ctypes:
-
-Ctypes is available from:
-http://sourceforge.net/project/showfiles.php?group_id=71702
-
-_________________________________
-3. Install uLibtidy python files:
-
-$ cd uTidylib
-$ python setup.py install
-
-
-==================================================================
-Running tests (after installing):
-_________________________________
-
-Running tests requires that you have installed Twisted
-(http://twistedmatrix.com), as uTidyLib uses the trial framework for
-testing.
-
-$ python -c "from twisted.scripts import trial; trial.run()" -p tidylib
-
-This should work on either Windows or Unix.
-
-
-==================================================================
-The Doc:
-________
-
-To build the doc, just run:
-
-$ python gendoc.py
-
-(This requires that you have epydoc installed.)
-
-The API documentation will be built in the ``apidoc'' directory.
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index fbea738..bb03824 100644
--- a/LICENSE
+++ b/LICENSE
@@ -2,6 +2,8 @@ The MIT License
Copyright (c) 2003 Cory Dodt <corydodt at twistedmatrix.com>
+Copyright (c) 2014-2016 Michal Čihař <michal at cihar.com>
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
diff --git a/MANIFEST.in b/MANIFEST.in
index aa57d49..727b683 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,11 @@
-include INSTALL.txt
include LICENSE
include *.py
include README.*
include MANIFEST.in
-include tidy/README.*
-include tidy/pvt_ctypes/README.*
+include docs/conf.py
+include docs/Makefile
+include docs/make.bat
+include pytest.ini
+include requirements.txt
+include requirements-test.txt
+recursive-include docs *.rst
diff --git a/PKG-INFO b/PKG-INFO
index 03ce7d2..3eccebe 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,20 @@
-Metadata-Version: 1.0
-Name: uTidylib
-Version: 0.2
-Summary: Wrapper for HTML Tidy at http://tidy.sourceforge.net
-Home-page: http://utidylib.sf.net
-Author: Cory Dodt
-Author-email: corydodt at twistedmatrix.com
-License: UNKNOWN
-Description: A wrapper for the relocatable version of HTML Tidy (see
- http://tidy.sourceforge.net for details). This allows you to
- tidy HTML files through a Pythonic interface.
-Platform: UNKNOWN
+Metadata-Version: 1.1
+Name: uTidylib
+Version: 0.3
+Summary: Wrapper for HTML Tidy at http://tidy.sourceforge.net
+Home-page: https://cihar.com/software/utidylib/
+Author: Michal Čihař
+Author-email: michal at cihar.com
+License: MIT
+Description: A wrapper for the relocatable version of HTML Tidy (see
+ http://tidy.sourceforge.net for details). This allows you to
+ tidy HTML files through a Pythonic interface.
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Topic :: Internet
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Intended Audience :: Developers
+Classifier: Environment :: Web Environment
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
diff --git a/README.path b/README.path
deleted file mode 100644
index db18a88..0000000
--- a/README.path
+++ /dev/null
@@ -1,10 +0,0 @@
-**This applies to the file path.py, not uTidyLib. Please see the text
-file LICENSE for information about uTidyLib.**
-
-License: You may use path.py for whatever you wish, at your own
-risk. (For example, you may modify, relicense, and redistribute it.)
-It is provided without any guarantee or warranty of any kind, not even
-for merchantability or fitness for any purpose.
-
-If you do make changes to path.py, please consider sending them along
-to me at jason at jorendorff.com.
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..a1280e1
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,63 @@
+uTidylib
+========
+
+.. image:: https://travis-ci.org/nijel/utidylib.svg?branch=master
+ :target: https://travis-ci.org/nijel/utidylib
+ :alt: Build Status
+
+.. image:: https://img.shields.io/coveralls/nijel/utidylib.svg
+ :target: https://coveralls.io/r/nijel/utidylib?branch=master
+ :alt: Coverage Status
+
+.. image:: https://landscape.io/github/nijel/utidylib/master/landscape.png
+ :target: https://landscape.io/github/nijel/utidylib/master
+ :alt: Code Health
+
+.. image:: https://readthedocs.org/projects/utidylib/badge/?version=latest
+ :target: http://utidylib.readthedocs.org/en/latest/
+ :alt: Documentation
+
+
+NOTE: This repository contains a patched version of uTidylib which
+includes all Debian patches and works with Mac OS X.
+
+This is uTidylib, the Python wrapper for the HTML cleaning
+library named TidyLib. It supports both original Tidy <http://tidy.sf.net> and new
+HTML5 enabled Tidy <http://www.html-tidy.org/>.
+
+Once installed, there are two ways to get help. The simplest is:
+
+.. code-block:: sh
+
+ $ python
+ >>> import tidy
+ >>> help(tidy)
+ . . .
+
+Then, of course, there's the API documentation, which
+is available at <http://utidylib.readthedocs.io/en/latest/>.
+
+10 Second Tutorial
+------------------
+
+.. code-block:: python
+
+ >>> import tidy
+ >>> print tidy.parseString(
+ ... '<Html>Hello Tidy!',
+ ... output_xhtml=1, add_xml_decl=1, indent=1, tidy_mark=0
+ ... )
+ <?xml version="1.0" encoding="us-ascii"?>
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title></title>
+ </head>
+ <body>
+ Hello Tidy!
+ </body>
+ </html>
+
+
+Good luck!
diff --git a/README.txt b/README.txt
deleted file mode 100644
index 1cf1f5e..0000000
--- a/README.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-This is uTidylib, the Python wrapper for the HTML cleaning
-library named TidyLib: http://tidy.sf.net . Python 2.3 or later
-is required to use uTidylib. Repeat, Python 2.3 or later is
-*required* to use uTidylib.
-
-Once installed, there are two ways to get help. The simplest is:
-
-$ python
->>> import tidy
->>> help(tidy)
-. . .
-
-Then, of course, there's the epydoc-generated API documentation, which
-is available at site-packages/tidy/apidoc/index.html .
-
-__________________
-
-10 Second Tutorial
-__________________
-
->>> import tidy
->>> options = dict(output_xhtml=1, add_xml_decl=1, indent=1, tidy_mark=0)
->>> print tidy.parseString('<Html>Hello Tidy!', **options)
-<?xml version="1.0" encoding="us-ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title></title>
- </head>
- <body>
- Hello Tidy!
- </body>
-</html
-
-
-Good luck!
diff --git a/debian/.git-dpm b/debian/.git-dpm
deleted file mode 100644
index 5ada11a..0000000
--- a/debian/.git-dpm
+++ /dev/null
@@ -1,11 +0,0 @@
-# see git-dpm(1) from git-dpm package
-09277ef83447e9d9ec92c3296e28475cc2ed1042
-09277ef83447e9d9ec92c3296e28475cc2ed1042
-93602b61b389308d36f1824998ede09e4ac54b69
-93602b61b389308d36f1824998ede09e4ac54b69
-utidylib_0.2.orig.tar.gz
-7575c220f425414da8347b0414acf6e5db899731
-14568
-debianTag="debian/%e%v"
-patchedTag="patched/%e%v"
-upstreamTag="upstream/%e%u"
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 5348be8..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,19 +0,0 @@
-uTidyLib for Debian
-===================
-
-The debian package of uTidyLib does not include the API docs, however
-these can be easily generated using epydoc (package python-epydoc).
-Just run the following commands:
-
-$ export PYTHON_VERSION="2.3" # replace 2.3 with appropriate version
-$ export PACKAGES_HOME="/usr/lib/python$PYTHON_VERSION/site-packages/"
-$ export APIDOC_OUTPUT="python$PYTHON_VERSION-utidylib-apidoc"
-$ epydoc -o "$APIDOC_OUTPUT" $PACKAGES_HOME/tidy/error.py \
- $PACKAGES_HOME/tidy/lib.py \
- $PACKAGES_HOME/tidy/__init__.py
-
-You might also want to visit the project's homepage at
-http://utidylib.berlios.de/ for more details about the
-usage of this library.
-
--- Igor Stroh <jenner at debian.org> Sun, 21 Aug 2005 10:18:04 +0200
diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644
index 9ec88c3..0000000
--- a/debian/README.source
+++ /dev/null
@@ -1,16 +0,0 @@
-Since the upstream provides only a .zip archive, we need to repackage
-it into a .tar.gz:
-1) Download the current version from
- http://download.berlios.de/utidylib/uTidylib-$VERSION.zip
- where $VERSION is the latest available upstream release.
- You can use the `uscan` program to retrieve the newest version
- of this file, just point it to the unpacked utidylib source
- directory (must include the "debian/" folder).
-
-2) Unpack the ZIP archive, rename the resulting directory to
- utidylib-$VERSION.orig and run create the .orig.tar.gz:
- $ unzip uTidylib-$VERSION.zip
- $ mv uTidylib-$VERSION utidylib-$VERSION
- $ tar czvf utidylib_$VERSION.orig.tar.gz utidylib-$VERSION
-
--- Igor Stroh <jenner at debian.org> Sun, 21 Aug 2005 10:18:04 +0200
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 708b4e9..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,106 +0,0 @@
-utidylib (0.2-10) UNRELEASED; urgency=low
-
- [ Michal Čihař ]
- * NOT RELEASED YET
- * Bump standards to 3.9.6.
- * Adjust Vcs-Svn URL.
-
- [ Ondřej Nový ]
- * Fixed VCS URL (https)
-
- -- Michal Čihař <nijel at debian.org> Thu, 31 Oct 2013 10:10:23 +0100
-
-utidylib (0.2-9) unstable; urgency=low
-
- [ Michal Čihař ]
- * Bump standards to 3.9.4.
- * Use debhelper 9.
- * Updated watchfile.
-
- [ Jakub Wilk ]
- * Use canonical URIs for Vcs-* fields.
- * Set Debian Python Modules Team as maintainer (in place of Python
- Applications Packaging Team).
- * Drop obsolete Breaks/Replaces with python2.3-utidylib and
- python2.4-utidylib.
-
- -- Michal Čihař <nijel at debian.org> Thu, 31 Oct 2013 10:08:25 +0100
-
-utidylib (0.2-8) unstable; urgency=low
-
- * Team upload.
- * Rebuild to add Python 2.7 support
-
- -- Piotr Ożarowski <piotr at debian.org> Sun, 08 May 2011 16:45:30 +0200
-
-utidylib (0.2-7) unstable; urgency=low
-
- * Bump standards to 3.9.1.
- * Switch to dh_python2.
-
- -- Michal Čihař <nijel at debian.org> Mon, 07 Mar 2011 10:48:18 +0100
-
-utidylib (0.2-6) unstable; urgency=low
-
- * Add support for handling unicode strings (Closes: #339818).
-
- -- Michal Čihař <nijel at debian.org> Tue, 29 Jun 2010 14:47:17 +0200
-
-utidylib (0.2-5) unstable; urgency=low
-
- * Fix handling of pointer on 64-bit (LP: #307000).
- * Replace Conflicts with Breaks for older package versions.
- * Bump standards to 3.9.0.
-
- -- Michal Čihař <nijel at debian.org> Tue, 29 Jun 2010 10:42:50 +0200
-
-utidylib (0.2-4) unstable; urgency=low
-
- * New maintainer.
- * Remove depdency on python-ctypes (Closes: #580215).
- * Convert patch to quilt and use 3.0 source format.
- * Switch build system to dh from cdbs.
- * Bump standards to 3.8.4.
- * Add ${misc:Depends}.
- * Change section to python.
- * Add homepage control field.
- * Add Vcs-* control fields.
- * No need to ship source readme in binary package.
-
- -- Michal Čihař <nijel at debian.org> Tue, 04 May 2010 17:35:13 +0200
-
-utidylib (0.2-3.2) unstable; urgency=low
-
- * Non-maintainer upload.
- * Fixes dependency on python-ctypes (Closes: #476276).
-
- -- Michal Čihař <nijel at debian.org> Tue, 15 Apr 2008 16:42:24 +0200
-
-utidylib (0.2-3.1) unstable; urgency=low
-
- * Non-maintainer upload.
- * Update to new Python Policy (Closes: #373404).
-
- -- Pierre Habouzit <madcoder at debian.org> Thu, 29 Jun 2006 14:48:22 +0200
-
-utidylib (0.2-3) unstable; urgency=low
-
- * debian/control: changed dependency on libtidy from
- libtidy0 to libtidy-0.99-0 (Closes: #343991)
-
- -- Igor Stroh <jenner at debian.org> Mon, 26 Dec 2005 12:42:30 +0100
-
-utidylib (0.2-2) unstable; urgency=low
-
- * debian/control: added missing python-dev dependency (Closes: #325679).
- Thanks to Andreas Jochens.
-
- -- Igor Stroh <jenner at debian.org> Tue, 30 Aug 2005 10:27:34 +0200
-
-utidylib (0.2-1) unstable; urgency=low
-
- * Initial release (Closes: #244110)
- * Thanks to Chad Walstrom for providing the original CDBS-based
- packaging infrastructure
-
- -- Igor Stroh <jenner at debian.org> Sun, 21 Aug 2005 10:18:04 +0200
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index ec63514..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 93fdd66..0000000
--- a/debian/control
+++ /dev/null
@@ -1,31 +0,0 @@
-Source: utidylib
-Section: python
-Priority: optional
-Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Uploaders: Michal Čihař <nijel at debian.org>
-Build-Depends: debhelper (>= 9)
-Build-Depends-Indep: python-all (>= 2.6.6-3)
-Standards-Version: 3.9.6
-Homepage: http://utidylib.berlios.de/
-Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/utidylib.git
-Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/utidylib.git
-
-Package: python-utidylib
-Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}, libtidy-0.99-0 (>= 20051018)
-Provides: ${python:Provides}
-Breaks: ${python:Breaks}
-Description: Python wrapper for TidyLib
- Corrects markup in a way compliant with the latest standards, and
- optimal for the popular browsers. It has a comprehensive knowledge
- of the attributes defined in the HTML 4.0 recommendation from W3C,
- and understands the US ASCII, ISO Latin-1, UTF-8 and the ISO 2022
- family of 7-bit encodings. In the output:
- .
- * HTML entity names for characters are used when appropriate.
- * Missing attribute quotes are added, and mismatched quotes found.
- * Tags lacking a terminating '>' are spotted.
- * Proprietary elements are recognized and reported as such.
- * The page is reformatted, from a choice of indentation styles.
- .
- This package contains uTidylib, a Python wrapper for TidyLib.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 057877b..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,29 +0,0 @@
-This package was originally debianized by Chad Walstrom <chewie at debian.org>
-on Mon, 20 Dec 2004 15:18:53 -0600
-
-It was downloaded from http://download.berlios.de/utidylib/uTidylib-0.2.zip
-
-Copyright:
-
- Copyright (c) 2003 Cory Dodt <corydodt at twistedmatrix.com>
-
-License:
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 71dfd5b..0000000
--- a/debian/docs
+++ /dev/null
@@ -1 +0,0 @@
-README.txt
diff --git a/debian/patches/fix-pointer-size.patch b/debian/patches/fix-pointer-size.patch
deleted file mode 100644
index 0d71bc4..0000000
--- a/debian/patches/fix-pointer-size.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 09277ef83447e9d9ec92c3296e28475cc2ed1042 Mon Sep 17 00:00:00 2001
-From: SVN-Git Migration <python-modules-team at lists.alioth.debian.org>
-Date: Thu, 8 Oct 2015 14:22:14 -0700
-Subject: Fix handling of 64-bit pointer
-
-Origin: http://developer.berlios.de/bugs/?func=detailbug&bug_id=14691&group_id=1810
-Patch-Name: fix-pointer-size.patch
----
- tidy/lib.py | 23 ++++++++++++-----------
- 1 file changed, 12 insertions(+), 11 deletions(-)
-
-diff --git a/tidy/lib.py b/tidy/lib.py
-index 67927a2..40f1035 100644
---- a/tidy/lib.py
-+++ b/tidy/lib.py
-@@ -18,7 +18,7 @@ from cStringIO import StringIO
- import weakref
- from tidy.error import *
-
--# search the path for libtidy using the known names; try the package
-+# search the path for libtidy using the known names; try the package
- # directory too
- thelib=None
- os.environ['PATH'] = "%s%s%s" % (packagedir, os.pathsep, os.environ['PATH'])
-@@ -33,7 +33,7 @@ if not thelib:
- raise OSError("Couldn't find libtidy, please make sure it is installed.")
-
- class Loader:
-- """I am a trivial wrapper that eliminates the need for tidy.tidyFoo,
-+ """I am a trivial wrapper that eliminates the need for tidy.tidyFoo,
- so you can just access tidy.Foo
- """
- def __init__(self):
-@@ -46,6 +46,7 @@ class Loader:
- return getattr(self.lib, name)
-
- _tidy=Loader()
-+_tidy.Create.restype = ctypes.POINTER(ctypes.c_void_p)
-
- # define a callback to pass to Tidylib
- def _putByte(handle, c):
-@@ -53,7 +54,7 @@ def _putByte(handle, c):
- sinkfactory[handle].putByte(c)
- return 0
-
--PUTBYTEFUNC=ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_char)
-+PUTBYTEFUNC=ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_char)
- putByte=PUTBYTEFUNC(_putByte)
-
- class _OutputSink(ctypes.Structure):
-@@ -94,7 +95,7 @@ class ReportItem:
- return "line %d col %d - %s: %s" % (self.line, self.col,
- severities[self.severity],
- self.message)
--
-+
- else:
- return "%s: %s" % (severities[self.severity], self.message)
- except KeyError:
-@@ -103,7 +104,7 @@ class ReportItem:
- def __repr__(self):
- return "%s('%s')" % (self.__class__.__name__,
- str(self).replace("'", "\\'"))
--
-+
- class FactoryDict(dict):
- """I am a dict with a create method and no __setitem__. This allows
- me to control my own keys.
-@@ -114,7 +115,7 @@ class FactoryDict(dict):
- dict.__setitem__(self, name, value)
- def __setitem__(self, name, value):
- raise TypeError, "Use create() to get a new object"
--
-+
-
- class SinkFactory(FactoryDict):
- """Mapping for lookup of sinks by handle"""
-@@ -161,12 +162,12 @@ errors = {'missing or malformed argument for option: ': OptionArgError,
- class DocumentFactory(FactoryDict):
- def _setOptions(self, doc, **options):
- for k in options.keys():
--
-+
- # this will flush out most argument type errors...
- if options[k] is None: options[k] = ''
--
-- _tidy.OptParseValue(doc.cdoc,
-- k.replace('_', '-'),
-+
-+ _tidy.OptParseValue(doc.cdoc,
-+ k.replace('_', '-'),
- str(options[k]))
- if doc.errors:
- match=filter(doc.errors[-1].message.startswith, errors.keys())
-@@ -216,7 +217,7 @@ class DocumentFactory(FactoryDict):
- return doc
- def releaseDoc(self, ref):
- _tidy.Release(self[ref])
--
-+
- docfactory = DocumentFactory()
- parse = docfactory.parse
- parseString = docfactory.parseString
diff --git a/debian/patches/fix_libtidy_import.patch b/debian/patches/fix_libtidy_import.patch
deleted file mode 100644
index 42a8b73..0000000
--- a/debian/patches/fix_libtidy_import.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From d3797738921bf2754b9ead7ea589add9cc876623 Mon Sep 17 00:00:00 2001
-From: Igor Stroh <jenner at debian.org>
-Date: Thu, 8 Oct 2015 14:22:13 -0700
-Subject: Add 'tidy' to the list of lib names, so it can be imported correctly
- in debian
-
-Patch-Name: fix_libtidy_import.patch
----
- tidy/lib.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tidy/lib.py b/tidy/lib.py
-index be0c11b..67927a2 100644
---- a/tidy/lib.py
-+++ b/tidy/lib.py
-@@ -22,7 +22,7 @@ from tidy.error import *
- # directory too
- thelib=None
- os.environ['PATH'] = "%s%s%s" % (packagedir, os.pathsep, os.environ['PATH'])
--for libname in ('cygtidy-0-99-0', 'libtidy', 'libtidy.so',
-+for libname in ('tidy', 'cygtidy-0-99-0', 'libtidy', 'libtidy.so',
- 'libtidy-0.99.so.0', 'tidylib'):
- try:
- thelib = getattr(ctypes.cdll, libname)
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 25b2c7b..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-unicode-strings.patch
-fix_libtidy_import.patch
-fix-pointer-size.patch
diff --git a/debian/patches/unicode-strings.patch b/debian/patches/unicode-strings.patch
deleted file mode 100644
index b0f656c..0000000
--- a/debian/patches/unicode-strings.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From bc6e3a16c7e73e304e3071b9680a30da44b26ad2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= <nijel at debian.org>
-Date: Thu, 8 Oct 2015 14:22:12 -0700
-Subject: Fix handling of unicode strings
-
-Forwarded: https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=3011&group_id=1810
-
-Patch-Name: unicode-strings.patch
----
- tidy/lib.py | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/tidy/lib.py b/tidy/lib.py
-index 5f0dbce..be0c11b 100644
---- a/tidy/lib.py
-+++ b/tidy/lib.py
-@@ -204,6 +204,13 @@ class DocumentFactory(FactoryDict):
- @param st: the string to parse
- @return: a document object
- """
-+ if type(st) == unicode:
-+ try:
-+ enc = kwargs['char_encoding']
-+ except KeyError:
-+ enc = 'utf8'
-+ kwargs['char_encoding'] = enc
-+ st = st.encode(enc)
- doc = self._create(**kwargs)
- self.loadString(doc, st)
- return doc
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 4647c9c..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/make -f
-
-%:
- dh $@ --with python2
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index 1d4437f..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,2 +0,0 @@
-version=3
-http://developer.berlios.de/project/showfiles.php?group_id=1810 .*/uTidylib-(\d.*)\.(?:tgz|tar\.(?:gz|bz2|xz)|zip)
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..f3448f8
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,177 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " texinfo to make Texinfo files"
+ @echo " info to make Texinfo files and run them through makeinfo"
+ @echo " gettext to make PO message catalogs"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " xml to make Docutils-native XML files"
+ @echo " pseudoxml to make pseudoxml-XML files for display purposes"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/uTidylib.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/uTidylib.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/uTidylib"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/uTidylib"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through platex and dvipdfmx..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+ @echo "Run \`make' in that directory to run these through makeinfo" \
+ "(use \`make info' here to do that automatically)."
+
+info:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo "Running Texinfo files through makeinfo..."
... 2295 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/utidylib.git
More information about the Python-modules-commits
mailing list