Hello community,

here is the log from the commit of package python-certbot-apache for 
openSUSE:Factory checked in at 2019-03-19 09:59:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-certbot-apache (Old)
 and      /work/SRC/openSUSE:Factory/.python-certbot-apache.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-certbot-apache"

Tue Mar 19 09:59:27 2019 rev:5 rq:685981 version:0.32.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-certbot-apache/python-certbot-apache.changes  
    2019-02-11 21:26:29.823044630 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-certbot-apache.new.28833/python-certbot-apache.changes
   2019-03-19 09:59:29.940076298 +0100
@@ -1,0 +2,9 @@
+Mon Mar 18 09:22:45 UTC 2019 - Marketa Calabkova <[email protected]>
+
+- update to version 0.32.0
+  * Apache plugin now respects CERTBOT_DOCS environment variable
+    when adding command line defaults.
+  * Tests execution for certbot, certbot-apache and certbot-nginx 
+    packages now relies on pytest.
+
+-------------------------------------------------------------------

Old:
----
  certbot-apache-0.31.0.tar.gz

New:
----
  certbot-apache-0.32.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-certbot-apache.spec ++++++
--- /var/tmp/diff_new_pack.rag1n4/_old  2019-03-19 09:59:31.492075675 +0100
+++ /var/tmp/diff_new_pack.rag1n4/_new  2019-03-19 09:59:31.532075659 +0100
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-certbot-apache
-Version:        0.31.0
+Version:        0.32.0
 Release:        0
 Summary:        Apache plugin for Certbot
 License:        Apache-2.0
@@ -28,6 +28,7 @@
 BuildRequires:  %{python_module augeas}
 BuildRequires:  %{python_module certbot >= 0.26.0}
 BuildRequires:  %{python_module mock}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module zope.component}
 BuildRequires:  %{python_module zope.interface}
@@ -57,7 +58,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec setup.py test
+%pytest
 
 %files %{python_files}
 %doc README.rst

++++++ certbot-apache-0.31.0.tar.gz -> certbot-apache-0.32.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-apache-0.31.0/PKG-INFO 
new/certbot-apache-0.32.0/PKG-INFO
--- old/certbot-apache-0.31.0/PKG-INFO  2019-02-07 22:20:43.000000000 +0100
+++ new/certbot-apache-0.32.0/PKG-INFO  2019-03-06 21:18:21.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: certbot-apache
-Version: 0.31.0
+Version: 0.32.0
 Summary: Apache plugin for Certbot
 Home-page: https://github.com/letsencrypt/letsencrypt
 Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-apache-0.31.0/certbot_apache/configurator.py 
new/certbot-apache-0.32.0/certbot_apache/configurator.py
--- old/certbot-apache-0.31.0/certbot_apache/configurator.py    2019-02-07 
22:20:29.000000000 +0100
+++ new/certbot-apache-0.32.0/certbot_apache/configurator.py    2019-03-06 
21:18:08.000000000 +0100
@@ -92,6 +92,11 @@
     """
 
     description = "Apache Web Server plugin"
+    if os.environ.get("CERTBOT_DOCS") == "1":
+        description += (  # pragma: no cover
+            " (Please note that the default values of the Apache plugin 
options"
+            " change depending on the operating system Certbot is run on.)"
+        )
 
     OS_DEFAULTS = dict(
         server_root="/etc/apache2",
@@ -141,28 +146,36 @@
         # When adding, modifying or deleting command line arguments, be sure to
         # include the changes in the list used in method _prepare_options() to
         # ensure consistent behavior.
-        add("enmod", default=cls.OS_DEFAULTS["enmod"],
+
+        # Respect CERTBOT_DOCS environment variable and use default values from
+        # base class regardless of the underlying distribution (overrides).
+        if os.environ.get("CERTBOT_DOCS") == "1":
+            DEFAULTS = ApacheConfigurator.OS_DEFAULTS
+        else:
+            # cls.OS_DEFAULTS can be distribution specific, see override 
classes
+            DEFAULTS = cls.OS_DEFAULTS
+        add("enmod", default=DEFAULTS["enmod"],
             help="Path to the Apache 'a2enmod' binary")
-        add("dismod", default=cls.OS_DEFAULTS["dismod"],
+        add("dismod", default=DEFAULTS["dismod"],
             help="Path to the Apache 'a2dismod' binary")
-        add("le-vhost-ext", default=cls.OS_DEFAULTS["le_vhost_ext"],
+        add("le-vhost-ext", default=DEFAULTS["le_vhost_ext"],
             help="SSL vhost configuration extension")
-        add("server-root", default=cls.OS_DEFAULTS["server_root"],
+        add("server-root", default=DEFAULTS["server_root"],
             help="Apache server root directory")
         add("vhost-root", default=None,
             help="Apache server VirtualHost configuration root")
-        add("logs-root", default=cls.OS_DEFAULTS["logs_root"],
+        add("logs-root", default=DEFAULTS["logs_root"],
             help="Apache server logs directory")
         add("challenge-location",
-            default=cls.OS_DEFAULTS["challenge_location"],
+            default=DEFAULTS["challenge_location"],
             help="Directory path for challenge configuration")
-        add("handle-modules", default=cls.OS_DEFAULTS["handle_modules"],
+        add("handle-modules", default=DEFAULTS["handle_modules"],
             help="Let installer handle enabling required modules for you " +
                  "(Only Ubuntu/Debian currently)")
-        add("handle-sites", default=cls.OS_DEFAULTS["handle_sites"],
+        add("handle-sites", default=DEFAULTS["handle_sites"],
             help="Let installer handle enabling sites for you " +
                  "(Only Ubuntu/Debian currently)")
-        add("ctl", default=cls.OS_DEFAULTS["ctl"],
+        add("ctl", default=DEFAULTS["ctl"],
             help="Full path to Apache control script")
         util.add_deprecated_argument(
             add, argument_name="init-script", nargs=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/certbot-apache-0.31.0/certbot_apache/tests/configurator_test.py 
new/certbot-apache-0.32.0/certbot_apache/tests/configurator_test.py
--- old/certbot-apache-0.31.0/certbot_apache/tests/configurator_test.py 
2019-02-07 22:20:29.000000000 +0100
+++ new/certbot-apache-0.32.0/certbot_apache/tests/configurator_test.py 
2019-03-06 21:18:08.000000000 +0100
@@ -115,6 +115,37 @@
         # Weak test..
         ApacheConfigurator.add_parser_arguments(mock.MagicMock())
 
+    def test_docs_parser_arguments(self):
+        os.environ["CERTBOT_DOCS"] = "1"
+        from certbot_apache.configurator import ApacheConfigurator
+        mock_add = mock.MagicMock()
+        ApacheConfigurator.add_parser_arguments(mock_add)
+        parserargs = ["server_root", "enmod", "dismod", "le_vhost_ext",
+                      "vhost_root", "logs_root", "challenge_location",
+                      "handle_modules", "handle_sites", "ctl"]
+        exp = dict()
+
+        for k in ApacheConfigurator.OS_DEFAULTS:
+            if k in parserargs:
+                exp[k.replace("_", "-")] = ApacheConfigurator.OS_DEFAULTS[k]
+        # Special cases
+        exp["vhost-root"] = None
+        exp["init-script"] = None
+
+        found = set()
+        for call in mock_add.call_args_list:
+            # init-script is a special case: deprecated argument
+            if call[0][0] != "init-script":
+                self.assertEqual(exp[call[0][0]], call[1]['default'])
+            found.add(call[0][0])
+
+        # Make sure that all (and only) the expected values exist
+        self.assertEqual(len(mock_add.call_args_list), len(found))
+        for e in exp:
+            self.assertTrue(e in found)
+
+        del os.environ["CERTBOT_DOCS"]
+
     def test_add_parser_arguments_all_configurators(self):  # pylint: 
disable=no-self-use
         from certbot_apache.entrypoint import OVERRIDE_CLASSES
         for cls in OVERRIDE_CLASSES.values():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/certbot-apache-0.31.0/certbot_apache.egg-info/PKG-INFO 
new/certbot-apache-0.32.0/certbot_apache.egg-info/PKG-INFO
--- old/certbot-apache-0.31.0/certbot_apache.egg-info/PKG-INFO  2019-02-07 
22:20:43.000000000 +0100
+++ new/certbot-apache-0.32.0/certbot_apache.egg-info/PKG-INFO  2019-03-06 
21:18:21.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: certbot-apache
-Version: 0.31.0
+Version: 0.32.0
 Summary: Apache plugin for Certbot
 Home-page: https://github.com/letsencrypt/letsencrypt
 Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-apache-0.31.0/setup.py 
new/certbot-apache-0.32.0/setup.py
--- old/certbot-apache-0.31.0/setup.py  2019-02-07 22:20:31.000000000 +0100
+++ new/certbot-apache-0.32.0/setup.py  2019-03-06 21:18:09.000000000 +0100
@@ -1,8 +1,10 @@
 from setuptools import setup
 from setuptools import find_packages
+from setuptools.command.test import test as TestCommand
+import sys
 
 
-version = '0.31.0'
+version = '0.32.0'
 
 # Remember to update local-oldest-requirements.txt when changing the minimum
 # acme/certbot version.
@@ -21,6 +23,22 @@
     'sphinx_rtd_theme',
 ]
 
+
+class PyTest(TestCommand):
+    user_options = []
+
+    def initialize_options(self):
+        TestCommand.initialize_options(self)
+        self.pytest_args = ''
+
+    def run_tests(self):
+        import shlex
+        # import here, cause outside the eggs aren't loaded
+        import pytest
+        errno = pytest.main(shlex.split(self.pytest_args))
+        sys.exit(errno)
+
+
 setup(
     name='certbot-apache',
     version=version,
@@ -64,4 +82,6 @@
         ],
     },
     test_suite='certbot_apache',
+    tests_require=["pytest"],
+    cmdclass={"test": PyTest},
 )


Reply via email to