[instant] 01/01: New upstream version 2017.2.0.0

Drew Parsons dparsons at moszumanska.debian.org
Fri Jan 19 16:16:41 UTC 2018


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

dparsons pushed a commit to annotated tag upstream/2017.2.0.0
in repository instant.

commit 8a91792f555adec1c3a76f00e5262b142c68be83
Author: Drew Parsons <dparsons at debian.org>
Date:   Sat Jan 20 00:01:28 2018 +0800

    New upstream version 2017.2.0.0
---
 ChangeLog.rst                            |  6 ++---
 doc/sphinx/source/conf.py                |  2 +-
 doc/sphinx/source/releases.rst           |  1 +
 doc/sphinx/source/releases/v2017.2.0.rst |  2 +-
 instant/codegeneration.py                | 40 +++++++++++++++++++++++---------
 5 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/ChangeLog.rst b/ChangeLog.rst
index 37b91dd..a285a49 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,16 +1,16 @@
 Changelog
 =========
 
-2017.2.0 (2017-09-19)
+2017.2.0 (2017-10-05)
 ---------------------
 
-- Maintenance
+- Maintenance release
 
 
 2017.1.0.post1 (2017-09-12)
 ---------------------
 
-- Change PyPI package name to fenics-instant. 
+- Change PyPI package name to fenics-instant.
 
 
 2017.1.0 (2017-05-09)
diff --git a/doc/sphinx/source/conf.py b/doc/sphinx/source/conf.py
index 555297f..b987b32 100644
--- a/doc/sphinx/source/conf.py
+++ b/doc/sphinx/source/conf.py
@@ -55,7 +55,7 @@ master_doc = 'index'
 project = u'Instant'
 this_year = datetime.date.today().year
 copyright = u'%s, FEniCS Project' % this_year
-version = pkg_resources.get_distribution("instant").version
+version = pkg_resources.get_distribution("fenics-instant").version
 release = version
 
 # The language for content autogenerated by Sphinx. Refer to documentation
diff --git a/doc/sphinx/source/releases.rst b/doc/sphinx/source/releases.rst
index 4758874..787e2f2 100644
--- a/doc/sphinx/source/releases.rst
+++ b/doc/sphinx/source/releases.rst
@@ -9,6 +9,7 @@ Release notes
    :maxdepth: 2
 
    releases/next
+   releases/v2017.2.0
    releases/v2017.1.0.post1
    releases/v2017.1.0
    releases/v2016.2.0
diff --git a/doc/sphinx/source/releases/v2017.2.0.rst b/doc/sphinx/source/releases/v2017.2.0.rst
index 27ec51c..59a4ca1 100644
--- a/doc/sphinx/source/releases/v2017.2.0.rst
+++ b/doc/sphinx/source/releases/v2017.2.0.rst
@@ -2,4 +2,4 @@
 Changes in version 2017.2.0
 ===========================
 
-Instant 2017.2.0 was released on 2017-09-19.
+Instant 2017.2.0 was released on 2017-11-30.
diff --git a/instant/codegeneration.py b/instant/codegeneration.py
index 3523015..574697c 100644
--- a/instant/codegeneration.py
+++ b/instant/codegeneration.py
@@ -27,9 +27,11 @@ import re, os, io
 from .output import instant_assert, instant_warning, instant_debug, write_file
 from .config import get_swig_binary
 
+
 def mapstrings(format, sequence):
     return "\n".join(format % i for i in sequence)
 
+
 def reindent(code):
     '''Reindent a multiline string to allow easier to read syntax.
 
@@ -60,6 +62,7 @@ def reindent(code):
     instant_assert(space == " "*n, "Logic breach in reindent.")
     return "\n".join(re.sub(r"^%s" % space, "", l) for l in lines)
 
+
 def write_interfacefile(filename, modulename, code, init_code,
                         additional_definitions, additional_declarations,
                         system_headers, local_headers, wrap_headers, arrays):
@@ -214,7 +217,10 @@ def write_interfacefile(filename, modulename, code, init_code,
     write_file(filename, interface_string)
     instant_debug("Done generating interface file.")
 
-def write_setup(filename, modulename, csrcs, cppsrcs, local_headers, include_dirs, library_dirs, libraries, swig_include_dirs, swigargs, cppargs, lddargs):
+
+def write_setup(filename, modulename, csrcs, cppsrcs, local_headers,
+                include_dirs, library_dirs, libraries, swig_include_dirs,
+                swigargs, cppargs, lddargs):
     """Generate a setup.py file. Intended for internal library use."""
     instant_debug("Generating %s." % filename)
 
@@ -278,11 +284,12 @@ def _test_write_interfacefile():
     wrap_headers = ["wrap_header1.h", "wrap_header2.h"]
     arrays = [["length1", "array1"], ["dims", "lengths", "array2"]]
 
-    write_interfacefile("%s.i" % modulename, modulename, code, init_code, \
-                        additional_definitions, additional_declarations, \
+    write_interfacefile("%s.i" % modulename, modulename, code, init_code,
+                        additional_definitions, additional_declarations,
                         system_headers, local_headers, wrap_headers, arrays)
     print("".join(io.open("%s.i" % modulename, encoding="utf8").readlines()))
 
+
 def _test_write_setup():
     modulename = "testmodule"
     csrcs = ["csrc1.c", "csrc2.c"]
@@ -301,6 +308,7 @@ def _test_write_setup():
                 swigargs, cppargs, lddargs)
     print("".join(io.open("setup.py", encoding="utf8").readlines()))
 
+
 def unique(sequence):
     return list(set(sequence))
 
@@ -310,6 +318,7 @@ def find_vtk_classes(str):
     l = unique(re.findall(pattern, str))
     return l
 
+
 def create_typemaps(classes):
     s = ""
 
@@ -368,7 +377,10 @@ def generate_interface_file_vtk(signature, code):
     s = interface_template % { "typemaps" : typemaps, "code" : code, "includes" : includes }
     return s
 
-def write_cmakefile(module_name, cmake_packages, csrcs, cppsrcs, local_headers, include_dirs, library_dirs, libraries, swig_include_dirs, swigargs, cppargs, lddargs):
+
+def write_cmakefile(module_name, cmake_packages, csrcs, cppsrcs, local_headers,
+                    include_dirs, library_dirs, libraries, swig_include_dirs,
+                    swigargs, cppargs, lddargs):
 
     find_package_template = """
 # Configuration for package %(package)s
@@ -380,6 +392,13 @@ ENDIF(%(package)s_FOUND)
 
     cmake_form = dict(module_name=module_name)
 
+    # Major hack to adress
+    # https://bitbucket.org/fenics-project/dolfin/pull-requests/358/add-petsc-and-slepc-include-directories-in/
+    p = ""
+    for package in cmake_packages:
+        p += package.lower() + " "
+    cmake_form["cmake_dep_targets"] = p
+
     cmake_form["python_executable"] = sys.executable
 
     cmake_form["extra_libraries"] = ";".join(libraries)
@@ -415,20 +434,17 @@ endif()
     cmake_form["package_flags"] = "\n".join(\
         """set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS} ${%(package)s_LINK_FLAGS}\")
 set(CMAKE_SHARED_LINKER_FLAGS \"${CMAKE_SHARED_LINKER_FLAGS} ${%(package)s_LINK_FLAGS}\")
-""" %
-        dict(package=package.upper()) for package in cmake_packages)
+""" % dict(package=package.upper()) for package in cmake_packages)
 
     cmake_form["package_swig_link_libraries"] = "\n".join(\
         """if (DEFINED %(package)s_LIBRARIES OR DEFINED %(package)s_3RD_PARTY_LIBRARIES OR DEFINED %(package)s_PYTHON_LIBRARIES)
   swig_link_libraries(${SWIG_MODULE_NAME} ${%(package)s_LIBRARIES} ${%(package)s_3RD_PARTY_LIBRARIES} ${%(package)s_PYTHON_LIBRARIES} ${EXTRA_SOURCE_LIB})
-endif()""" %
-        dict(package=package.upper()) for package in cmake_packages)
+endif()""" % dict(package=package.upper()) for package in cmake_packages)
 
     cmake_form["package_python_definitions"] = "\n".join(\
         """if (DEFINED %(package)s_PYTHON_DEFINITIONS)
   add_definitions(${%(package)s_PYTHON_DEFINITIONS})
-endif()""" %
-        dict(package=package.upper()) for package in cmake_packages)
+endif()""" % dict(package=package.upper()) for package in cmake_packages)
 
     cppsrcs.extend(csrcs)
     if len(cppsrcs) > 0:
@@ -449,7 +465,7 @@ endif()""" %
         cmake_form["lddargs"] = ""
 
     cmake_template = """
-cmake_minimum_required(VERSION 2.6.0)
+cmake_minimum_required(VERSION 3.5.0)
 
 set (NAME %(module_name)s)
 
@@ -519,6 +535,7 @@ if(SOURCE_FILES)
     STATIC
     ${SOURCE_FILES})
   set(EXTRA_LIBRARIES \"source_file_lib;${EXTRA_LIBRARIES}\")
+  target_link_libraries(source_file_lib %(cmake_dep_targets)s)
 endif()
 
 if(EXTRA_LIBRARIES)
@@ -533,6 +550,7 @@ endif()
     filename = "CMakeLists.txt"
     write_file(filename, cmake_template)
 
+
 def write_itk_cmakefile(name):
     file_template = """
 cmake_minimum_required(VERSION 2.6.0)

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



More information about the debian-science-commits mailing list