Skip to content

Commit

Permalink
Merge pull request #2644 from smuzaffar/IB/CMSSW_8_1_X/gcc530
Browse files Browse the repository at this point in the history
updated frontier client to 2.8.20
  • Loading branch information
smuzaffar committed Nov 10, 2016
2 parents 332b31a + ec4579a commit c14bed0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
@@ -1,5 +1,5 @@
diff --git a/python/bin/frontier_simple_client.py b/python/bin/frontier_simple_client.py
new file mode 100755
new file mode 100644
index 0000000..ee8c7c2
--- /dev/null
+++ b/python/bin/frontier_simple_client.py
Expand Down Expand Up @@ -68,10 +68,10 @@ index 0000000..ee8c7c2
+
diff --git a/python/lib/frontier.py b/python/lib/frontier.py
new file mode 100644
index 0000000..b8ff547
index 0000000..c5824a1
--- /dev/null
+++ b/python/lib/frontier.py
@@ -0,0 +1,466 @@
@@ -0,0 +1,471 @@
+'''Frontier binding for Python.
+
+This module follows the Python Database API Specification v2.0, PEP 249 [1],
Expand Down Expand Up @@ -222,6 +222,8 @@ index 0000000..b8ff547
+
+ elif isinstance(parameter, int) or isinstance(parameter, long) or isinstance(parameter, float):
+ return str(parameter)
+ elif isinstance(parameter, datetime.datetime):
+ return "TO_TIMESTAMP('"+str(parameter.strftime("%Y-%m-%d %H %M %S"))+"','YYYY-MM-DD HH24 MI SS')"
+
+ raise ProgrammingError('Unsupported parameter type (%s).' % type(parameter))
+
Expand Down Expand Up @@ -315,8 +317,11 @@ index 0000000..b8ff547
+
+ elif isinstance(parameters, collections.Mapping):
+ for variable in variables:
+ operation = operation.replace(variable, _paramchar, 1)
+ final_parameters.append(parameters[variable[1:]])
+ if isinstance(parameters[variable[1:]],datetime.datetime):
+ operation = operation.replace(variable,_stringify(parameters[variable[1:]]))
+ else:
+ operation = operation.replace(variable, _paramchar, 1)
+ final_parameters.append(parameters[variable[1:]])
+
+ else:
+ raise ProgrammingError('Unsupported parameters type (%s).' % type(parameters))
Expand Down Expand Up @@ -726,7 +731,7 @@ index 0000000..1030967
+frontier_init()
+
diff --git a/python/test/frontier_test.py b/python/test/frontier_test.py
new file mode 100755
new file mode 100644
index 0000000..bf56a75
--- /dev/null
+++ b/python/test/frontier_test.py
Expand Down
4 changes: 2 additions & 2 deletions frontier_client.spec
@@ -1,12 +1,12 @@
### RPM external frontier_client 2.8.19
### RPM external frontier_client 2.8.20
## INITENV +PATH PYTHONPATH %{i}/python/lib

Source: http://frontier.cern.ch/dist/%{n}__%{realversion}__src.tar.gz
%define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac)
Requires: expat openssl pacparser python zlib

Patch0: frontier_client-2.8.5-fix-gcc47
Patch1: frontier_client-2.8.8-add-python-dbapi
Patch1: frontier_client-2.8.20-add-python-dbapi

%if "%{?cms_cxxflags:set}" != "set"
%define cms_cxxflags -std=c++0x -O2
Expand Down

0 comments on commit c14bed0

Please sign in to comment.