Skip to content
Permalink
Browse files

python 3 only support with __version__ 1.0.0

  • Loading branch information...
tcaduser committed May 8, 2019
1 parent c0800f7 commit 099e3dfe2e15d8b74c60081b78b5e4e46cf4364f
@@ -14,12 +14,12 @@ os:

before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get install tcl8.5 tcl8.5-dev tcl-dev python2.7 python2.7-dev cmake flex bison;
sudo apt-get install tcl8.5 tcl8.5-dev tcl-dev python3 python3-dev cmake flex bison;
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
(curl -O https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh &&
bash Miniconda2-latest-MacOSX-x86_64.sh -b -p $HOME/anaconda &&
${HOME}/anaconda/bin/conda create -y --name python36 python=3.6
(curl -O https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh &&
bash Miniconda3-latest-MacOSX-x86_64.sh -b -p $HOME/anaconda &&
${HOME}/anaconda/bin/conda create -y --name python37 python=3.7
);
fi

@@ -1,8 +1,7 @@
PROJECT (SYMDIFF CXX)

OPTION(TCLMAIN "Build with TCL Interpreter" ON)
#Python 2 version is always build
OPTION(PYTHON3 "Build Python 3 Interpreter" OFF)
OPTION(PYTHON3 "Build Python 3 Interpreter" ON)

set (CMAKE_CXX_STANDARD 14)

@@ -14,9 +13,8 @@ SET (SUBDIRS
# superlu stuff
SITE_NAME(HOSTNAME)
MESSAGE("Hostname: ${HOSTNAME}")
ADD_DEFINITIONS(-DSYMDIFF_VERSION_STRING="\\"0.00\\"" -DSYMDIFF_COPYRIGHT_YEAR="\\"2010\\"")
OPTION(TCLMAIN "Build with TCL Interpreter" ON)

ADD_DEFINITIONS(-DSYMDIFF_VERSION_STRING="\\"1.0.0\\"")
ADD_DEFINITIONS(-DSYMDIFF_COPYRIGHT_YEAR="\\"2010-2019\\"")

set(PROJECT_BIN_DIR ${PROJECT_SOURCE_DIR}/bin)
set(PROJECT_SCRIPTS_DIR ${PROJECT_SOURCE_DIR}/scripts)
@@ -16,18 +16,16 @@ SET (CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} /fp:strict /wd4251 /wd4005 /wd4996")
#SET(TCL_INCLUDE "c:/Tcl/include")
#SET(TCL_ARCHIVE "c:/Tcl/lib/tclstub85.lib")
IF (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
SET (MINICONDA2 C:/Miniconda)
SET (MINICONDA3 C:/Miniconda36)
SET (MINICONDA3 C:/Miniconda37)
ELSE (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
SET (MINICONDA2 C:/Miniconda-x64)
SET (MINICONDA3 C:/Miniconda36-x64)
SET (MINICONDA3 C:/Miniconda37-x64)
ENDIF (${CMAKE_SIZEOF_VOID_P} MATCHES 4)

SET(TCL_INCLUDE "${MINICONDA2}/Library/include")
SET(TCL_ARCHIVE "${MINICONDA2}/Library/lib/tclstub86.lib")
SET(TCL_BIN "${MINICONDA2}/Library/bin/tclsh.exe")
SET (PYTHON_ARCHIVE ${MINICONDA2}/libs/python27.lib)
SET (PYTHON_INCLUDE ${MINICONDA2}/include)
SET(TCL_INCLUDE "${MINICONDA3}/Library/include")
SET(TCL_ARCHIVE "${MINICONDA3}/Library/lib/tclstub86.lib")
SET(TCL_BIN "${MINICONDA3}/Library/bin/tclsh.exe")
#SET (PYTHON_ARCHIVE ${MINICONDA2}/libs/python27.lib)
#SET (PYTHON_INCLUDE ${MINICONDA2}/include)
SET (PYTHON3_ARCHIVE ${MINICONDA3}/libs/python3.lib)
SET (PYTHON3_INCLUDE ${MINICONDA3}/include)

@@ -110,8 +110,8 @@ install:
#- appveyor DownloadFile http://downloads.activestate.com/ActiveTcl/releases/8.5.18.0/ActiveTcl8.5.18.0.298892-win32-x86_64-threaded.exe
#- ActiveTcl8.5.18.0.298892-win32-x86_64-threaded.exe --directory C:\Tcl
# tcl libraries
- IF "%PLATFORM%"=="x64" c:\Miniconda-x64\Scripts\conda install --yes tk
- IF "%PLATFORM%"=="x86" c:\Miniconda\Scripts\conda install --yes tk
- IF "%PLATFORM%"=="x64" c:\Miniconda37-x64\Scripts\conda install --yes tk
- IF "%PLATFORM%"=="x86" c:\Miniconda37\Scripts\conda install --yes tk
- appveyor DownloadFile https://cygwin.com/setup-x86.exe
- setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P flex -P bison -P perl
- C:\cygwin\bin\bash.exe scripts/setup_appveyor.sh %PLATFORM%
@@ -217,17 +217,6 @@ build_script:
test_script:
- cd %APPVEYOR_BUILD_FOLDER%
- SET CTEST_OUTPUT_ON_FAILURE=1
#- SET PATH=c:\Miniconda-x64;c:\Miniconda-x64\Library\bin;%PATH%
#- DIR %APPVEYOR_BUILD_FOLDER%\lib
#- DIR %APPVEYOR_BUILD_FOLDER%\lib\symdiff
# needed for windows path issues
# symdiff_py2.pyd and symdiff_py3.pyd are already there
#- COPY %APPVEYOR_BUILD_FOLDER%\lib\symdiff.dll %APPVEYOR_BUILD_FOLDER%\lib\symdiff\
#- SET PATH=c:\Tcl\bin;c:\Miniconda-x64;%PATH%
#- bin\symdiff_tcl.bat %APPVEYOR_BUILD_FOLDER%\testing\arrhenius_tcl.tcl
#- bin\symdiff.bat %APPVEYOR_BUILD_FOLDER%\examples\arrhenius.py
#- bin\symdiff_py3.bat %APPVEYOR_BUILD_FOLDER%\examples\arrhenius.py
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- IF "%PLATFORM%"=="x64" cd win64 && ctest
- IF "%PLATFORM%"=="x86" cd win32 && ctest

BIN +737 Bytes (100%) doc/symdiff.pdf
Binary file not shown.
@@ -8,14 +8,12 @@ SYMDIFF_CONFIG="appveyor"
if [ "$1" = x86 ]; then
GENERATOR="Visual Studio 15 2017"
BUILDDIR="win32"
python2base="c:\\Miniconda"
python3base="c:\\Miniconda36"
python3base="c:\\Miniconda37"
fi
if [ "$1" = x64 ]; then
GENERATOR="Visual Studio 15 2017 Win64"
BUILDDIR="win64"
python2base="c:\\Miniconda-x64"
python3base="c:\\Miniconda36-x64"
python3base="c:\\Miniconda37-x64"
fi

#/usr/bin/mkdir -p win32
@@ -27,21 +25,10 @@ fi
#(cd win64; "$CMAKE" -G "Visual Studio 14 Win64" -DSYMDIFF_CONFIG=${SYMDIFF_CONFIG} -DTCLMAIN=ON ..)

libpath=`/usr/bin/cygpath -w $PWD/lib`
#python2bin="${python2base}\\python"
#python3bin="${python3base}\\python"

#echo $libpath
# TODO: fix to use conda activate
/usr/bin/mkdir -p bin
/usr/bin/cat << EOF > bin/symdiff.bat
@setlocal
@echo off
SET PATH=${python2base};${python2base}\\Library\\bin;%PATH%
SET PYTHONPATH=$libpath
python %*
EOF
/usr/bin/chmod +x bin/symdiff.bat

/usr/bin/cat << EOF > bin/symdiff_py3.bat
@setlocal
@echo off
@@ -57,7 +44,7 @@ libpath=`/usr/bin/cygpath -m $PWD/lib`
/usr/bin/cat << EOF > bin/symdiff_tcl.bat
@setlocal
@echo off
SET PATH=${python2base};${python2base}\\Library\\bin;%PATH%
SET PATH=${python3base};${python3base}\\Library\\bin;%PATH%
SET TCLLIBPATH="$libpath" %TCLLIBPATH%
tclsh %*
EOF

This file was deleted.

Oops, something went wrong.
@@ -7,12 +7,9 @@ CC="/usr/bin/gcc"
TCL_ARCHIVE="/usr/lib/libtclstub8.5.a"
TCL_INCLUDE="/usr/include"
TCL_BIN="${HOME}/anaconda/bin/tclsh8.6"
PYTHON_ARCHIVE="${HOME}/anaconda/lib/libpython2.7.dylib"
PYTHON_INCLUDE="${HOME}/anaconda/include/python2.7"
PYTHON_BIN="${HOME}/anaconda/bin/python"
PYTHON3_ARCHIVE="${HOME}/anaconda/envs/python36/lib/libpython3.6m.dylib"
PYTHON3_INCLUDE="${HOME}/anaconda/envs/python36/include/python3.6m"
PYTHON3_BIN="${HOME}/anaconda/envs/python36/bin/python"
PYTHON3_ARCHIVE="${HOME}/anaconda/envs/python37/lib/libpython3.7m.dylib"
PYTHON3_INCLUDE="${HOME}/anaconda/envs/python37/include/python3.7m"
PYTHON3_BIN="${HOME}/anaconda/envs/python37/bin/python"
#-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
for TYPE in debug release; do
NAME=osx_${TYPE}
@@ -36,16 +33,6 @@ for TYPE in debug release; do
done
mkdir -p bin

cat << EOF > bin/symdiff
#!/bin/bash
set -e
progname="\$0"
curdir=\`dirname "\$progname"\`
export PYTHONPATH=\${curdir}/../lib
${PYTHON_BIN} \$*
EOF
chmod +x bin/symdiff

cat << EOF > bin/symdiff_py3
#!/bin/bash
set -e
@@ -6,9 +6,6 @@ CXX="/usr/bin/g++"
TCL_ARCHIVE="/usr/lib/x86_64-linux-gnu/libtclstub.a"
TCL_INCLUDE="/usr/include/tcl"
TCL_BIN="/usr/bin/tclsh"
PYTHON_ARCHIVE="/usr/lib/x86_64-linux-gnu/libpython2.7.so"
PYTHON_INCLUDE="/usr/include/python2.7"
PYTHON_BIN="/usr/bin/python2.7"
PYTHON3_ARCHIVE="/usr/lib/x86_64-linux-gnu/libpython3.4m.so"
PYTHON3_INCLUDE="/usr/include/python3.4m"
PYTHON3_BIN="/usr/bin/python3.4m"
@@ -21,9 +18,6 @@ ARCH=`uname -m`
-DCMAKE_CXX_FLAGS:STRING="${CMAKE_CXX_FLAGS}" \
-DCMAKE_BUILD_TYPE=${TYPE} \
-DCMAKE_CXX_COMPILER=${CXX} \
-DPYTHON_INCLUDE=${PYTHON_INCLUDE} \
-DPYTHON_ARCHIVE=${PYTHON_ARCHIVE} \
-DPYTHON_BIN=${PYTHON_BIN} \
-DPYTHON3_INCLUDE=${PYTHON3_INCLUDE} \
-DPYTHON3_ARCHIVE=${PYTHON3_ARCHIVE} \
-DPYTHON3_BIN=${PYTHON3_BIN} \
@@ -29,7 +29,9 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.todo',
'sphinx.ext.autodoc',
'numpydoc',
'sphinx.ext.autosummary',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinxcontrib.bibtex',
@@ -51,17 +53,17 @@

# General information about the project.
project = u'SYMDIFF Manual'
copyright = u'2012-2018, DEVSIM LLC'
copyright = u'2012-2019, DEVSIM LLC'
author = u'DEVSIM LLC'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'1.00'
version = u'1.0'
# The full version, including alpha/beta/rc tags.
release = u'1.00'
release = u'1.0.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -72,7 +74,7 @@

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
today = ' '
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

@@ -214,13 +216,36 @@
'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '11pt',
'pointsize': '11pt',

# make the chapter headings normal
# http://www.sphinx-doc.org/en/stable/config.html#options-for-latex-output
'fncychap' : '',

# Additional stuff for the LaTeX preamble.
#'preamble': '',

# Latex figure (float) alignment
#'figure_align': 'htbp',

# add listoffigures, listoftables
# TODO: figure out how to put in frontmatter
'tableofcontents' : r'''
\renewcommand{\thepage}{\roman{page}}
\tableofcontents
\addcontentsline{toc}{chapter}{\contentsname}
%\cleardoublepage
%\phantomsection
%\addcontentsline{toc}{chapter}{\listfigurename}
%\listoffigures
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\cleardoublepage
\renewcommand{\thepage}{\arabic{page}}
\setcounter{page}{1}
'''
}

# Grouping the document tree into LaTeX files. List of tuples
@@ -243,7 +268,7 @@
latex_show_pagerefs = True

# If true, show URL addresses after external links.
latex_show_urls = True
latex_show_urls = 'inline'

# Documents to append as an appendix to all manuals.
#latex_appendices = []
@@ -15,6 +15,8 @@ SYMDIFF Manual

frontmatter

releasenotes

introduction

syntax
@@ -2,7 +2,7 @@
.. include:: <isonum.txt>

.. |devsim| replace:: ``DEVSIM``
.. |mycopyright| replace:: Copyright |copy| 2009--2018 DEVSIM LLC
.. |mycopyright| replace:: Copyright |copy| 2009--2019 DEVSIM LLC

.. |unicode| replace:: ``unicode``
.. |anaconda| replace:: ``Anaconda``
@@ -34,6 +34,7 @@
.. |mswindows| replace:: ``Microsoft Windows``
.. |mswindowsseven| replace:: ``Windows 7``
.. |python| replace:: ``Python``
.. |pythonthree| replace:: ``Python 3``
.. |pythontwoseven| replace:: ``Python 2.7``
.. |rhelfive| replace:: ``Red Hat Enterprise Linux 5``
.. |rhelsix| replace:: ``Red Hat Enterprise Linux 6``
@@ -0,0 +1,19 @@

.. include:: macros.txt

Release Notes
-------------

Introduction
~~~~~~~~~~~~

Release 1.0.0 (May 7, 2019)
~~~~~~~~~~~~~~~~~~~~~~~~~~~

The version number has been updated to having a major revision of ``1``. We adopt the semantic version numbering presented at https://semver.org. The version number can be accessed through the |python| interface using the ``symdiff.__version__`` variable.

This is the first versioned release of |symdiff|. Using the stable ABI, the software is able to run newer |pythonthree| releases, without rebuilding the software.

Unlike previous revisions of software, |pythontwoseven|, is removed from the build.


@@ -33,15 +33,6 @@ SET_TARGET_PROPERTIES(${arg1} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup -
ENDIF (APPLE)
ENDFUNCTION(build_python_version arg1)

build_python_version(symdiff_py2)
TARGET_INCLUDE_DIRECTORIES (symdiff_py2 PUBLIC ${PYTHON_INCLUDE})
IF(WIN32)
TARGET_LINK_LIBRARIES (symdiff_py2 ${PYTHON_ARCHIVE})
ELSE(WIN32)
# macOS and Linux do not need to dynamically link against python
# this makes the dynamic library more portable
ENDIF(WIN32)

IF (PYTHON3)
build_python_version(symdiff_py3)
TARGET_INCLUDE_DIRECTORIES (symdiff_py3 PUBLIC ${PYTHON3_INCLUDE})
Oops, something went wrong.

0 comments on commit 099e3df

Please sign in to comment.
You can’t perform that action at this time.