Changeset: b7fd0d4818a6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b7fd0d4818a6
Added Files:
testing/Mfilter.py
Removed Files:
testing/Mfilter.py.in
Modified Files:
MonetDB.spec
debian/monetdb-testing-python.install
testing/Makefile.ag
testing/Mtest.py.in
Branch: default
Log Message:
Mfilter.py does not have to be a separate program.
It's only used as imported module in Mtest.py.
diffs (134 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -920,7 +920,6 @@ developer, but if you do want to test, t
# %exclude %{_bindir}/*.pyc
# %exclude %{_bindir}/*.pyo
%{_bindir}/Mapprove.py
-%{_bindir}/Mfilter.py
%{_bindir}/Mtest.py
%dir %{python_sitelib}/MonetDBtesting
%{python_sitelib}/MonetDBtesting/*
diff --git a/debian/monetdb-testing-python.install
b/debian/monetdb-testing-python.install
--- a/debian/monetdb-testing-python.install
+++ b/debian/monetdb-testing-python.install
@@ -1,4 +1,3 @@
debian/tmp/usr/bin/Mapprove.py usr/bin
-debian/tmp/usr/bin/Mfilter.py usr/bin
debian/tmp/usr/bin/Mtest.py usr/bin
debian/tmp/usr/lib/python2.*/*-packages/MonetDBtesting/*
diff --git a/testing/Makefile.ag b/testing/Makefile.ag
--- a/testing/Makefile.ag
+++ b/testing/Makefile.ag
@@ -4,8 +4,7 @@
#
# Copyright 2008-2015 MonetDB B.V.
-EXTRA_DIST = Mtest.py.in Mtest.py.bat Mlog.in Mlog.bat Mfilter.py.in \
- MkillUsers.in testing_getopt.c
+EXTRA_DIST = testing_getopt.c
bin_Mdiff = {
SOURCES = difflib.c helpers.c Mdiff.c difflib.h helpers.h
@@ -28,18 +27,18 @@ scripts_bat = {
scripts_py = {
DIR = bindir
- SOURCES = Mtest.py Mfilter.py
+ SOURCES = Mtest.py.in
}
headers_python = {
HEADERS = py
DIR = $(prefix)/$(PYTHON2_LIBDIR)/MonetDBtesting
- SOURCES = trace.py process.py monet_options.py.in __init__.py
listexports.py.in exportutils.py malcheck.py
+ SOURCES = Mfilter.py trace.py process.py monet_options.py.in
__init__.py listexports.py.in exportutils.py malcheck.py
}
scripts_sh = {
COND = NOT_WIN32
EXT = ""
DIR = bindir
- SOURCES = Mlog MkillUsers
+ SOURCES = Mlog.in MkillUsers.in
}
diff --git a/testing/Mfilter.py.in b/testing/Mfilter.py
rename from testing/Mfilter.py.in
rename to testing/Mfilter.py
--- a/testing/Mfilter.py.in
+++ b/testing/Mfilter.py
@@ -1,5 +1,3 @@
-#!@PYTHON2@
-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -9,7 +7,6 @@
import sys
import os
import re
-##import time
#############################################################################
# FUNCTIONS
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -30,10 +30,22 @@ import time
import socket
import struct
import signal
-import Mfilter
import fnmatch
import glob
+try:
+ import Mfilter
+except ImportError:
+ try:
+ import MonetDBtesting.Mfilter as Mfilter
+ except ImportError:
+ p = _configure(os.path.join('@QXprefix@', '@QXPYTHON2_LIBDIR@'))
+ sys.path.insert(0, p)
+ import MonetDBtesting.Mfilter as Mfilter
+ if os.environ.has_key('PYTHONPATH'):
+ p += os.pathsep + os.environ['PYTHONPATH']
+ os.environ['PYTHONPATH'] = p
+
procdebug = False
verbose = False
quiet = False
@@ -114,15 +126,7 @@ def _configure(str):
try:
import process
except ImportError:
- try:
- import MonetDBtesting.process as process
- except ImportError:
- p = _configure(os.path.join('@QXprefix@', '@QXPYTHON2_LIBDIR@'))
- sys.path.insert(0, p)
- import MonetDBtesting.process as process
- if os.environ.has_key('PYTHONPATH'):
- p += os.pathsep + os.environ['PYTHONPATH']
- os.environ['PYTHONPATH'] = p
+ import MonetDBtesting.process as process
# Replace os.fork by a version that forks but also sets the process
# group in the child. This is done so that we can easily kill a
@@ -248,15 +252,7 @@ def CheckExec(cmd) :
try:
import monet_options
except ImportError:
- try:
- from MonetDBtesting import monet_options
- except ImportError:
- p = _configure(os.path.join('@QXprefix@', '@QXPYTHON2_LIBDIR@'))
- sys.path.insert(0, p)
- from MonetDBtesting import monet_options
- if os.environ.has_key('PYTHONPATH'):
- p += os.pathsep + os.environ['PYTHONPATH']
- os.environ['PYTHONPATH'] = p
+ from MonetDBtesting import monet_options
import threading
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list