]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm.macros
- py_lint: fix files counting
[packages/rpm-build-macros.git] / rpm.macros
index c04033a6d5a5ac176d9b7048bdce50d258858a9c..5b816901c6a35700e64b8f41b4da0c131cb9fe0a 100644 (file)
@@ -254,9 +254,9 @@ CPPFLAGS="${CPPFLAGS:-%{rpmcppflags}}" \\\
        -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
        -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
        -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
-       -DCMAKE_CXX_FLAGS_PLD="${CXXFLAGS:-%{rpmcxxflags}}" \\\
-       -DCMAKE_C_FLAGS_PLD="${CFLAGS:-%{rpmcflags}}" \\\
-       -DCMAKE_Fortran_FLAGS_PLD="${CFLAGS:-%{rpmcflags}}" \\\
+       -DCMAKE_CXX_FLAGS_PLD="${CXXFLAGS:-%{rpmcxxflags} -DNDEBUG}" \\\
+       -DCMAKE_C_FLAGS_PLD="${CFLAGS:-%{rpmcflags} -DNDEBUG}" \\\
+       -DCMAKE_Fortran_FLAGS_PLD="${CFLAGS:-%{rpmcflags} -DNDEBUG}" \\\
        -DCMAKE_EXE_LINKER_FLAGS_PLD="${LDFLAGS:-%{rpmldflags}}" \\\
        -DCMAKE_SHARED_LINKER_FLAGS_PLD="${LDFLAGS:-%{rpmldflags}}" \\\
        -DCMAKE_MODULE_LINKER_FLAGS_PLD="${LDFLAGS:-%{rpmldflags}}" \\\
@@ -1867,13 +1867,14 @@ import compiler \
 \
 found = err = 0\
 for f in sys.stdin: \
-       fd = open(f.strip()) \
+       fd = open(f.rstrip()) \
        c = fd.read() \
        fd.close() \
+       found = found + 1 \
        try: \
                compiler.parse(c) \
        except SyntaxError, e: \
-               print "py_lint: %s: %s" % (f.strip(), e) \
+               print "py_lint: %s: %s" % (f.rstrip(), e) \
                err = err + 1\
 \
 if not found:\
@@ -1883,7 +1884,7 @@ elif err: \
        print >> sys.stderr, "\\npy_lint: ERROR: Syntax errors in %d files.\\n" % err \
        sys.exit(1) \
 else: \
-       print >> sys.stderr,  "py_lint: Found no syntax errors." \
+       print >> sys.stderr,  "py_lint: %d files scanned, found no syntax errors." % found \
 ' \
 }; __py_lint %* \
 %{nil}
This page took 0.030925 seconds and 4 git commands to generate.