Hello community,

here is the log from the commit of package rpmlint for openSUSE:Factory checked 
in at 2016-06-12 18:52:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpmlint (Old)
 and      /work/SRC/openSUSE:Factory/.rpmlint.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rpmlint"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rpmlint/rpmlint.changes  2016-05-29 
03:06:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rpmlint.new/rpmlint.changes     2016-06-12 
18:52:51.000000000 +0200
@@ -1,0 +2,8 @@
+Fri May 27 15:27:28 UTC 2016 - alarr...@suse.com
+
+- add 0001-Fix-resolving-Python-source-from-3.5-.opt-12.pyc.patch:
+  Fixes FilesCheck to resolve correctly the python source file
+  from pyc files following PEP0488 (like *.{tag}.opt-[12].pyc).
+  (bsc#982076)
+
+-------------------------------------------------------------------

New:
----
  0001-Fix-resolving-Python-source-from-3.5-.opt-12.pyc.patch

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

Other differences:
------------------
++++++ rpmlint.spec ++++++
--- /var/tmp/diff_new_pack.IMsQj8/_old  2016-06-12 18:52:53.000000000 +0200
+++ /var/tmp/diff_new_pack.IMsQj8/_new  2016-06-12 18:52:53.000000000 +0200
@@ -114,6 +114,8 @@
 Patch62:        binaryinfo-speedup.diff
 Patch63:        0001-Avoid-messing-with-the-error-encoding-Fixes-61.patch
 Patch64:        omit_BUILDROOT_from_pyo_files.patch
+# PATCH-FIX-UPSTREAM 
0001-Fix-resolving-Python-source-from-3.5-.opt-12.pyc.patch alarr...@suse.com 
-- Fixes resolving python source from files generated following PEP0488
+Patch65:        0001-Fix-resolving-Python-source-from-3.5-.opt-12.pyc.patch
 # PATCHLIST END
 # BuildArch must at the end. is a bug: 
https://bugzilla.suse.com/show_bug.cgi?id=926766
 BuildArch:      noarch

++++++ 0001-Fix-resolving-Python-source-from-3.5-.opt-12.pyc.patch ++++++
>From 3b0286ba7f2192807b6d1eadf1fe7c46cc364854 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.sky...@iki.fi>
Date: Sun, 29 Nov 2015 22:13:14 +0200
Subject: [PATCH] Fix resolving Python source from 3.5 *.opt-[12].pyc

https://bugzilla.redhat.com/show_bug.cgi?id=1286382
---
 FilesCheck.py      |  2 +-
 test/test_files.py | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 test/test_files.py

diff --git a/FilesCheck.py b/FilesCheck.py
index 977b47f..76b8f89 100644
--- a/FilesCheck.py
+++ b/FilesCheck.py
@@ -211,7 +211,7 @@
 normal_zero_length_regex = 
re.compile('^/etc/security/console\.apps/|/\.nosearch$|/__init__\.py$')
 perl_regex = 
re.compile('^/usr/lib/perl5/(?:vendor_perl/)?([0-9]+\.[0-9]+)\.([0-9]+)/')
 python_regex = re.compile('^/usr/lib(?:64)?/python([.0-9]+)/')
-python_bytecode_regex_pep3147 = 
re.compile('^(.*)/__pycache__/(.*)\.(.*)(\.py[oc])$')
+python_bytecode_regex_pep3147 = 
re.compile('^(.*)/__pycache__/(.*?)\.([^.]+)(\.opt-[12])?\.py[oc]$')
 python_bytecode_regex = re.compile('^(.*)(\.py[oc])$')
 python_default_version = Config.getOption('PythonDefaultVersion', None)
 perl_version_trick = Config.getOption('PerlVersionTrick', True)
diff --git a/test/test_files.py b/test/test_files.py
new file mode 100644
index 0000000..84359d2
--- /dev/null
+++ b/test/test_files.py
@@ -0,0 +1,19 @@
+from FilesCheck import python_bytecode_to_script as pbts
+
+
+class TestPythonBytecodeToScript(object):
+
+    def test_pep3147(self):
+        assert 
pbts("/usr/lib64/python3.4/__pycache__/__phello__.foo.cpython-34.pyc") == 
"/usr/lib64/python3.4/__phello__.foo.py"
+        assert 
pbts("/usr/lib64/python3.4/__pycache__/__phello__.foo.cpython-34.pyo") == 
"/usr/lib64/python3.4/__phello__.foo.py"
+
+    def test_py2(self):
+        assert pbts("/usr/lib/python2.7/site-packages/_pytest/main.pyc") == 
"/usr/lib/python2.7/site-packages/_pytest/main.py"
+        assert pbts("/usr/lib/python2.7/site-packages/_pytest/main.pyo") == 
"/usr/lib/python2.7/site-packages/_pytest/main.py"
+
+    def test_pep0488(self):
+        assert 
pbts("/usr/lib/python3.5/site-packages/__pycache__/pytest.cpython-35.opt-1.pyc")
 == "/usr/lib/python3.5/site-packages/pytest.py"
+        assert 
pbts("/usr/lib/python3.5/site-packages/__pycache__/pytest.cpython-35.opt-2.pyc")
 == "/usr/lib/python3.5/site-packages/pytest.py"
+        assert 
pbts("/usr/lib/python3.5/site-packages/__pycache__/pytest.cpython-35.pyc") == 
"/usr/lib/python3.5/site-packages/pytest.py"
+
+# ex: ts=4 sw=4 et

Reply via email to