[Python-modules-commits] [python-coloredlogs] 03/12: Add debian/ files

Gaurav Juvekar gauravjuvekar-guest at moszumanska.debian.org
Sun Mar 12 20:21:29 UTC 2017


This is an automated email from the git hooks/post-receive script.

gauravjuvekar-guest pushed a commit to branch master
in repository python-coloredlogs.

commit f0ea9db346aa9ec75075f170ee9fab82b9611b0a
Author: Gaurav Juvekar <gauravjuvekar at gmail.com>
Date:   Wed Feb 1 16:12:55 2017 +0530

    Add debian/ files
---
 debian/changelog                     |   4 +-
 debian/coloredlogs.1                 |  48 +++++++
 debian/coloredlogs.install           |   1 +
 debian/coloredlogs.lintian-overrides |   3 +
 debian/coloredlogs.manpages          |   1 +
 debian/control                       | 246 +++++------------------------------
 debian/copyright                     |  10 +-
 debian/python-coloredlogs.docs       |   1 +
 debian/python-coloredlogs.install    |   2 +
 debian/python3-coloredlogs.install   |   2 +
 debian/rules                         |  18 ++-
 11 files changed, 115 insertions(+), 221 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fedce7d..20478b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
-coloredlogs (5.2-0~pypi2deb) UNRELEASED; urgency=low
+coloredlogs (5.2-1) UNRELEASED; urgency=low
 
-  * Autogenerated by py2dsp v1.20151008
+  * Initial release. (Closes: #780187)
 
  -- Gaurav Juvekar <gauravjuvekar at gmail.com>  Sun, 29 Jan 2017 19:30:15 +0000
 
diff --git a/debian/coloredlogs.1 b/debian/coloredlogs.1
new file mode 100644
index 0000000..760a4de
--- /dev/null
+++ b/debian/coloredlogs.1
@@ -0,0 +1,48 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" (C) Copyright 2017 Gaurav Juvekar <gauravjuvekar at gmail.com>,
+.\"
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH coloredlogs 1 "February 01 2017"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+coloredlogs \- colored logs for Python logging module
+.SH SYNOPSIS
+.B coloredlogs
+.RI [ OPTIONS ]
+.RI [ ARGS ]
+.br
+.SH DESCRIPTION
+\fBcoloredlogs\fP is a program that converts the output of any command
+containing ANSI escape sequences to HTML. It also includes a demo for the
+coloredlogs Python module.
+.SH OPTIONS
+This program follow the usual GNU command line syntax, with long options
+starting with two dashes (`-').  A summary of options is included below.
+.TP
+.B \-h, \-\-help
+Show this message and exit.
+.TP
+.B \-c, \-\-convert, \-\-to\-html
+Capture the output of an external command (given by the positional
+arguments \fIARGS\fR) and convert ANSI escape sequences in the output to HTML.
+.br
+If the \fBcoloredlogs\fR program is attached to an interactive terminal it will
+write the generated HTML to a temporary file and open that file in a web
+browser, otherwise the generated HTML will be written to standard output.
+.TP
+.B \-d, \-\-demo
+Perform a simple demonstration of the coloredlogs package to show the colored
+logging on an interactive terminal.
diff --git a/debian/coloredlogs.install b/debian/coloredlogs.install
new file mode 100644
index 0000000..1df36c6
--- /dev/null
+++ b/debian/coloredlogs.install
@@ -0,0 +1 @@
+usr/bin/*
diff --git a/debian/coloredlogs.lintian-overrides b/debian/coloredlogs.lintian-overrides
new file mode 100644
index 0000000..bccb54c
--- /dev/null
+++ b/debian/coloredlogs.lintian-overrides
@@ -0,0 +1,3 @@
+# The coloredlogs package provides a helper command for a primarily
+# library-only packge.
+coloredlogs: application-in-library-section
diff --git a/debian/coloredlogs.manpages b/debian/coloredlogs.manpages
new file mode 100644
index 0000000..ad1277f
--- /dev/null
+++ b/debian/coloredlogs.manpages
@@ -0,0 +1 @@
+debian/coloredlogs.1
diff --git a/debian/control b/debian/control
index 3a27559..f5ba920 100644
--- a/debian/control
+++ b/debian/control
@@ -2,231 +2,55 @@ Source: coloredlogs
 Section: python
 Priority: optional
 Maintainer: Gaurav Juvekar <gauravjuvekar at gmail.com>
-Build-Depends: debhelper (>= 9), dh-python,
-               depends,
+Build-Depends: debhelper (>= 10), dh-python,
+			   python-pytest,
+			   python3-pytest,
                python-all,
                python-setuptools,
                python3-all,
-               python3-setuptools,
-               recommends,
-               suggests,
+               python3-setuptools
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
 Standards-Version: 3.9.8
 Homepage: https://coloredlogs.readthedocs.io
 
 Package: python-coloredlogs
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends},
+Depends: python-humanfriendly, ${misc:Depends}, ${python:Depends},
 Recommends: ${python:Recommends}
 Suggests: ${python:Suggests}
-Description: Colored terminal output for Python's logging module - Python 2.X
- coloredlogs: Colored terminal output for Python's logging module
- ================================================================
- .
-  .. image:: https://travis-ci.org/xolox/python-coloredlogs.svg?branch=master
-    :target: https://travis-ci.org/xolox/python-coloredlogs
- .
-  .. image:: https://coveralls.io/repos/xolox/python-coloredlogs/badge.png?branch=master
-    :target: https://coveralls.io/r/xolox/python-coloredlogs?branch=master
- .
- The `coloredlogs` package enables colored terminal output for Python's logging_
- module. The ColoredFormatter_ class inherits from `logging.Formatter`_ and uses
- `ANSI escape sequences`_ to render your logging messages in color. It uses only
- standard colors so it should work on any UNIX terminal. It's currently tested
- on Python 2.6, 2.7, 3.4, 3.5 and PyPy. On Windows `coloredlogs` automatically
- pulls in Colorama_ as a dependency and enables ANSI escape sequence translation
- using Colorama. Here is a screen shot of the demo that is printed when the
- command ``coloredlogs --demo`` is executed:
- .
-  .. image:: https://peterodding.com/code/python/coloredlogs/screenshots/terminal.png
- .
- Note that the screenshot above includes the custom logging level `VERBOSE`
- defined by my verboselogs_ package: if you install both `coloredlogs` and
- `verboselogs` it will Just Work (`verboselogs` is of course not required to use
- `coloredlogs`).
- .
-  .. contents::
-    :local:
- .
- Format of log messages
- ----------------------
- .
- The ColoredFormatter_ class supports user defined log formats so you can use
- any log format you like. The default log format is as follows::
- .
-  %(asctime)s %(hostname)s %(name)s[%(process)d] %(levelname)s %(message)s
- .
- This log format results in the following output::
- .
-  2015-10-23 03:32:22 peter-macbook coloredlogs.demo[30462] DEBUG message with level 'debug'
-  2015-10-23 03:32:23 peter-macbook coloredlogs.demo[30462] VERBOSE message with level 'verbose'
-  2015-10-23 03:32:24 peter-macbook coloredlogs.demo[30462] INFO message with level 'info'
-  ...
- .
- You can customize the log format and styling using environment variables as
- well as programmatically, please refer to the `online documentation`_ for
- details.
- .
- Usage
- -----
- .
- Here's an example of how easy it is to get started:
- .
-  .. code-block:: python
- .
-    # Create a logger object.
-    import logging
-    logger = logging.getLogger('your-module')
- .
-    # Initialize coloredlogs.
-    import coloredlogs
-    coloredlogs.install(level='DEBUG')
- .
-    # Some examples.
-    logger.debug("this is a debugging message")
-    logger.info("this is an informational message")
-    logger.warn("this is a warning message")
-    logger.error("this is an error message")
-    logger.critical("this is a critical message")
- .
- Colored output from cron
- ------------------------
- .
- When `coloredlogs` is used in a cron_ job, the output that's e-mailed to you by
- cron won't contain any ANSI escape sequences because `coloredlogs` realizes
- that it's not attached to an interactive terminal. If you'd like to have colors
- e-mailed to you by cron there's a simple way to set it up::
- .
-     MAILTO="your-email-address at here"
-     CONTENT_TYPE="text/html"
-     * * * * * root coloredlogs --to-html your-command
- .
- The ``coloredlogs`` program is installed when you install the `coloredlogs`
- package. When you execute ``coloredlogs --to-html your-command`` it runs
- ``your-command`` under the external program ``script`` (you need to have this
- installed). This makes ``your-command`` think that it's attached to an
- interactive terminal which means it will output ANSI escape sequences which
- will then be converted to HTML by the ``coloredlogs`` program. Yes, this is a
- bit convoluted, but it works great :-)
- .
- You can use this feature without using `coloredlogs` in your Python modules,
- but please note that only normal text, bold text and text with one of the
- foreground colors black, red, green, yellow, blue, magenta, cyan and white
- (these are the portable ANSI color codes) are supported.
- .
- Contact
- -------
- .
- The latest version of `coloredlogs` is available on PyPI_ and GitHub_. The
- `online documentation`_ is available on Read The Docs. For bug reports please
- create an issue on GitHub_. If you have questions, suggestions, etc. feel free
- to send me an e-mail at `peter at peterodding.com`_.
+Description: Colored terminal output for the logging module in Python2
+ A Python library to enable colored terminal output for Python's logging
+ module. This library provides a ColoredFormatter class to render logging
+ messages in color using ANSI escape sequences. It uses only the standard
+ colors and so should work on any UNIX terminal.
  .
+ This package provides the module for Python2.
 
 Package: python3-coloredlogs
 Architecture: all
-Depends: ${misc:Depends}, ${python3:Depends},
+Depends: python3-humanfriendly, ${misc:Depends}, ${python3:Depends},
 Recommends: ${python3:Recommends}
 Suggests: ${python3:Suggests}
-Description: Colored terminal output for Python's logging module
- coloredlogs: Colored terminal output for Python's logging module
- ================================================================
- .
-  .. image:: https://travis-ci.org/xolox/python-coloredlogs.svg?branch=master
-    :target: https://travis-ci.org/xolox/python-coloredlogs
- .
-  .. image:: https://coveralls.io/repos/xolox/python-coloredlogs/badge.png?branch=master
-    :target: https://coveralls.io/r/xolox/python-coloredlogs?branch=master
- .
- The `coloredlogs` package enables colored terminal output for Python's logging_
- module. The ColoredFormatter_ class inherits from `logging.Formatter`_ and uses
- `ANSI escape sequences`_ to render your logging messages in color. It uses only
- standard colors so it should work on any UNIX terminal. It's currently tested
- on Python 2.6, 2.7, 3.4, 3.5 and PyPy. On Windows `coloredlogs` automatically
- pulls in Colorama_ as a dependency and enables ANSI escape sequence translation
- using Colorama. Here is a screen shot of the demo that is printed when the
- command ``coloredlogs --demo`` is executed:
- .
-  .. image:: https://peterodding.com/code/python/coloredlogs/screenshots/terminal.png
- .
- Note that the screenshot above includes the custom logging level `VERBOSE`
- defined by my verboselogs_ package: if you install both `coloredlogs` and
- `verboselogs` it will Just Work (`verboselogs` is of course not required to use
- `coloredlogs`).
- .
-  .. contents::
-    :local:
- .
- Format of log messages
- ----------------------
- .
- The ColoredFormatter_ class supports user defined log formats so you can use
- any log format you like. The default log format is as follows::
- .
-  %(asctime)s %(hostname)s %(name)s[%(process)d] %(levelname)s %(message)s
- .
- This log format results in the following output::
- .
-  2015-10-23 03:32:22 peter-macbook coloredlogs.demo[30462] DEBUG message with level 'debug'
-  2015-10-23 03:32:23 peter-macbook coloredlogs.demo[30462] VERBOSE message with level 'verbose'
-  2015-10-23 03:32:24 peter-macbook coloredlogs.demo[30462] INFO message with level 'info'
-  ...
- .
- You can customize the log format and styling using environment variables as
- well as programmatically, please refer to the `online documentation`_ for
- details.
- .
- Usage
- -----
- .
- Here's an example of how easy it is to get started:
- .
-  .. code-block:: python
- .
-    # Create a logger object.
-    import logging
-    logger = logging.getLogger('your-module')
- .
-    # Initialize coloredlogs.
-    import coloredlogs
-    coloredlogs.install(level='DEBUG')
- .
-    # Some examples.
-    logger.debug("this is a debugging message")
-    logger.info("this is an informational message")
-    logger.warn("this is a warning message")
-    logger.error("this is an error message")
-    logger.critical("this is a critical message")
- .
- Colored output from cron
- ------------------------
- .
- When `coloredlogs` is used in a cron_ job, the output that's e-mailed to you by
- cron won't contain any ANSI escape sequences because `coloredlogs` realizes
- that it's not attached to an interactive terminal. If you'd like to have colors
- e-mailed to you by cron there's a simple way to set it up::
- .
-     MAILTO="your-email-address at here"
-     CONTENT_TYPE="text/html"
-     * * * * * root coloredlogs --to-html your-command
- .
- The ``coloredlogs`` program is installed when you install the `coloredlogs`
- package. When you execute ``coloredlogs --to-html your-command`` it runs
- ``your-command`` under the external program ``script`` (you need to have this
- installed). This makes ``your-command`` think that it's attached to an
- interactive terminal which means it will output ANSI escape sequences which
- will then be converted to HTML by the ``coloredlogs`` program. Yes, this is a
- bit convoluted, but it works great :-)
- .
- You can use this feature without using `coloredlogs` in your Python modules,
- but please note that only normal text, bold text and text with one of the
- foreground colors black, red, green, yellow, blue, magenta, cyan and white
- (these are the portable ANSI color codes) are supported.
- .
- Contact
- -------
+Description: Colored terminal output for the logging module in Python3
+ A Python library to enable colored terminal output for Python's logging
+ module. This library provides a ColoredFormatter class to render logging
+ messages in color using ANSI escape sequences. It uses only the standard
+ colors and so should work on any UNIX terminal.
+ Any log format can be used, and the format and styling can be further
+ customized with environment variables as well as programmatically.
+ .
+ This package provides the module for Python3.
+
+Package: coloredlogs
+Architecture: all
+Depends: python3-coloredlogs, ${misc:Depends}, ${python3:Depends},
+Recommends: ${python3:Recommends}
+Suggests: ${python3:Suggests}
+Description: Convert colored logs with ANSI escape sequences to HTML files.
+ The coloredlogs command can be used to convert the output of any command
+ containing ANSI escape sequences to an HTML format. It supports normal text,
+ bold text, and any standard ANSI color codes
  .
- The latest version of `coloredlogs` is available on PyPI_ and GitHub_. The
- `online documentation`_ is available on Read The Docs. For bug reports please
- create an issue on GitHub_. If you have questions, suggestions, etc. feel free
- to send me an e-mail at `peter at peterodding.com`_.
- .
\ No newline at end of file
+ This package provides the coloredlogs command based on the Python3 library of
+ the same name.
diff --git a/debian/copyright b/debian/copyright
index 08d95bc..4d4e085 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,13 +5,13 @@ Source: https://coloredlogs.readthedocs.io
 
 Files: *
 Copyright: (c) 2015 Peter Odding
-License: 
+License: Expat
 
 Files: debian/*
-Copyright: 2017 © Gaurav Juvekar <gauravjuvekar at gmail.com>
-License: 
+Copyright: 2017 Gaurav Juvekar <gauravjuvekar at gmail.com>
+License: Expat
 
-License: 
+License: Expat
  Copyright (c) 2015 Peter Odding
  .
  Permission is hereby granted, free of charge, to any person obtaining
@@ -31,4 +31,4 @@ License:
  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.
\ No newline at end of file
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/debian/python-coloredlogs.docs b/debian/python-coloredlogs.docs
new file mode 100644
index 0000000..a1320b1
--- /dev/null
+++ b/debian/python-coloredlogs.docs
@@ -0,0 +1 @@
+README.rst
diff --git a/debian/python-coloredlogs.install b/debian/python-coloredlogs.install
new file mode 100644
index 0000000..f2da40a
--- /dev/null
+++ b/debian/python-coloredlogs.install
@@ -0,0 +1,2 @@
+usr/lib/python2*/dist-packages/coloredlogs/*.py*
+usr/lib/python2*/dist-packages/*.egg-info
diff --git a/debian/python3-coloredlogs.install b/debian/python3-coloredlogs.install
new file mode 100644
index 0000000..c383b51
--- /dev/null
+++ b/debian/python3-coloredlogs.install
@@ -0,0 +1,2 @@
+usr/lib/python3*/dist-packages/coloredlogs/*.py*
+usr/lib/python3*/dist-packages/*.egg-info
diff --git a/debian/rules b/debian/rules
index 144b85c..d1f27f6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,18 @@
 #! /usr/bin/make -f
 
-export PYBUILD_NAME=coloredlogs
-export PYBUILD_AFTER_INSTALL_python2=rm -rf {destdir}/usr/bin/
+# Used as per the example from www.v13.gr/blog/?p=412
+#DPKG_EXPORT_BUILDFLAGS = 1
+
+#export DH_VERBOSE = 1
+#export PYBUILD_NAME=coloredlogs
+#export PYBUILD_AFTER_INSTALL_python2=rm -rf {destdir}/usr/bin/
+#export PYBUILD_AFTER_INSTALL_python3=rm -rf {destdir}/usr/bin/
+export PYBUILD_INSTALL_ARGS_python2 = --install-scripts=/dev/null
+#export PYBUILD_INSTALL_ARGS_python3 = --install-scripts=/dev/null
+
 %:
-	dh $@ --with python2,python3 --buildsystem=pybuild
\ No newline at end of file
+	dh $@ --with python3,python2 --buildsystem=pybuild
+
+override_dh_auto_test:
+	# Do no thing as testing depends on python-verboselogs which is not yet
+	# packaged

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-coloredlogs.git



More information about the Python-modules-commits mailing list