[pytango] 06/09: prepare the 8.1.1 version
Frédéric-Emmanuel Picca
picca at moszumanska.debian.org
Thu Nov 28 07:43:05 UTC 2013
This is an automated email from the git hooks/post-receive script.
picca pushed a commit to branch master
in repository pytango.
commit e0f9a166e21af98d7a47d1d165f4ffc780581246
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date: Sat Nov 23 08:59:03 2013 +0100
prepare the 8.1.1 version
---
debian/changelog | 8 +
debian/control | 1 +
.../0001-fix-from-upstream-FTBFS-s390.patch | 346 ---------------------
debian/patches/series | 1 -
4 files changed, 9 insertions(+), 347 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index c559d73..397c9ba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pytango (8.1.1~rc1-1) UNRELEASED; urgency=low
+
+ * Imported Upstream version 8.1.1~rc1
+ * debian/patch
+ - 0001-fix-from-upstream-FTBFS-s390.patch (applyed by upstream)
+
+ -- Picca Frédéric-Emmanuel <picca at debian.org> Fri, 22 Nov 2013 20:27:22 +0100
+
pytango (8.0.3-3) unstable; urgency=low
* debian/control
diff --git a/debian/control b/debian/control
index 26d83c8..4ae4c06 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Priority: extra
Build-Depends: debhelper (>= 9),
libboost-python-dev,
libtango8-dev,
+ pkg-config,
python-all-dev,
python-numpy,
python3-all-dev,
diff --git a/debian/patches/0001-fix-from-upstream-FTBFS-s390.patch b/debian/patches/0001-fix-from-upstream-FTBFS-s390.patch
deleted file mode 100644
index 917ab9a..0000000
--- a/debian/patches/0001-fix-from-upstream-FTBFS-s390.patch
+++ /dev/null
@@ -1,346 +0,0 @@
-From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
-Date: Sun, 21 Jul 2013 08:44:52 +0200
-Subject: fix from upstream FTBFS s390
-
----
- doc/revision.rst | 5 ++
- src/boost/cpp/defs.h | 1 +
- src/boost/cpp/device_attribute.cpp | 54 ++++++++++++++++++-
- src/boost/cpp/device_attribute_numpy.hpp | 12 +++--
- src/boost/cpp/device_data.cpp | 1 +
- src/boost/cpp/server/encoded_attribute.cpp | 3 ++
- src/boost/cpp/server/tango_util.cpp | 2 +-
- src/boost/cpp/server/wattribute.cpp | 83 ++++++++++++++++++++++++++++++
- src/boost/python/release.py | 2 +-
- 9 files changed, 155 insertions(+), 8 deletions(-)
-
-diff --git a/doc/revision.rst b/doc/revision.rst
-index 939582e..95a1758 100644
---- a/doc/revision.rst
-+++ b/doc/revision.rst
-@@ -71,6 +71,8 @@ History of modifications:
- +----------+----------------------------------------------------------------------------------+-----------------------------------------------------+-----------------------+
- | 20/05/13 | `8.16 <http://www.tango-controls.org/static/PyTango/v803/doc/html/index.html>`_ | Update to PyTango 8.0.3 | T\. Coutinho |
- +----------+----------------------------------------------------------------------------------+-----------------------------------------------------+-----------------------+
-+| 09/07/13 | `8.17 <http://www.tango-controls.org/static/PyTango/v804/doc/html/index.html>`_ | Update to PyTango 8.0.4 | T\. Coutinho |
-++----------+----------------------------------------------------------------------------------+-----------------------------------------------------+-----------------------+
-
- .. _version-history:
-
-@@ -80,6 +82,9 @@ Version history
- +------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | version | Changes |
- +============+==============================================================================================================================================================================+
-+| 8.0.4 | Bug fixes: |
-+| | - `598: [pytango][8.0.3] failed to build from source on s390 <https://sourceforge.net/p/tango-cs/bugs/598/>`_ |
-++------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | 8.0.3 | Features: |
- | | - from sourceforge: |
- | | - `88: Implement Util::server_set_event_loop method in python <https://sourceforge.net/p/tango-cs/feature-requests/88>`_ |
-diff --git a/src/boost/cpp/defs.h b/src/boost/cpp/defs.h
-index 4f20c7c..8e1e5e2 100644
---- a/src/boost/cpp/defs.h
-+++ b/src/boost/cpp/defs.h
-@@ -56,6 +56,7 @@ namespace PyTango
- ExtractAsTuple,
- ExtractAsList,
- ExtractAsString,
-+ ExtractAsPyTango3,
- ExtractAsNothing
- };
-
-diff --git a/src/boost/cpp/device_attribute.cpp b/src/boost/cpp/device_attribute.cpp
-index c61ff74..810421d 100644
---- a/src/boost/cpp/device_attribute.cpp
-+++ b/src/boost/cpp/device_attribute.cpp
-@@ -400,6 +400,48 @@ namespace PyDeviceAttribute
- }
- }
-
-+ template<long tangoTypeConst>
-+ static inline void _update_array_values_as_pytango3(Tango::DeviceAttribute &self, bool isImage, object py_value)
-+ {
-+ typedef typename TANGO_const2type(tangoTypeConst) TangoScalarType;
-+ typedef typename TANGO_const2arraytype(tangoTypeConst) TangoArrayType;
-+
-+ // Extract the actual data from Tango::DeviceAttribute (self)
-+ TangoArrayType* value_ptr = 0;
-+ try {
-+ self >> value_ptr;
-+ } catch (Tango::DevFailed &e ) {
-+ if (strcmp(e.errors[0].reason.in(),"API_EmptyDeviceAttribute") != 0)
-+ throw;
-+ }
-+ std::auto_ptr<TangoArrayType> guard_value_ptr(value_ptr);
-+
-+ if (value_ptr == 0) {
-+ // Empty device attribute
-+ py_value.attr(value_attr_name) = boost::python::list();
-+ py_value.attr(w_value_attr_name) = object();
-+ return;
-+ }
-+
-+ TangoScalarType* buffer = value_ptr->get_buffer();
-+
-+ long sz = value_ptr->length();
-+ boost::python::list res;
-+ for (long x =0; x<sz; ++x) {
-+ res.append(python_tangocpp<tangoTypeConst>::to_python(buffer[x]));
-+ }
-+
-+ py_value.attr(value_attr_name) = res;
-+ py_value.attr(w_value_attr_name) = object();
-+ }
-+
-+ template<>
-+ inline void _update_array_values_as_pytango3<Tango::DEV_ENCODED>(Tango::DeviceAttribute &self, bool isImage, object py_value)
-+ {
-+ /// @todo DevEncoded didn't even exist in PyTango3...
-+ _update_array_values_as_tuples<Tango::DEV_ENCODED>(self, isImage, py_value);
-+ }
-+
- template<long tangoTypeConst> static void
- _update_array_values_as_tuples(Tango::DeviceAttribute &self, bool isImage,
- bopy::object py_value)
-@@ -534,6 +576,11 @@ namespace PyDeviceAttribute
- TANGO_CALL_ON_ATTRIBUTE_DATA_TYPE_ID(data_type,
- _update_value_as_string, self, py_value);
- break;
-+ case PyTango::ExtractAsPyTango3:
-+ TANGO_CALL_ON_ATTRIBUTE_DATA_TYPE_ID(data_type,
-+ _update_scalar_values, self, py_value);
-+ py_value.attr("w_scalar_value") = py_value.attr(w_value_attr_name);
-+ break;
- case PyTango::ExtractAsNothing:
- break;
- }
-@@ -579,6 +626,10 @@ namespace PyDeviceAttribute
- TANGO_CALL_ON_ATTRIBUTE_DATA_TYPE_ID(data_type,
- _update_value_as_string, self, py_value);
- break;
-+ case PyTango::ExtractAsPyTango3:
-+ TANGO_CALL_ON_ATTRIBUTE_DATA_TYPE_ID(data_type,
-+ _update_array_values_as_pytango3, self, is_image, py_value);
-+
- case PyTango::ExtractAsNothing:
- break;
- }
-@@ -624,7 +675,8 @@ namespace PyDeviceAttribute
- if (isImage) {
- for(CORBA::ULong y = 0; y < dim_y; ++y) {
- object py_sub = py_value[y];
-- if (len(py_sub) != dim_x)
-+ CORBA::ULong len_py_sub = static_cast<CORBA::ULong>(boost::python::len(py_sub));
-+ if (len_py_sub != dim_x)
- raise_(PyExc_TypeError, non_valid_image);
- for(CORBA::ULong x = 0; x < dim_x; ++x) {
- python_tangocpp<tangoTypeConst>::to_cpp(py_sub[x], buffer[x + y*dim_x]);
-diff --git a/src/boost/cpp/device_attribute_numpy.hpp b/src/boost/cpp/device_attribute_numpy.hpp
-index 9932620..b770771 100644
---- a/src/boost/cpp/device_attribute_numpy.hpp
-+++ b/src/boost/cpp/device_attribute_numpy.hpp
-@@ -239,16 +239,18 @@ namespace PyDeviceAttribute {
- // x and y position it corresponded! Yes, 'iter' has a coordinates
- // field, but it was always [0,0], never updated!!
- npy_intp coordinates[2];
-- Py_ssize_t &x = coordinates[1];
-- Py_ssize_t &y = coordinates[0];
-- for (y=0; y < dim_y; ++y) {
-- for (x=0; x < dim_x; ++x) {
-+ npy_intp &x = coordinates[1];
-+ npy_intp &y = coordinates[0];
-+ npy_intp ndim_x = static_cast<npy_intp>(dim_x);
-+ npy_intp ndim_y = static_cast<npy_intp>(dim_y);
-+ for (y=0; y < ndim_y; ++y) {
-+ for (x=0; x < ndim_x; ++x) {
- PyArray_ITER_GOTO(iter, coordinates);
-
- PyObject* dataObj = PyArray_GETITEM(array, iter->dataptr);
- const object py_data = object( handle<>( dataObj ) );
-
-- buffer[y*dim_x + x] = extract<TangoScalarType>(py_data);
-+ buffer[y*ndim_x + x] = extract<TangoScalarType>(py_data);
- }
- }
- } else {
-diff --git a/src/boost/cpp/device_data.cpp b/src/boost/cpp/device_data.cpp
-index 4d0a0bb..63f18ac 100644
---- a/src/boost/cpp/device_data.cpp
-+++ b/src/boost/cpp/device_data.cpp
-@@ -146,6 +146,7 @@ namespace PyDeviceData {
- return to_py_numpy<tangoArrayTypeConst>(tmp_ptr, py_self);
- # endif
- case PyTango::ExtractAsList:
-+ case PyTango::ExtractAsPyTango3:
- return to_py_list(tmp_ptr);
- case PyTango::ExtractAsTuple:
- return to_py_tuple(tmp_ptr);
-diff --git a/src/boost/cpp/server/encoded_attribute.cpp b/src/boost/cpp/server/encoded_attribute.cpp
-index bafa5d0..ade7d9c 100644
---- a/src/boost/cpp/server/encoded_attribute.cpp
-+++ b/src/boost/cpp/server/encoded_attribute.cpp
-@@ -844,6 +844,7 @@ namespace PyEncodedAttribute
- delete [] buffer;
- break;
- }
-+ case PyTango::ExtractAsPyTango3:
- case PyTango::ExtractAsList:
- {
- ret = PyList_New(height);
-@@ -981,6 +982,7 @@ namespace PyEncodedAttribute
- delete [] buffer;
- break;
- }
-+ case PyTango::ExtractAsPyTango3:
- case PyTango::ExtractAsList:
- {
- ret = PyList_New(height);
-@@ -1138,6 +1140,7 @@ namespace PyEncodedAttribute
- delete [] buffer;
- break;
- }
-+ case PyTango::ExtractAsPyTango3:
- case PyTango::ExtractAsList:
- {
- ret = PyList_New(height);
-diff --git a/src/boost/cpp/server/tango_util.cpp b/src/boost/cpp/server/tango_util.cpp
-index 506ad42..2513606 100644
---- a/src/boost/cpp/server/tango_util.cpp
-+++ b/src/boost/cpp/server/tango_util.cpp
-@@ -177,7 +177,7 @@ namespace PyUtil
- boost::python::object& py_event_loop)
- {
- PYTANGO_MOD
-- if (py_event_loop.is_none())
-+ if (py_event_loop.ptr() == Py_None)
- {
- self.server_set_event_loop(NULL);
- pytango.attr("_server_event_loop") = py_event_loop;
-diff --git a/src/boost/cpp/server/wattribute.cpp b/src/boost/cpp/server/wattribute.cpp
-index e12f4be..a85377f 100644
---- a/src/boost/cpp/server/wattribute.cpp
-+++ b/src/boost/cpp/server/wattribute.cpp
-@@ -436,6 +436,51 @@ namespace PyWAttribute
- /// @name get_write_value
- /// @{
-
-+ //
-+ // PyTango 3 compatibility
-+ //
-+
-+ template<long tangoTypeConst>
-+ void __get_write_value_pytango3(Tango::WAttribute &att, boost::python::list &seq)
-+ {
-+ typedef typename TANGO_const2type(tangoTypeConst) TangoScalarType;
-+
-+ const TangoScalarType *ptr;
-+
-+ long length = att.get_write_value_length();
-+
-+ att.get_write_value(ptr);
-+
-+ for (long l = 0; l < length; ++l)
-+ {
-+ seq.append(ptr[l]);
-+ }
-+ }
-+
-+ template<>
-+ void __get_write_value_pytango3<Tango::DEV_STRING>(Tango::WAttribute &att,
-+ boost::python::list &seq)
-+ {
-+ const Tango::ConstDevString *ptr;
-+
-+ long length = att.get_write_value_length();
-+
-+ att.get_write_value(ptr);
-+
-+ for (long l = 0; l < length; ++l)
-+ {
-+ seq.append(ptr[l]);
-+ }
-+ }
-+
-+ inline void get_write_value_pytango3(Tango::WAttribute &att,
-+ boost::python::list &value)
-+ {
-+ long type = att.get_data_type();
-+ TANGO_CALL_ON_ATTRIBUTE_DATA_TYPE_ID(type, __get_write_value_pytango3, att, value);
-+ }
-+
-+
- template<long tangoTypeConst>
- void __get_write_value_scalar(Tango::WAttribute &att, boost::python::object* obj)
- {
-@@ -455,6 +500,32 @@ namespace PyWAttribute
- }
-
- template<long tangoTypeConst>
-+ void __get_write_value_array_pytango3(Tango::WAttribute &att, boost::python::object* obj)
-+ {
-+ typedef typename TANGO_const2type(tangoTypeConst) TangoScalarType;
-+
-+ const TangoScalarType * buffer;
-+ att.get_write_value(buffer);
-+ size_t length = att.get_write_value_length();
-+
-+ boost::python::list o;
-+ for (size_t n = 0; n < length; ++n)
-+ o.append(buffer[n]);
-+ *obj = o;
-+ }
-+
-+ template<>
-+ void __get_write_value_array_pytango3<Tango::DEV_STRING>(Tango::WAttribute &att, boost::python::object* obj)
-+ {
-+ const Tango::ConstDevString *ptr;
-+ long length = att.get_write_value_length();
-+ att.get_write_value(ptr);
-+ boost::python::list o;
-+ for (long l = 0; l < length; ++l)
-+ o.append(ptr[l]);
-+ }
-+
-+ template<long tangoTypeConst>
- void __get_write_value_array_lists(Tango::WAttribute &att, boost::python::object* obj)
- {
- typedef typename TANGO_const2type(tangoTypeConst) TangoScalarType;
-@@ -534,6 +605,11 @@ namespace PyWAttribute
- TANGO_CALL_ON_ATTRIBUTE_DATA_TYPE_ID(type, __get_write_value_scalar, att, &value);
- } else {
- switch (extract_as) {
-+ case PyTango::ExtractAsPyTango3: {
-+ TANGO_CALL_ON_ATTRIBUTE_DATA_TYPE_ID(type,
-+ __get_write_value_array_pytango3, att, &value);
-+ break;
-+ }
- case PyTango::ExtractAsNumpy: {
- # ifndef DISABLE_PYTANGO_NUMPY
- TANGO_CALL_ON_ATTRIBUTE_DATA_TYPE_ID(type,
-@@ -587,6 +663,13 @@ void export_wattribute()
- .def("set_write_value",
- (void (*) (Tango::WAttribute &, boost::python::object &, long, long))
- &PyWAttribute::set_write_value)
-+
-+ // old style get_write_value
-+ .def("get_write_value",
-+ &PyWAttribute::get_write_value_pytango3,
-+ ( arg_("self"), arg_("empty_list")))
-+
-+ // new style get_write_value
- .def("get_write_value",
- &PyWAttribute::get_write_value,
- ( arg_("self"), arg_("extract_as")=PyTango::ExtractAsNumpy ))
-diff --git a/src/boost/python/release.py b/src/boost/python/release.py
-index 40e8af4..1280fd2 100644
---- a/src/boost/python/release.py
-+++ b/src/boost/python/release.py
-@@ -52,7 +52,7 @@ class Release:
- - keywords : (seq<str>) list of keywords
- - license : (str) the license"""
- name = 'PyTango'
-- version_info = (8, 0, 3, 'final', 0)
-+ version_info = (8, 0, 4, 'final', 0)
- version = '.'.join(map(str, version_info[:3]))
- version_long = version + ''.join(map(str, version_info[3:]))
- version_description = 'This version implements the C++ Tango 8.0 API.'
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index dca3b75..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-0001-fix-from-upstream-FTBFS-s390.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list