From 4ce2d5b9956a2bdb20bf0166c6000d34789e0074 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Oct 29 2013 17:22:37 +0000 Subject: Fix setup.py install --- diff --git a/0001-HTML-Formatter.patch b/0001-HTML-Formatter.patch index 554e8e7..23258ca 100644 --- a/0001-HTML-Formatter.patch +++ b/0001-HTML-Formatter.patch @@ -1,43 +1,7 @@ -From db502e2a1f34a9199503a63c430b3c60a196bb67 Mon Sep 17 00:00:00 2001 -From: Vadim Rutkovsky -Date: Tue, 4 Jun 2013 12:23:27 +0200 -Subject: [PATCH] HTML Formatter - ---- - .travis.yml | 2 +- - behave/compat/collections.py | 185 +++++++++ - behave/configuration.py | 1 + - behave/formatter/formatters.py | 1 + - behave/formatter/html.py | 311 +++++++++++++++ - behave/formatter/report.css | 212 ++++++++++ - behave/runner.py | 5 + - features/formatter.help.feature | 1 + - features/formatter.html.feature | 822 +++++++++++++++++++++++++++++++++++++++ - issue.features/issue0031.feature | 11 + - setup.py | 1 + - 11 files changed, 1551 insertions(+), 1 deletion(-) - create mode 100644 behave/formatter/html.py - create mode 100644 behave/formatter/report.css - create mode 100644 features/formatter.html.feature - -diff --git a/.travis.yml b/.travis.yml -index b874d85..b91e7c5 100644 ---- a/.travis.yml -+++ b/.travis.yml -@@ -5,7 +5,7 @@ python: - - pypy - - install: -- - pip install --use-mirrors -q mock nose PyHamcrest -+ - pip install --use-mirrors -q mock nose PyHamcrest lxml - - python setup.py -q install - script: - - python --version -diff --git a/behave/compat/collections.py b/behave/compat/collections.py -index 530578c..cc27448 100644 ---- a/behave/compat/collections.py -+++ b/behave/compat/collections.py -@@ -18,3 +18,188 @@ except ImportError: # pragma: no cover +diff -up behave-1.2.3/behave/compat/collections.py.HTMLformatter behave-1.2.3/behave/compat/collections.py +--- behave-1.2.3/behave/compat/collections.py.HTMLformatter 2013-04-19 22:35:23.000000000 +0200 ++++ behave-1.2.3/behave/compat/collections.py 2013-10-29 18:17:28.944010009 +0100 +@@ -18,3 +18,188 @@ except ImportError: # pragma: no cov warnings.warn(message) # -- BACKWARD-COMPATIBLE: Better than nothing (for behave use case). OrderedDict = dict @@ -226,10 +190,9 @@ index 530578c..cc27448 100644 + if newcount > 0: + result[elem] = newcount + return result -diff --git a/behave/configuration.py b/behave/configuration.py -index 7dffc1d..807fec1 100644 ---- a/behave/configuration.py -+++ b/behave/configuration.py +diff -up behave-1.2.3/behave/configuration.py.HTMLformatter behave-1.2.3/behave/configuration.py +--- behave-1.2.3/behave/configuration.py.HTMLformatter 2013-07-03 21:51:08.000000000 +0200 ++++ behave-1.2.3/behave/configuration.py 2013-10-29 18:17:28.944010009 +0100 @@ -4,6 +4,7 @@ import os import re import sys @@ -238,10 +201,9 @@ index 7dffc1d..807fec1 100644 import ConfigParser from behave.reporter.junit import JUnitReporter -diff --git a/behave/formatter/formatters.py b/behave/formatter/formatters.py -index 6b4a1f3..cb0d9f5 100644 ---- a/behave/formatter/formatters.py -+++ b/behave/formatter/formatters.py +diff -up behave-1.2.3/behave/formatter/formatters.py.HTMLformatter behave-1.2.3/behave/formatter/formatters.py +--- behave-1.2.3/behave/formatter/formatters.py.HTMLformatter 2013-06-27 00:19:16.000000000 +0200 ++++ behave-1.2.3/behave/formatter/formatters.py 2013-10-29 18:17:28.945010011 +0100 @@ -76,6 +76,7 @@ def setup_formatters(): register_as(_L("behave.formatter.steps:StepsUsageFormatter"), "steps.usage") register_as(_L("behave.formatter.sphinx_steps:SphinxStepsFormatter"), @@ -250,11 +212,9 @@ index 6b4a1f3..cb0d9f5 100644 # ----------------------------------------------------------------------------- -diff --git a/behave/formatter/html.py b/behave/formatter/html.py -new file mode 100644 -index 0000000..800e4b6 ---- /dev/null -+++ b/behave/formatter/html.py +diff -up behave-1.2.3/behave/formatter/html.py.HTMLformatter behave-1.2.3/behave/formatter/html.py +--- behave-1.2.3/behave/formatter/html.py.HTMLformatter 2013-10-29 18:17:28.945010011 +0100 ++++ behave-1.2.3/behave/formatter/html.py 2013-10-29 18:17:28.945010011 +0100 @@ -0,0 +1,311 @@ +from behave.formatter.base import Formatter +import lxml.etree as ET @@ -502,7 +462,7 @@ index 0000000..800e4b6 + + def valid_XML_char_ordinal(i): + return ( # conditions ordered by presumed frequency -+ 0x20 <= i <= 0xD7FF ++ 0x20 <= i <= 0xD7FF + or i in (0x9, 0xA, 0xD) + or 0xE000 <= i <= 0xFFFD + or 0x10000 <= i <= 0x10FFFF @@ -567,11 +527,9 @@ index 0000000..800e4b6 + # Sending the report to stream + if len(self.all_features) > 0: + self.stream.write(ET.tostring(self.html, pretty_print = True)) -diff --git a/behave/formatter/report.css b/behave/formatter/report.css -new file mode 100644 -index 0000000..5d9bd0a ---- /dev/null -+++ b/behave/formatter/report.css +diff -up behave-1.2.3/behave/formatter/report.css.HTMLformatter behave-1.2.3/behave/formatter/report.css +--- behave-1.2.3/behave/formatter/report.css.HTMLformatter 2013-10-29 18:17:28.945010011 +0100 ++++ behave-1.2.3/behave/formatter/report.css 2013-10-29 18:17:28.945010011 +0100 @@ -0,0 +1,212 @@ +body { + font-size: 0px; @@ -785,10 +743,9 @@ index 0000000..5d9bd0a +.behave #summary #totals, td #summary #totals, th #summary #totals { + font-size: 1.2em; +} -diff --git a/behave/runner.py b/behave/runner.py -index ac5591f..3ee833f 100644 ---- a/behave/runner.py -+++ b/behave/runner.py +diff -up behave-1.2.3/behave/runner.py.HTMLformatter behave-1.2.3/behave/runner.py +--- behave-1.2.3/behave/runner.py.HTMLformatter 2013-06-26 22:21:00.000000000 +0200 ++++ behave-1.2.3/behave/runner.py 2013-10-29 18:17:28.945010011 +0100 @@ -241,6 +241,11 @@ class Context(object): return True return False @@ -801,23 +758,20 @@ index ac5591f..3ee833f 100644 def execute_steps(self, steps_text): '''The steps identified in the "steps" text string will be parsed and executed in turn just as though they were defined in a feature file. -diff --git a/features/formatter.help.feature b/features/formatter.help.feature -index 09be4ec..fda8cf0 100644 ---- a/features/formatter.help.feature -+++ b/features/formatter.help.feature +diff -up behave-1.2.3/features/formatter.help.feature.HTMLformatter behave-1.2.3/features/formatter.help.feature +--- behave-1.2.3/features/formatter.help.feature.HTMLformatter 2013-06-27 00:19:16.000000000 +0200 ++++ behave-1.2.3/features/formatter.help.feature 2013-10-29 18:17:28.946010012 +0100 @@ -11,6 +11,7 @@ Feature: Help Formatter And the command output should contain: """ Available formatters: -+ html Very basic HTML formatter ++ html Very basic HTML formatter json JSON dump of test run json.pretty JSON dump of test run (human readable) null Provides formatter that does not output anything. -diff --git a/features/formatter.html.feature b/features/formatter.html.feature -new file mode 100644 -index 0000000..e8550a9 ---- /dev/null -+++ b/features/formatter.html.feature +diff -up behave-1.2.3/features/formatter.html.feature.HTMLformatter behave-1.2.3/features/formatter.html.feature +--- behave-1.2.3/features/formatter.html.feature.HTMLformatter 2013-10-29 18:17:28.946010012 +0100 ++++ behave-1.2.3/features/formatter.html.feature 2013-10-29 18:17:28.946010012 +0100 @@ -0,0 +1,822 @@ +@sequential +Feature: HTML Formatter @@ -1641,43 +1595,15 @@ index 0000000..e8550a9 + + + """ -diff --git a/issue.features/issue0031.feature b/issue.features/issue0031.feature -index 8f1b493..a0abb1c 100644 ---- a/issue.features/issue0031.feature -+++ b/issue.features/issue0031.feature -@@ -8,9 +8,20 @@ Feature: Issue #31 "behave --format help" raises an error - And the command output should contain: - """ - Available formatters: -+ html Very basic HTML formatter - json JSON dump of test run - json.pretty JSON dump of test run (human readable) - null Provides formatter that does not output anything. - plain Very basic formatter with maximum compatibility - pretty Standard colourised pretty formatter -+ progress Shows dotted progress for each executed scenario. -+ progress2 Shows dotted progress for each executed step. -+ progress3 Shows detailed progress for each step of a scenario. -+ rerun Emits scenario file locations of failing scenarios -+ sphinx.steps Generate sphinx-based documentation for step definitions. -+ steps Shows step definitions (step implementations). -+ steps.doc Shows documentation for step definitions. -+ steps.usage Shows how step definitions are used by steps. -+ tags Shows tags (and how often they are used). -+ tags.location Shows tags and the location where they are used. - """ -diff --git a/setup.py b/setup.py -index 65ea047..67941f1 100644 ---- a/setup.py -+++ b/setup.py -@@ -27,6 +27,7 @@ setup( +diff -up behave-1.2.3/setup.py.HTMLformatter behave-1.2.3/setup.py +--- behave-1.2.3/setup.py.HTMLformatter 2013-07-08 22:31:19.000000000 +0200 ++++ behave-1.2.3/setup.py 2013-10-29 18:19:01.800131040 +0100 +@@ -27,6 +27,8 @@ setup( entry_points={ 'console_scripts': ['behave = behave.__main__:main'], }, -+ data_files=[('behave/formatter/', ['behave/formatter/report.css'])], ++ package_data={'': ['report.css']}, ++ include_package_data=True, install_requires=requirements, use_2to3=True, license="BSD", --- -1.8.3.1 -