[adios] 02/02: WIP: update patch and rules
Alastair McKinstry
mckinstry at moszumanska.debian.org
Thu Aug 20 06:38:42 UTC 2015
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository adios.
commit 5fe9479d9abc9b9557feb0abe8c64d526593bd05
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Mon Aug 17 09:45:10 2015 +0100
WIP: update patch and rules
---
debian/patches/mpi4py_fix.patch | 2 +-
debian/patches/py3.patch | 159 ++++++++++++++++++++--------------------
debian/rules | 7 +-
3 files changed, 87 insertions(+), 81 deletions(-)
diff --git a/debian/patches/mpi4py_fix.patch b/debian/patches/mpi4py_fix.patch
index bfe6108..f676293 100644
--- a/debian/patches/mpi4py_fix.patch
+++ b/debian/patches/mpi4py_fix.patch
@@ -11,7 +11,7 @@ Index: adios-1.9.0/wrappers/numpy/adios.pyx
#import mpi4py.MPI_as MPI_
#cimport mpi4py.MPI_as MPI
-+cdef extern from '../compat.h': pass
++cdef extern from 'compat.h': pass
+
import cython
cimport cython
diff --git a/debian/patches/py3.patch b/debian/patches/py3.patch
index c269965..2060f64 100644
--- a/debian/patches/py3.patch
+++ b/debian/patches/py3.patch
@@ -1,64 +1,3 @@
-Index: adios-1.9.0/wrappers/numpy/Makefile
-===================================================================
---- adios-1.9.0.orig/wrappers/numpy/Makefile
-+++ adios-1.9.0/wrappers/numpy/Makefile
-@@ -1,17 +1,23 @@
- MPI=n
- CYTHON=n
-
--OBJ = adios.so
-+OBJ = adios.so adios3.so
-
- ifeq ($(CYTHON), y)
- OBJ := adios.cpp $(OBJ)
- endif
-+ifeq ($(CYTHON3), y)
-+ OBJ := adios3.cpp $(OBJ)
-+endif
-
- ifeq ($(MPI),y)
-- OBJ += adios_mpi.so
-+ OBJ += adios_mpi.so adios3_mpi.so
- ifeq ($(CYTHON), y)
- OBJ := adios_mpi.cpp $(OBJ)
- endif
-+ ifeq ($(CYTHON3), y)
-+ OBJ := adios3_mpi.cpp $(OBJ)
-+ endif
- endif
-
-
-@@ -27,17 +33,29 @@ default:
- python: $(OBJ)
-
- adios.cpp: adios.pyx
-- cython --cplus adios.pyx
-+ cython --cplus adios.pyx -o adios.cpp
-+
-+adios3.cpp: adios.pyx
-+ cython3 --cplus adios.pyx -o adios3.cpp
-
- adios.so:
- python setup.py build_ext -lrt
-
-+adios3.so:
-+ python3 setup3.py build_ext -lrt
-+
- adios_mpi.cpp: adios_mpi.pyx
- cython --cplus adios_mpi.pyx
-
-+adios3_mpi.cpp: adios_mpi.pyx
-+ cython3 --cplus adios_mpi.pyx -o adios3_mpi.cpp
-+
- adios_mpi.so:
- python setup_mpi.py build
-
-+adios3_mpi.so:
-+ python3 setup3_mpi.py build
-+
- clean:
- rm -rf build
-
Index: adios-1.9.0/wrappers/numpy/setup3.py
===================================================================
--- /dev/null
@@ -146,7 +85,7 @@ Index: adios-1.9.0/wrappers/numpy/setup3_mpi.py
===================================================================
--- /dev/null
+++ adios-1.9.0/wrappers/numpy/setup3_mpi.py
-@@ -0,0 +1,135 @@
+@@ -0,0 +1,134 @@
+#!/usr/bin/env python3
+# Author: Jong Choi
+# Contact: choij at ornl.gov
@@ -155,28 +94,29 @@ Index: adios-1.9.0/wrappers/numpy/setup3_mpi.py
+import os
+import sys
+import getopt
++import numpy as np
+
+## Credit: http://svn.apache.org/repos/asf/subversion/tags/0.20.1/subversion/bindings/swig/python/setup.py
+def _do_usage():
-+ print "Usage: setup.py [OPTIONS] build"
-+ print " setup.py install [--prefix PREFIX]"
-+ print " setup.py install_lib [--install-dir DIR]"
-+ print ""
-+ print "Options:"
-+ print " -I dir " + \
-+ "search DIR for includes (multiple instances allowed)"
-+ print " -L dir " + \
-+ "search DIR for libraries (multiple instances allowed)"
-+ print " -C option " + \
++ print ("Usage: setup.py [OPTIONS] build")
++ print (" setup.py install [--prefix PREFIX]")
++ print (" setup.py install_lib [--install-dir DIR]")
++ print ("")
++ print ("Options:")
++ print (" -I dir " + \
++ "search DIR for includes (multiple instances allowed)")
++ print (" -L dir " + \
++ "search DIR for libraries (multiple instances allowed)")
++ print (" -C option " + \
+ "pass OPTION to the compiler at compile time (multiple instances " + \
-+ "allowed)"
-+ print " -R option " + \
++ "allowed)")
++ print (" -R option " + \
+ "pass OPTION to the compiler at link time (multiple instances " + \
-+ "allowed)"
++ "allowed)")
+ sys.exit(0)
+
+# Default option values
-+include_dirs = ['../../src/public'],
++include_dirs = ['../../src/public', np.get_include()],
+library_dirs = ['../../debian/tmp/usr/lib'],
+extra_compile_args = []
+extra_link_args = []
@@ -214,7 +154,6 @@ Index: adios-1.9.0/wrappers/numpy/setup3_mpi.py
+sys.argv[1:] = leftovers
+
+from distutils.extension import Extension
-+import numpy as np
+
+# Use mpi4py dist utils: https://bitbucket.org/mpi4py/mpi4py
+from conf.mpidistutils import setup
@@ -224,7 +163,6 @@ Index: adios-1.9.0/wrappers/numpy/setup3_mpi.py
+
+import subprocess
+
-+include_dirs.insert(0, np.get_include())
+extra_compile_args.insert(0, '-Wno-uninitialized')
+extra_compile_args.insert(0, '-Wno-unused-function')
+
@@ -282,3 +220,68 @@ Index: adios-1.9.0/wrappers/numpy/setup3_mpi.py
+ cmdclass={'test': adios_test},
+ executables = [],
+ ext_modules = [m1])
+Index: adios-1.9.0/wrappers/numpy/setup_mpi.py
+===================================================================
+--- adios-1.9.0.orig/wrappers/numpy/setup_mpi.py
++++ adios-1.9.0/wrappers/numpy/setup_mpi.py
+@@ -6,6 +6,7 @@
+ import os
+ import sys
+ import getopt
++import numpy as np
+
+ ## Credit: http://svn.apache.org/repos/asf/subversion/tags/0.20.1/subversion/bindings/swig/python/setup.py
+ def _do_usage():
+@@ -27,7 +28,7 @@ def _do_usage():
+ sys.exit(0)
+
+ # Default option values
+-include_dirs = ['../../src/public'],
++include_dirs = ['../../src/public', np.get_include()],
+ library_dirs = ['../../debian/tmp/usr/lib'],
+ extra_compile_args = []
+ extra_link_args = []
+@@ -65,7 +66,6 @@ for option in options:
+ sys.argv[1:] = leftovers
+
+ from distutils.extension import Extension
+-import numpy as np
+
+ # Use mpi4py dist utils: https://bitbucket.org/mpi4py/mpi4py
+ from conf.mpidistutils import setup
+@@ -75,7 +75,6 @@ from distutils.core import Command
+
+ import subprocess
+
+-include_dirs.insert(0, np.get_include())
+ extra_compile_args.insert(0, '-Wno-uninitialized')
+ extra_compile_args.insert(0, '-Wno-unused-function')
+
+@@ -100,15 +99,15 @@ p = subprocess.Popen(["adios_config", "-
+ pp = p.communicate()[0].decode(encoding='UTF-8').strip()
+ for path in str(pp).split(" "):
+ if path.startswith('-I'):
+- m1.include_dirs.append(path.replace('-I', '', 1))
++ m1.include_dirs[0].append(path.replace('-I', '', 1))
+
+ p = subprocess.Popen(["adios_config", "-l"], stdout=subprocess.PIPE)
+ pp = p.communicate()[0].decode(encoding='UTF-8').strip()
+ for path in str(pp).split(" "):
+ if path.startswith('-L'):
+- m1.library_dirs.append(path.replace('-L', '', 1))
++ m1.library_dirs[0].append(path.replace('-L', '', 1))
+ if path.startswith('-l'):
+- m1.libraries.append(path.replace('-l', '', 1))
++ m1.libraries[0].append(path.replace('-l', '', 1))
+
+ class adios_test(Command):
+ user_options = []
+@@ -125,7 +124,7 @@ class adios_test(Command):
+ raise SystemExit(errno)
+
+ setup(name = 'adios_mpi',
+- version = '1.8.1b3',
++ version = '1.9.0',
+ description = 'Python Module for Adios MPI',
+ author = 'Jong Choi',
+ author_email = 'yyalli at gmail.com',
diff --git a/debian/rules b/debian/rules
index c106fd2..ce69f9a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -45,12 +45,15 @@ export PATH:=$(TOP):$(PATH)
override_dh_auto_clean:
dh_clean
- find . -name '*.pyc' -o -name '*.o' -o -name '*.a' -name '*.mod' -delete
+ find . -name '*.pyc' -delete
+ find . -name '*.o' -delete
+ find . -name '*.a' -delete
+ find . -name '*.mod' -delete
rm -fr wrappers/numpy/build wrappers/java/build debian/tmpp
# Remove dodgy symlink
rm -f ./examples/staging/stage_write/writer_adios config.log
rm -f libtool config.h config.status adios_config.flags adios_config
- rm -r adios.pc stamp-h1
+ rm -f adios.pc stamp-h1
override_dh_auto_configure:
dh_auto_configure -- $(WITH_LUSTRE) $(WITH_IBVERBS) --enable-shared \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/adios.git
More information about the debian-science-commits
mailing list