Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated frontier client to 2.8.20 #2644

Merged
merged 2 commits into from Nov 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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