[cmor] 153/190: WIP: testing python3

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Jul 21 12:54:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository cmor.

commit 246a26a8c2100c66ccd00b730b8a53dfb07431f3
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Thu Jun 13 17:09:53 2013 +0100

    WIP: testing python3
---
 debian/control                                     | 21 +++++----
 ...{libcmor2.symbols => libcmor2.symbols.dont_use} |  0
 debian/patches/python3.patch                       | 51 +++++++++++-----------
 debian/rules                                       |  9 ++--
 4 files changed, 41 insertions(+), 40 deletions(-)

diff --git a/debian/control b/debian/control
index 3ca5c60..56cd2e1 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,7 @@ Depends: ${misc:Depends}, ${shlibs:Depends}
 Recommends: cmip5-cmor-tables (>= 1.3.9-1)
 Description: Climate Model Output Rewriter library
  The "Climate Model Output Rewriter" (CMOR, pronounced "Seymour") 
- comprises a set of C-based functions, with bindings to both python 
+ comprises a set of C-based functions, with bindings to both Python 
  and FORTRAN 90, that can be used to produce CF-compliant netCDF files 
  that fulfill the requirements of many of the climate community's 
  standard model experiments. These experiments are collectively 
@@ -33,13 +33,12 @@ Depends: libcmor2 ( = ${binary:Version}), ${misc:Depends}
 Recommends: pkg-config
 Description: Development files for Climate Model Output Rewriter
  The "Climate Model Output Rewriter" (CMOR, pronounced "Seymour") 
- comprises a set of C-based functions, with bindings to both python 
- and FORTRAN 90, that can be used to produce CF-compliant netCDF files 
+ comprises a set of C-based functions, with bindings to both Python 
+ and FORTRAN 90, that can be used to produce CF-compliant netCDF files.
  that fulfill the requirements of many of the climate community's 
- standard model experiments. These experiments are collectively 
- referred to as MIP's and include, for example, AMIP, CMIP, CFMIP, 
- PMIP, APE, and IPCC scenario runs. The output resulting from CMOR 
- is "self-describing" and facilitates analysis of results across models.
+ standard model experiments.
+ .
+ This package contains files needed to build and link against the CMOR library.
 
 Package: python-cmor
 Section: python
@@ -47,8 +46,8 @@ Architecture: any
 Multi-Arch: foreign
 Depends: ${pydeb:Depends}, ${python:Depends}, ${misc:Depends}, ${shlibs:Depends}
 Provides: ${python:Provides}
-Description: python interface to CMOR
- This is a python interface to CMOR, the Climate Model Output Rewriter.
+Description: Python interface to CMOR
+ This is a Python interface to CMOR, the Climate Model Output Rewriter.
 
 Package: python3-cmor
 Section: python
@@ -56,5 +55,5 @@ Architecture: any
 Multi-Arch: foreign
 Depends: ${py3deb:Depends}, ${python3:Depends}, ${misc:Depends}, ${shlibs:Depends}
 Provides: ${python3:Provides}
-Description: python3 interface to CMOR
- This is a python3 interface to CMOR, the Climate Model Output Rewriter.
+Description: Python3 interface to CMOR
+ This is a Python3 interface to CMOR, the Climate Model Output Rewriter.
diff --git a/debian/libcmor2.symbols b/debian/libcmor2.symbols.dont_use
similarity index 100%
rename from debian/libcmor2.symbols
rename to debian/libcmor2.symbols.dont_use
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
index ed9f10f..f8951b2 100644
--- a/debian/patches/python3.patch
+++ b/debian/patches/python3.patch
@@ -5,8 +5,8 @@ Forwarded: no
 
 Index: cmor-2.8.3/Lib/git2svn.py
 ===================================================================
---- cmor-2.8.3.orig/Lib/git2svn.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Lib/git2svn.py	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/Lib/git2svn.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Lib/git2svn.py	2013-06-13 16:53:22.000000000 +0100
 @@ -1,3 +1,4 @@
 +from __future__ import print_function
  import os,sys
@@ -33,8 +33,8 @@ Index: cmor-2.8.3/Lib/git2svn.py
      os.popen(cmd).readlines()
 Index: cmor-2.8.3/Lib/pywrapper.py
 ===================================================================
---- cmor-2.8.3.orig/Lib/pywrapper.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Lib/pywrapper.py	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/Lib/pywrapper.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Lib/pywrapper.py	2013-06-13 16:53:22.000000000 +0100
 @@ -1,4 +1,3 @@
 -
  import cmor_const,numpy,os,_cmor
@@ -708,8 +708,8 @@ Index: cmor-2.8.3/Lib/pywrapper.py
          if (file_name is False):
 Index: cmor-2.8.3/Lib/__init__.py
 ===================================================================
---- cmor-2.8.3.orig/Lib/__init__.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Lib/__init__.py	2013-06-13 15:21:03.000000000 +0100
+--- cmor-2.8.3.orig/Lib/__init__.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Lib/__init__.py	2013-06-13 17:07:11.000000000 +0100
 @@ -1,9 +1,9 @@
 -from cmor_const import *
 -
@@ -728,8 +728,8 @@ Index: cmor-2.8.3/Lib/__init__.py
    pass
 Index: cmor-2.8.3/Lib/check_CMOR_compliant.py
 ===================================================================
---- cmor-2.8.3.orig/Lib/check_CMOR_compliant.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Lib/check_CMOR_compliant.py	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/Lib/check_CMOR_compliant.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Lib/check_CMOR_compliant.py	2013-06-13 16:53:22.000000000 +0100
 @@ -1,3 +1,4 @@
 +from __future__ import print_function
  import cdms2
@@ -1152,8 +1152,8 @@ Index: cmor-2.8.3/Lib/check_CMOR_compliant.py
             
 Index: cmor-2.8.3/Test/check_results.py
 ===================================================================
---- cmor-2.8.3.orig/Test/check_results.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Test/check_results.py	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/Test/check_results.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Test/check_results.py	2013-06-13 16:53:22.000000000 +0100
 @@ -1,3 +1,4 @@
 +from __future__ import print_function
  from out_files import out
@@ -1203,8 +1203,8 @@ Index: cmor-2.8.3/Test/check_results.py
 +    raise CMORResultCheckError(["Error checking output files for test: Test/%s.f90 we could only find %i files when %i were expected.\n\n Expected files: \n\t%s\n\nPresent files: \n\t%s\n\nMissing files: \n\t%s\n" % (test,nfiles,len(outfiles),repr(outfiles),repr(gotfiles),repr(missing)),])
 Index: cmor-2.8.3/Test/cmor_speed_and_compression_01.py
 ===================================================================
---- cmor-2.8.3.orig/Test/cmor_speed_and_compression_01.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Test/cmor_speed_and_compression_01.py	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/Test/cmor_speed_and_compression_01.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Test/cmor_speed_and_compression_01.py	2013-06-13 16:53:22.000000000 +0100
 @@ -1,11 +1,13 @@
 +from __future__ import print_function 
  import cmor,numpy,sys,os
@@ -1282,8 +1282,8 @@ Index: cmor-2.8.3/Test/cmor_speed_and_compression_01.py
  f.close()
 Index: cmor-2.8.3/setup.py.in
 ===================================================================
---- cmor-2.8.3.orig/setup.py.in	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/setup.py.in	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/setup.py.in	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/setup.py.in	2013-06-13 16:53:22.000000000 +0100
 @@ -1,8 +1,10 @@
 +from __future__ import print_function # to be python2/python3 agnostic
  import numpy
@@ -1316,8 +1316,8 @@ Index: cmor-2.8.3/setup.py.in
         version='2.0',
 Index: cmor-2.8.3/Test/cmor_speed_and_compression_02.py
 ===================================================================
---- cmor-2.8.3.orig/Test/cmor_speed_and_compression_02.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Test/cmor_speed_and_compression_02.py	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/Test/cmor_speed_and_compression_02.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Test/cmor_speed_and_compression_02.py	2013-06-13 16:53:22.000000000 +0100
 @@ -1,8 +1,9 @@
 +from __future__ import print_function
  import cmor,numpy,sys,os
@@ -1390,8 +1390,8 @@ Index: cmor-2.8.3/Test/cmor_speed_and_compression_02.py
  f.close()
 Index: cmor-2.8.3/Test/cmor_speed_and_compression.py
 ===================================================================
---- cmor-2.8.3.orig/Test/cmor_speed_and_compression.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Test/cmor_speed_and_compression.py	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/Test/cmor_speed_and_compression.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Test/cmor_speed_and_compression.py	2013-06-13 16:53:22.000000000 +0100
 @@ -1,3 +1,4 @@
 +from __future__ import print_function
  import cmor,numpy,sys,os
@@ -1453,8 +1453,8 @@ Index: cmor-2.8.3/Test/cmor_speed_and_compression.py
  f.close()
 Index: cmor-2.8.3/Test/jamie_hybrid_height.py
 ===================================================================
---- cmor-2.8.3.orig/Test/jamie_hybrid_height.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Test/jamie_hybrid_height.py	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/Test/jamie_hybrid_height.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Test/jamie_hybrid_height.py	2013-06-13 16:53:22.000000000 +0100
 @@ -1,5 +1,5 @@
  #!/usr/bin/env python
 -
@@ -1491,8 +1491,8 @@ Index: cmor-2.8.3/Test/jamie_hybrid_height.py
      
 Index: cmor-2.8.3/Test/nc2asc.py
 ===================================================================
---- cmor-2.8.3.orig/Test/nc2asc.py	2013-06-13 15:09:42.000000000 +0100
-+++ cmor-2.8.3/Test/nc2asc.py	2013-06-13 15:09:42.000000000 +0100
+--- cmor-2.8.3.orig/Test/nc2asc.py	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Test/nc2asc.py	2013-06-13 16:53:22.000000000 +0100
 @@ -1,5 +1,5 @@
  #!/usr/bin/env python
 -
@@ -1584,14 +1584,15 @@ Index: cmor-2.8.3/Test/nc2asc.py
  f.close()
 Index: cmor-2.8.3/Src/_cmormodule.c
 ===================================================================
---- cmor-2.8.3.orig/Src/_cmormodule.c	2013-06-12 18:03:44.000000000 +0100
-+++ cmor-2.8.3/Src/_cmormodule.c	2013-06-13 15:24:02.000000000 +0100
-@@ -2,6 +2,11 @@
+--- cmor-2.8.3.orig/Src/_cmormodule.c	2013-06-13 16:11:43.000000000 +0100
++++ cmor-2.8.3/Src/_cmormodule.c	2013-06-13 17:07:39.000000000 +0100
+@@ -2,6 +2,12 @@
  #include "numpy/arrayobject.h"
  #include "cmor.h"
  
 +#if PY_MAJOR_VERSION >= 3
 +#define PyInt_AsLong PyLong_AsLong
++#define PyInt_FromLong PyLong_FromLong
 +#define PyString_AsString PyBytes_AsString
 +#endif
 +
diff --git a/debian/rules b/debian/rules
index ffabb74..e75047e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,10 +6,10 @@
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
 
-# DEB_BUILD_MAINT_OPTIONS:= hardening=+all
+#DEB_BUILD_MAINT_OPTIONS:= hardening=+all
 DEB_CFLAGS_MAINT_APPEND:= -Wall 
 export DEB_BUILD_MAINT_OPTIONS
-export DEB_CFLAGS_MAINT_APPEND
+#export DEB_CFLAGS_MAINT_APPEND
 
 BUILD_ARCH_OS :-= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
 BUILD_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
@@ -26,7 +26,8 @@ override_dh_auto_configure:
 	ln -sf  /usr/share/misc/config.sub 
 	dh_auto_configure -- --disable-color --enable-verbose-test  --with-uuid --without-python \
 		UUIDLDFLAGS="-lossp-uuid" UUIDFLAGS="-I/usr/include/ossp" SZLIBFLAGS=nosz \
-		CFLAGS="$(CFLAGS)" LDFLAGS=$(LDFLAGS)"
+		CFLAGS="-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security  $(CPPFLAGS) $(CFLAGS)" \
+                LDFLAGS="$(LDFLAGS)"
 
 override_dh_auto_clean:
 	rm -rf config.sub config.log config.status libcmor.a libcmor.so.2 build test_grid configure CMIP5
@@ -57,7 +58,7 @@ override_dh_auto_install:
 		$$p ./setup.py install  --prefix=$(DESTDIR)/usr ; \
 		done
 	dh_install -p libcmor2 libcmor.so.2    $(LIBDIR)
-	dh_install -p libcmor-dev debian/tmp/usr/lib/libcmor.a $(LIBDIR)
+	dh_install -p libcmor-dev libcmor.a $(LIBDIR)
 	dh_install -p libcmor-dev cmor.pc  $(LIBDIR)/pkgconfig
 	dh_link -p libcmor-dev $(LIBDIR)/libcmor.so.2   $(LIBDIR)/libcmor.so
 	dh_numpy

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cmor.git



More information about the debian-science-commits mailing list