import os
os.environ['SETUPTOOLS_SCM_DEBUG'] = '1'


def pytest_report_header():
    import pkg_resources
    version = pkg_resources.get_distribution('setuptools_scm').version
    return ['setuptools_scm version ' + version]

@@ -44,17 +44,64 @@
 %5D = '1'%0A
+VERSION_PKGS = %5B'setuptools', 'setuptools_scm'%5D
 %0A
-
 %0Adef pyt
@@ -154,120 +154,172 @@
     
-version = pkg_resources.get_distribution('setuptools_scm').version%0A    return %5B'setuptools_scm version ' + version%5D
+res = %5B%5D%0A    for pkg in VERSION_PKGS:%0A        version = pkg_resources.get_distribution(pkg).version%0A        res.append('%25s version %25s' %25 (pkg, version))%0A    return res
 %0A

extend reporting for pytest