From 0b8129baf0169fd9229d84f3e665471450851e41 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 14:47:12 -0400 Subject: [PATCH 001/125] six: Added six, which provides access to utilities in a compatible way between Python 2 and 3. Required by Matplotlib. --- six.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 six.cmake diff --git a/six.cmake b/six.cmake new file mode 100644 index 0000000..d32188f --- /dev/null +++ b/six.cmake @@ -0,0 +1,40 @@ +# A python standards module. Provides support for utilities in a compatible way +# between Python 2 and 3. +# Required by Matplotlib. + +if (NOT six_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (six + 1.6.1 + six-1.6.1.tar.gz + 07d606ac08595d795bf926cc9985674f + https://pypi.python.org/packages/source/s/six/) + + +# Download and install six +message ("Installing ${six_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${six_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${six_URL} + URL_MD5 ${six_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${six_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT six_NAME) \ No newline at end of file From 706fa8acf84a1b705f1aaeaf39f1a6af1383a654 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:05:17 -0400 Subject: [PATCH 002/125] pytz: Provides support for timezone definitions. Required by Matplotlib. --- pytz.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pytz.cmake diff --git a/pytz.cmake b/pytz.cmake new file mode 100644 index 0000000..8d604cf --- /dev/null +++ b/pytz.cmake @@ -0,0 +1,39 @@ +# Time zone definitions for Python. +# Used by Matplotlib. + +if (NOT pytz_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (pytz + 2014.2 + pytz-2014.2.tar.gz + c0158314605420cbf6e5328369b06145 + https://pypi.python.org/packages/source/p/pytz/) + + +# Download and install pytz +message ("Installing ${pytz_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pytz_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pytz_URL} + URL_MD5 ${pytz_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pytz_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pytz_NAME) \ No newline at end of file From 275865c7d0d4e1387c6ce0b2d2ac04fbdfd32af3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:09:29 -0400 Subject: [PATCH 003/125] python-dateutil: Added dateutil for Python. Provides support for date and/or time manipulation. Used by Matplotlib. --- python-dateutil.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 python-dateutil.cmake diff --git a/python-dateutil.cmake b/python-dateutil.cmake new file mode 100644 index 0000000..c72f98a --- /dev/null +++ b/python-dateutil.cmake @@ -0,0 +1,41 @@ +# Used for handling any date or time. +# Required by Matplotlib. + +if (NOT python-dateutil_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) +include (six) + +external_source (python-dateutil + 1.5 + python-dateutil-1.5.tar.gz + 35f3732db3f2cc4afdc68a8533b60a52 + https://labix.org/download/python-dateutil) + + +# Download and install python-dateutil +message ("Installing ${python-dateutil_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${python-dateutil_NAME} + DEPENDS ${python_NAME} ${six_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + URL ${python-dateutil_URL} + URL_MD5 ${python-dateutil_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${python-dateutil_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT python-dateutil_NAME) \ No newline at end of file From ad1fa45969e39b0ccc5f2420b40dbe4e208315e7 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:11:02 -0400 Subject: [PATCH 004/125] pyparsing: Added pyparsing. Provides a Python implementation of a parser. Used by Matplotlib. --- pyparsing.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pyparsing.cmake diff --git a/pyparsing.cmake b/pyparsing.cmake new file mode 100644 index 0000000..fe4084e --- /dev/null +++ b/pyparsing.cmake @@ -0,0 +1,39 @@ +# Pyparsing is a dependency of matplotlib. +# Used to render formulae. + +if (NOT pyparsing_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (pyparsing + 2.0.1 + pyparsing-2.0.1.tar.gz + 37adec94104b98591507218bc82e7c31 + https://pypi.python.org/packages/source/p/pyparsing/) + + +# Download and install pyparsing +message ("Installing ${pyparsing_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pyparsing_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pyparsing_URL} + URL_MD5 ${pyparsing_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pyparsing_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pyparsing_NAME) \ No newline at end of file From a296d3168dbc36b8301582ba35d796c0c7508db2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:13:21 -0400 Subject: [PATCH 005/125] backports-ssl_match_hostname: Added backports-ssl_match_hostname. Provides match_hostname from Python 3 for Python 2. Required for tornado, which is used by both Matplotlib and iPython. --- backports-ssl_match_hostname.cmake | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 backports-ssl_match_hostname.cmake diff --git a/backports-ssl_match_hostname.cmake b/backports-ssl_match_hostname.cmake new file mode 100644 index 0000000..8e66869 --- /dev/null +++ b/backports-ssl_match_hostname.cmake @@ -0,0 +1,37 @@ +# Provides match_hostname from Python 3 for Python 2. +# Required by tornado. + +if (NOT backports-ssl_match_hostname_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) + +external_source(backports-ssl_match_hostname + 3.4.0.2 + backports.ssl_match_hostname-3.4.0.2.tar.gz + 788214f20214c64631f0859dc79f23c6 + https://pypi.python.org/packages/source/b/backports.ssl_match_hostname/) + +message ("Installing ${backports-ssl_match_hostname_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${backports-ssl_match_hostname_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${backports-ssl_match_hostname_URL} + URL_MD5 ${backports-ssl_match_hostname_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${backports-ssl_match_hostname_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT backports-ssl_match_hostname_NAME) \ No newline at end of file From 97f0a5a0959fc6cb5d92257db861b05e24bfface Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:15:45 -0400 Subject: [PATCH 006/125] tornado: Added tornado, which is a web framework and asynchronous networking library. Required by Matplotlib and iPython. --- tornado.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tornado.cmake diff --git a/tornado.cmake b/tornado.cmake new file mode 100644 index 0000000..aa1d766 --- /dev/null +++ b/tornado.cmake @@ -0,0 +1,39 @@ +# Web framework and asynchronous networking library (from their intro). +# Required by Matplotlib and iPython. + +if (NOT tornado_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (backports-ssl_match_hostname) + + +external_git_repo(tornado + v3.1.1 # f36652d47fc42205c085ed65e740f4b155d4e5e4 + https://github.com/facebook/tornado) + + +# Download and install tornado +message ("Installing ${tornado_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${tornado_NAME} + DEPENDS ${python_NAME} ${backports-ssl_match_hostname} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${tornado_URL} + GIT_TAG ${tornado_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${tornado_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT tornado_NAME) \ No newline at end of file From 0086fe0e8e2127eb3e70de494e643371ba681ed8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:18:11 -0400 Subject: [PATCH 007/125] matplotlib: Missing various dependencies, which now have their own cmake files ( six, pytz, python-dateutil, pyparsing, tornado ). These have now been included and added as dependencies. Did not add PyCXX or LibAgg as they are bundled with Matplotlib and we would rather use the version they have tested against as we don't use them elsewhere yet. Updated the comments to reflect this information. Should consider updating to a more recent version of Matplotlib, but that was not done here. --- matplotlib.cmake | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index 8836207..a1ac7dc 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -1,5 +1,9 @@ # -# Install matplotlib library from source +# Install matplotlib library from source. +# Includes dependencies to try to avoid use of easy_install, which matplotlib will try. +# +# However, we will let matplotlib install its own copy of PyCXX and LibAgg, which it comes prepackaged with. +# This will help avoid incompatibilities. Also, some version PyCXX are not compatible with some versions of Python. # if (NOT matplotlib_NAME) @@ -12,9 +16,15 @@ include (BuildSupport) include (TemplateSupport) include (python) +include (six) +include (setuptools) +include (pytz) +include (python-dateutil) +include (pyparsing) include (numpy) include (libpng) include (freetype2) +include (tornado) external_source (matplotlib 1.1.1 @@ -24,7 +34,7 @@ external_source (matplotlib message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} - DEPENDS ${python_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} + DEPENDS ${python_NAME} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${tornado_NAME} PREFIX ${BUILDEM_DIR} URL ${matplotlib_URL} URL_MD5 ${matplotlib_MD5} From 19605aaf936c9635aa611a0ad85b1d8558b39784 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:33:06 -0400 Subject: [PATCH 008/125] matplotlib: Added PyQt4 as a dependency as Matplotlib should use the Qt backend. --- matplotlib.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index a1ac7dc..d08062a 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -16,6 +16,7 @@ include (BuildSupport) include (TemplateSupport) include (python) +include (pyqt4) include (six) include (setuptools) include (pytz) @@ -34,7 +35,7 @@ external_source (matplotlib message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} - DEPENDS ${python_NAME} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${tornado_NAME} + DEPENDS ${python_NAME} ${pyqt4} ${six_NAME} ${setuptools_NAME} ${pytz_NAME} ${python-dateutil_NAME} ${pyparsing_NAME} ${numpy_NAME} ${libpng_NAME} ${freetype2_NAME} ${tornado_NAME} PREFIX ${BUILDEM_DIR} URL ${matplotlib_URL} URL_MD5 ${matplotlib_MD5} From 68b4ee0f9083d5045f527f935fec626c0a2bedca Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:42:33 -0400 Subject: [PATCH 009/125] sphinx: Added sphinx. Generates nice documentation from docstrings. sphinxcontrib-napoleon: Added the third party Sphinx extension napoleon. This allows docstrings to be formatted using Google style or Numpy style. Both are very readable as docstrings. Also, it parses them in a way that Sphinx can handle for generating documentation. --- sphinx.cmake | 39 +++++++++++++++++++++++++++++++++++ sphinxcontrib-napoleon.cmake | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 sphinx.cmake create mode 100644 sphinxcontrib-napoleon.cmake diff --git a/sphinx.cmake b/sphinx.cmake new file mode 100644 index 0000000..3033893 --- /dev/null +++ b/sphinx.cmake @@ -0,0 +1,39 @@ +# Provide nice Python documentation output. +# Used by Spyder and iPython. + +if (NOT sphinx_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (sphinx + 1.2.2 + Sphinx-1.2.2.tar.gz + 3dc73ccaa8d0bfb2d62fb671b1f7e8a4 + https://pypi.python.org/packages/source/S/Sphinx/) + + +# Download and install sphinx +message ("Installing ${sphinx_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sphinx_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sphinx_URL} + URL_MD5 ${sphinx_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sphinx_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sphinx_NAME) \ No newline at end of file diff --git a/sphinxcontrib-napoleon.cmake b/sphinxcontrib-napoleon.cmake new file mode 100644 index 0000000..73b2be0 --- /dev/null +++ b/sphinxcontrib-napoleon.cmake @@ -0,0 +1,40 @@ +# Extends Sphinx to add support for Google style and Numpy style documentation. +# Much easier on the eyes and brain than Sphinx. + +if (NOT sphinxcontrib-napoleon_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (sphinx) + +external_source (sphinxcontrib-napoleon + 0.2.7 + sphinxcontrib-napoleon-0.2.7.tar.gz + 001ee10b53eba1361738ed126cd6deb2 + https://pypi.python.org/packages/source/s/sphinxcontrib-napoleon/) + + +# Download and install sphinxcontrib-napoleon +message ("Installing ${sphinxcontrib-napoleon_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sphinxcontrib-napoleon_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sphinxcontrib-napoleon_URL} + URL_MD5 ${sphinxcontrib-napoleon_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sphinxcontrib-napoleon_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sphinxcontrib-napoleon_NAME) \ No newline at end of file From 3f1d2c963bc90d1f67e54a29f3b27104455104ba Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:47:39 -0400 Subject: [PATCH 010/125] readline: Added a cmake to build and install the right readline for Mac or Windows using anyreadline. Required by iPython. --- readline.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 readline.cmake diff --git a/readline.cmake b/readline.cmake new file mode 100644 index 0000000..4b14958 --- /dev/null +++ b/readline.cmake @@ -0,0 +1,40 @@ +# Pulls down the right readline depending on whether it is Windows or Mac using anyreadline. +# Does nothing on Linux as it should have GNU readline. +# +# Required by iPython. + + +if (NOT readline_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (setuptools) + +external_git_repo(readline + v0_1_1 #0796d3eaa9158f6ac82b7f8eea96f372851b79e3 + https://github.com/pombredanne/anyreadline) + +message ("Installing ${readline_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${readline_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${readline_URL} + GIT_TAG ${readline_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${readline_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT readline_NAME) From 8f9a3977d5fcefcb9667ea05314bceaafdf3b99f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:50:58 -0400 Subject: [PATCH 011/125] zeromq: Added zeromq. Provides an asynchronous message passing implementation. Need by iPython. pyzmq: Added pyzmq. Provides Python bindings to ZeroMQ. Used by iPython. --- pyzmq.cmake | 38 ++++++++++++++++++++++++++++++++++++++ zeromq.cmake | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 pyzmq.cmake create mode 100644 zeromq.cmake diff --git a/pyzmq.cmake b/pyzmq.cmake new file mode 100644 index 0000000..a57738b --- /dev/null +++ b/pyzmq.cmake @@ -0,0 +1,38 @@ +# Provides Python bindings for ZeroMQ. +# Required for iPython. + +if (NOT pyzmq_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) +include(zeromq) + + +external_git_repo(pyzmq + v14.0.1 # 28b5bef764cbe87518b589df54f6f7f5ed50964d + https://github.com/zeromq/pyzmq) + + +message ("Installing ${pyzmq_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${pyzmq_NAME} + DEPENDS ${python_NAME} ${zeromq_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${pyzmq_URL} + GIT_TAG ${pyzmq_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py configure --zmq=${BUILDEM_DIR} + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pyzmq_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pyzmq_NAME) \ No newline at end of file diff --git a/zeromq.cmake b/zeromq.cmake new file mode 100644 index 0000000..c4cfbe1 --- /dev/null +++ b/zeromq.cmake @@ -0,0 +1,33 @@ +# A standard asynchronous message passing library. +# Required by pyzmq, which is used by iPython. + +if (NOT zeromq_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +external_source (zeromq + 3.2.4 + zeromq-3.2.4.tar.gz + 39af2d41e3fb744b98d7999e291e05dc + http://download.zeromq.org/) + +message ("Installing ${zeromq_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${zeromq_NAME} + PREFIX ${BUILDEM_DIR} + URL ${zeromq_URL} + URL_MD5 ${zeromq_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ./configure --prefix ${BUILDEM_DIR} + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${zeromq_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT zeromq_NAME) \ No newline at end of file From 2b968f1faf5926a1beed909dbc10ad59b3d2377f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:54:28 -0400 Subject: [PATCH 012/125] nose: Added comment to reflect iPython dependency. --- nose.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/nose.cmake b/nose.cmake index 68c7b95..28861ee 100644 --- a/nose.cmake +++ b/nose.cmake @@ -1,5 +1,6 @@ # # Install nose library from source. +# Dependency for iPython amongst other things. # if (NOT nose_NAME) From 9462b7ffa4bdc80a539a8dca8e77e85ea536f0dd Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 15:56:39 -0400 Subject: [PATCH 013/125] pygments: Added. Provides syntax highlighting support in Python. Used by iPython. --- pygments.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pygments.cmake diff --git a/pygments.cmake b/pygments.cmake new file mode 100644 index 0000000..a77c4b0 --- /dev/null +++ b/pygments.cmake @@ -0,0 +1,37 @@ +# Provides syntax highlighting support for Python. +# Required by iPython. Also, used by Spyder. + +if (NOT pygments_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) + +external_source (pygments + 1.6 + Pygments-1.6.tar.gz + a18feedf6ffd0b0cc8c8b0fbdb2027b1 + https://pypi.python.org/packages/source/P/Pygments/) + +message ("Installing ${pygments_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${pygments_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pygments_URL} + URL_MD5 ${pygments_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pygments_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pygments_NAME) \ No newline at end of file From 7427e7ca4864d3bbc33fecb6cd7a600be3fe3e67 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:00:24 -0400 Subject: [PATCH 014/125] jinja: Added comment to reflect iPython dependency. --- jinja.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jinja.cmake b/jinja.cmake index 3d9e0e4..7332838 100644 --- a/jinja.cmake +++ b/jinja.cmake @@ -1,5 +1,6 @@ # -# Install jinja library from source +# Install jinja library from source. +# Required by iPython. # if (NOT jinja_NAME) From d3e9bfad51ef85affeacc39b5ce3d131c665bde2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:03:12 -0400 Subject: [PATCH 015/125] ipython: Added iPython and dependencies. This includes install readline in a compatiable way for Mac and Windows. Uses the 1.2.1 ( last of version 1 ). --- ipython.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ipython.cmake diff --git a/ipython.cmake b/ipython.cmake new file mode 100644 index 0000000..ac02613 --- /dev/null +++ b/ipython.cmake @@ -0,0 +1,44 @@ +# Standard of Python interactive programming. +# Required by Spyder. + +if (NOT ipython_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) +include (pyqt4) +include (sphinxcontrib-napoleon) # For sphinx extension. Doesn't necessarily need napolean, but it is nice to have and is quick to install. +include (readline) +include (pyzmq) +include (nose) +include (pygments) +include (tornado) +include (jinja) + + +external_git_repo(ipython + rel-1.2.1 #9c4f59ddd54d797072d28d2d5549bc5ea234216d + https://github.com/ipython/ipython/) + +message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${ipython_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${readline_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${ipython_URL} + GIT_TAG ${ipython_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${ipython_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT ipython_NAME) \ No newline at end of file From beb32d23bf259a61cf42dd61c1fadaab11c518ed Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:08:36 -0400 Subject: [PATCH 016/125] patsy: Uses a mini-language for formulae in a way similar to R/S. Used by pandas and hence statsmodels. --- patsy.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 patsy.cmake diff --git a/patsy.cmake b/patsy.cmake new file mode 100644 index 0000000..2bced69 --- /dev/null +++ b/patsy.cmake @@ -0,0 +1,44 @@ +# A statistical models library. Uses a formula mini-language that is similar to R and S. +# +# Required by statsmodels, which is used by pandas. +# All dependencies included as already present. + + +if (NOT patsy_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (numpy) +include (scipy) +include (nose) + + +external_git_repo(patsy + v0.2.1 #93ee6dcc75f7fd97e4ff46b4cf2688a013c3af40 + https://github.com/pydata/patsy/) + + +message ("Installing ${patsy_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${patsy_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${scipy_NAME} ${nose_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${patsy_URL} + GIT_TAG ${patsy_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${patsy_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT patsy_NAME) From f54dd62997c06d1cb425fe4c59090d73c906dc5f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:10:43 -0400 Subject: [PATCH 017/125] numexpr: An acceleration library for use with NumPy. --- numexpr.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 numexpr.cmake diff --git a/numexpr.cmake b/numexpr.cmake new file mode 100644 index 0000000..e7a7de4 --- /dev/null +++ b/numexpr.cmake @@ -0,0 +1,41 @@ +# An acceleration library for use with NumPy. +# +# Used by pandas. However, it is useful by itself. + + +if (NOT numexpr_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (numpy) +include (scipy) +include (nose) + +external_git_repo(numexpr + v2.3.1 #aba0e0a1ff1edc4cc8c82024dee1693c06aa1336 + https://github.com/pydata/numexpr) + +message ("Installing ${numexpr_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${numexpr_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${numexpr_URL} + GIT_TAG ${numexpr_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" # Would like to run this test however. Import doesn't necessarily work during build. ${BUILDEM_ENV_STRING} ${PYTHON_EXE} -c "import numexpr; numexpr.test()" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${numexpr_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT numexpr_NAME) From b6b19bcf0b3a30d9e4baed74f1eb3c144703678c Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:11:52 -0400 Subject: [PATCH 018/125] bottleneck: Added bottleneck, which speeds up some corner cases with NumPy. In particular, when nan values are present. --- bottleneck.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bottleneck.cmake diff --git a/bottleneck.cmake b/bottleneck.cmake new file mode 100644 index 0000000..0aa290c --- /dev/null +++ b/bottleneck.cmake @@ -0,0 +1,41 @@ +# Provides functions to deal with nan in NumPy arrays efficiently. +# +# Required by pandas. + + +if (NOT bottleneck_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (numpy) +include (scipy) +include (nose) + +external_git_repo(bottleneck + v0.7.0 #4042977fa716f127a2074de011b9ef84caf2e965 + https://github.com/kwgoodman/bottleneck) + +message ("Installing ${bottleneck_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${bottleneck_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${scipy_NAME} ${nose_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${bottleneck_URL} + GIT_TAG ${bottleneck_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${bottleneck_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT bottleneck_NAME) From 5dcabacaa5aad3f8a1cf008e9dddeb53e8d9a2ea Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:14:42 -0400 Subject: [PATCH 019/125] pandas: Data analysis library. Part of SciPy stack. Used in particular for linear analysis. Included essential dependencies. Did not include optional dependencies to deal with input and output formats ( e.g. Excel, Amazon, PyTables ) nor were any parsers included ( e.g. any version BeautifulSoup ). Regardless, actual analytical operations should work. --- pandas.cmake | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pandas.cmake diff --git a/pandas.cmake b/pandas.cmake new file mode 100644 index 0000000..250edb2 --- /dev/null +++ b/pandas.cmake @@ -0,0 +1,50 @@ +# Data analysis (primarily linear) for Python. Part of the SciPy Stack. +# +# Includes essential dependencies and optional ones that were already included. +# Optional ones have not been included (i.e. Any data reading stuff Excel, Amazon, PyTables) or fancy HTML parsers (i.e. BeautifulSoupX). +# Required by statsmodels. + + +if (NOT pandas_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (cython) +include (python-dateutil) +include (pytz) +include (numpy) +include (scipy) +include (matplotlib) +include (numexpr) +include (bottleneck) + + +external_git_repo(pandas + v0.12.0 #8c0a34f15f8a87def3f7ad6ebdac052de44669f2 + https://github.com/pydata/pandas) + + +message ("Installing ${pandas_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${pandas_NAME} + DEPENDS ${python_NAME} ${cython_NAME} ${python-dateutil_NAME} ${pytz_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${numexpr_NAME} ${bottleneck_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${pandas_URL} + GIT_TAG ${pandas_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pandas_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pandas_NAME) From 8914e34c232f536daad3a75928f048d4386dcef9 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:18:04 -0400 Subject: [PATCH 020/125] statsmodels: Builds on pandas ( actually depends on it as well ). Provides more advanced statistical analysis. --- statsmodels.cmake | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 statsmodels.cmake diff --git a/statsmodels.cmake b/statsmodels.cmake new file mode 100644 index 0000000..0aa413f --- /dev/null +++ b/statsmodels.cmake @@ -0,0 +1,46 @@ +# A statistical analysis library that builds on pandas. +# +# Used in pandas place in the SciPy Stack as it requires pandas and extends in +# many ways. + + +if (NOT statsmodels_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (cython) +include (nose) +include (numpy) +include (scipy) +include (matplotlib) +include (patsy) +include (pandas) + +external_git_repo(statsmodels + v0.5.0 #82e027e91cac47cfcfbcab754a244731cd726f06 + https://github.com/statsmodels/statsmodels) + +message ("Installing ${statsmodels_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${statsmodels_NAME} + DEPENDS ${python_NAME} ${cython_NAME} ${nose_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${patsy_NAME} ${pandas_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${statsmodels_URL} + GIT_TAG ${statsmodels_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${statsmodels_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT statsmodels_NAME) From 680415692de9483e678798b7fa65ba743b9fae9d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:22:44 -0400 Subject: [PATCH 021/125] mpc: Added mpc, which is commonly used in conjunction with gmp and mpfr ( already included ). This is also required by gmpy, which provides Python bindings to these three libraries to allow the use of large precision numbers with high efficiency. --- mpc.cmake | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 mpc.cmake diff --git a/mpc.cmake b/mpc.cmake new file mode 100644 index 0000000..8deb742 --- /dev/null +++ b/mpc.cmake @@ -0,0 +1,45 @@ +# A useful addition to gmp and mpfr, which were already included. +# +# Required by gmpy. + +if (NOT mpc_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (PatchSupport) + +include (gmp) +include (mpfr) + +external_source (mpc + 1.0.2 + mpc-1.0.2.tar.gz + 68fadff3358fb3e7976c7a398a0af4c3 + ftp://ftp.gnu.org/gnu/mpc/) + +message ("Installing ${mpc_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${mpc_NAME} + DEPENDS ${gmp_NAME} ${mpfr_NAME} + PREFIX ${BUILDEM_DIR} + URL ${mpc_URL} + URL_MD5 ${mpc_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${mpc_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + --with-gmp=${BUILDEM_DIR} # Standard. See http://code.google.com/p/gmpy/wiki/InstallingGmpy2 + --with-mpfr=${BUILDEM_DIR} # Standard. See http://code.google.com/p/gmpy/wiki/InstallingGmpy2 + LDFLAGS=${BUILDEM_LDFLAGS} + CPPFLAGS=-I${BUILDEM_DIR}/include + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${mpc_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT mpc_NAME) \ No newline at end of file From 7b0a32c1dae8e681f0879816898707b0d48c6119 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:25:38 -0400 Subject: [PATCH 022/125] gmpy: Provides Python bindings to gmp, mpfr, and mpc. In short, allows high precision numbers in Python. --- gmpy.cmake | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 gmpy.cmake diff --git a/gmpy.cmake b/gmpy.cmake new file mode 100644 index 0000000..44ea9ce --- /dev/null +++ b/gmpy.cmake @@ -0,0 +1,46 @@ +# Python bindings to the very versatile, established gmp, mpfr, and mpc. +# +# Used by SymPy. Though, can be used independently. + + +if (NOT gmpy_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (gmp) +include (mpfr) +include (mpc) + + +external_source (gmpy + 2.0.3 + gmpy2-2.0.3.zip + 63f367b4dceb20dcd72c143e7c9a8632 + http://gmpy.googlecode.com/files/ + FORCE) + + +message ("Installing ${gmpy_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${gmpy_NAME} + DEPENDS ${python_NAME} ${gmp_NAME} ${mpfr_NAME} ${mpc_NAME} + PREFIX ${BUILDEM_DIR} + URL ${gmpy_URL} + URL_MD5 ${gmpy_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build --prefix=${BUILDEM_DIR} + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install --prefix=${BUILDEM_DIR} +) + +set_target_properties(${gmpy_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT gmpy_NAME) From d2188be5bbebfe696ef71cd600c8a02c8b118b85 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:28:15 -0400 Subject: [PATCH 023/125] sympy: Provides support for symbolic on top of numeric calculations. Provides support for high precision calculation using gmpy with its bindings to gmp, mpfr, and mpc. Part of the SciPy stack. --- sympy.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sympy.cmake diff --git a/sympy.cmake b/sympy.cmake new file mode 100644 index 0000000..d103635 --- /dev/null +++ b/sympy.cmake @@ -0,0 +1,41 @@ +# Provides symbolic algebra support for Python. Part of the scipy stack. + + +if (NOT sympy_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (cython) +include (gmpy) +include (numpy) +include (scipy) +include (ipython) + +external_git_repo(sympy + sympy-0.7.3 #f44c2c6afb1eaf5f1071b49bcd147e0d6197923a + https://github.com/sympy/sympy) + +message ("Installing ${sympy_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${sympy_NAME} + DEPENDS ${python_NAME} ${cython_NAME} ${gmpy_NAME} ${numpy_NAME} ${scipy_NAME} ${ipython_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${sympy_URL} + GIT_TAG ${sympy_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sympy_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sympy_NAME) From 251ec6feca871e478b10c986853afe05d870e7b8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:31:01 -0400 Subject: [PATCH 024/125] sympy: Corrected comment. --- sympy.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sympy.cmake b/sympy.cmake index d103635..9505cae 100644 --- a/sympy.cmake +++ b/sympy.cmake @@ -1,4 +1,4 @@ -# Provides symbolic algebra support for Python. Part of the scipy stack. +# Provides symbolic algebra support for Python. Part of the SciPy stack. if (NOT sympy_NAME) From d1161f6297c7e75106f3f02e0bf5252ebb04a76d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:52:15 -0400 Subject: [PATCH 025/125] pep8: Added. Provides support for PEP8. --- pep8.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pep8.cmake diff --git a/pep8.cmake b/pep8.cmake new file mode 100644 index 0000000..5110950 --- /dev/null +++ b/pep8.cmake @@ -0,0 +1,37 @@ +# Provides support for PEP8. +# Required by Spyder. + +if (NOT pep8_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_git_repo(pep8 + 1.5.6 #96290d48b1334fe8542666174d7775cda3f46d9a + https://github.com/jcrocholl/pep8) + + +# Download and install pep8 +message ("Installing ${pep8_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pep8_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${pep8_URL} + GIT_TAG ${pep8_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pep8_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pep8_NAME) \ No newline at end of file From 9ddd88c0fccd89ddfb754c92a17dfbc5e0fc61ed Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:52:57 -0400 Subject: [PATCH 026/125] pyflakes: A passive Python analyzer and error detector. Used by Spyder. --- pyflakes.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pyflakes.cmake diff --git a/pyflakes.cmake b/pyflakes.cmake new file mode 100644 index 0000000..4883974 --- /dev/null +++ b/pyflakes.cmake @@ -0,0 +1,39 @@ +# A passive Python analyzer and error detector. +# Required by Spyder. + +if (NOT pyflakes_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (pyflakes + 1.1.0 + pyflakes-0.8.1.tar.gz + 905fe91ad14b912807e8fdc2ac2e2c23 + https://pypi.python.org/packages/source/p/pyflakes/) + + +# Download and install pyflakes +message ("Installing ${pyflakes_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pyflakes_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pyflakes_URL} + URL_MD5 ${pyflakes_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pyflakes_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pyflakes_NAME) \ No newline at end of file From 9695aadca9f7258ecc83cc7215b490ea576d39d7 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:54:21 -0400 Subject: [PATCH 027/125] pylint: Python analyzer and error detector. Also, checks for bad smells. Used by Spyder. --- pylint.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pylint.cmake diff --git a/pylint.cmake b/pylint.cmake new file mode 100644 index 0000000..6d44517 --- /dev/null +++ b/pylint.cmake @@ -0,0 +1,39 @@ +# Another Python code analyzer and error detector like pyflakes. Also, checks for bad smells. +# Required by Spyder. + +if (NOT pylint_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (pylint + 1.1.0 + pylint-1.1.0.tar.gz + 017299b5911838a9347a71de5f946afc + https://pypi.python.org/packages/source/p/pylint) + + +# Download and install pylint +message ("Installing ${pylint_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pylint_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pylint_URL} + URL_MD5 ${pylint_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pylint_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pylint_NAME) \ No newline at end of file From 8f9f3b100fdfb6decb2d7971cb16a9944887d8d8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 16:55:50 -0400 Subject: [PATCH 028/125] rope: Added to provide refactoring support for Python. Used by Spyder. --- rope.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 rope.cmake diff --git a/rope.cmake b/rope.cmake new file mode 100644 index 0000000..888ad3b --- /dev/null +++ b/rope.cmake @@ -0,0 +1,39 @@ +# Refactoring for Python. +# Required by Spyder. + +if (NOT rope_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_source (rope + 0.9.4 + rope-0.9.4.tar.gz + 6c654c6892f78008e04e2d65f9f859bb + https://pypi.python.org/packages/source/r/rope/) + + +# Download and install rope +message ("Installing ${rope_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${rope_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + URL ${rope_URL} + URL_MD5 ${rope_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${rope_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT rope_NAME) \ No newline at end of file From b2c16b454e7b674b6d6578b3c8d0f581f89533ef Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 17:01:32 -0400 Subject: [PATCH 029/125] spyder: Added Spyder. However, it currently is broken. Until WebKit is added back to Qt and PyQt, it will remain broken. It raises an error message to this effect if anyone tries to build it. If WebKit is fixed, feel free to comment the error message and try out the build. --- spyder.cmake | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 spyder.cmake diff --git a/spyder.cmake b/spyder.cmake new file mode 100644 index 0000000..f8ecd16 --- /dev/null +++ b/spyder.cmake @@ -0,0 +1,57 @@ +# A MATLAB styled IDE for Python. +# +# Would be nice if this worked. However, it requires QtWebKit, which is currently broken. QtWebKit does not build cleanly and may require patches to Qt and/or PyQt. +# + + +message(FATAL_ERROR "Spyder does not currently work. Though it can build, it requires features from Qt and PyQt that are not currently supported. In particular, it needs to QtWebKit.") + + +if (NOT spyder_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) +include (pep8) +include (pyqt4) +include (sphinxcontrib-napoleon) # Nice Sphinx docs +include (nose) +include (rope) +include (pyflakes) +include (pygments) +include (pylint) +include (psutil) +include (ipython) + + +external_source (spyder + 2.2.5 + spyder-2.2.5.zip + 1c9aa650dae9f883616e917803f8a3be + https://bitbucket.org/spyder-ide/spyderlib/downloads) + + +# Download and install spyder +message ("Installing ${spyder_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${spyder_NAME} + DEPENDS ${python_NAME} ${pep8_NAME} ${pyqt4_NAME} ${sphinxcontrib-napoleon} ${nose_NAME} ${rope_NAME} ${pyflakes_NAME} ${pygments_NAME} ${pylint_NAME} ${psutil_NAME} ${ipython_NAME} + PREFIX ${BUILDEM_DIR} + URL ${spyder_URL} + URL_MD5 ${spyder_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${spyder_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT spyder_NAME) \ No newline at end of file From 6e6fc7193003205411bc35ec41de7ba009343459 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 17:12:02 -0400 Subject: [PATCH 030/125] scipy-stack: Provides a custom target for installing the full SciPy stack. Includes everything in the SciPy stack and in a few cases a little extra. Does not include Spyder. --- scipy-stack.cmake | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scipy-stack.cmake diff --git a/scipy-stack.cmake b/scipy-stack.cmake new file mode 100644 index 0000000..a16468d --- /dev/null +++ b/scipy-stack.cmake @@ -0,0 +1,32 @@ +# Pseudo-package for installing the full SciPy stack. + +if (NOT scipy-stack_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +scipy-stack_NAME = "scipy-stack" + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (python) +include (sphinxcontrib-napoleon) # Nice Sphinx docs +include (pyqt4) +include (numpy) +include (scipy) +include (matplotlib) +include (statsmodels) # Includes pandas as a dependency +include (scikit-image) +include (scikit-learn) +include (sympy) # Pulls in gmpy2 +include (ipython) +include (nose) + + +add_custom_target(scipy-stack + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} +) + +endif (NOT scipy-stack_NAME) \ No newline at end of file From c5fd53a361e9b821670688910d24ce6fc5727057 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 18:11:06 -0400 Subject: [PATCH 031/125] gmp: Add / after url. --- gmp.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gmp.cmake b/gmp.cmake index 27602f5..32c9b8c 100644 --- a/gmp.cmake +++ b/gmp.cmake @@ -15,7 +15,7 @@ external_source (gmp 5.0.5 gmp-5.0.5.tar.bz2 041487d25e9c230b0c42b106361055fe - ftp://ftp.gnu.org/gnu/gmp) + ftp://ftp.gnu.org/gnu/gmp/) message ("Installing ${gmp_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${gmp_NAME} From cc1a6a61452720a5bd1291dcc0139212141bef3b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 18:46:37 -0400 Subject: [PATCH 032/125] pylint: Add / after url. --- pylint.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylint.cmake b/pylint.cmake index 6d44517..a21a7d9 100644 --- a/pylint.cmake +++ b/pylint.cmake @@ -15,7 +15,7 @@ external_source (pylint 1.1.0 pylint-1.1.0.tar.gz 017299b5911838a9347a71de5f946afc - https://pypi.python.org/packages/source/p/pylint) + https://pypi.python.org/packages/source/p/pylint/) # Download and install pylint From e7f691dc64db3622efc814bfde385824cab6efb5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 18:47:21 -0400 Subject: [PATCH 033/125] python-dateutil: Add / after URL. --- python-dateutil.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-dateutil.cmake b/python-dateutil.cmake index c72f98a..cd11047 100644 --- a/python-dateutil.cmake +++ b/python-dateutil.cmake @@ -17,7 +17,7 @@ external_source (python-dateutil 1.5 python-dateutil-1.5.tar.gz 35f3732db3f2cc4afdc68a8533b60a52 - https://labix.org/download/python-dateutil) + https://labix.org/download/python-dateutil/) # Download and install python-dateutil From 53c7ee45c7e7daf2e73119994a060f57f402eee7 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 18:48:35 -0400 Subject: [PATCH 034/125] spyder: Add / after URL. --- spyder.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spyder.cmake b/spyder.cmake index f8ecd16..9dd566e 100644 --- a/spyder.cmake +++ b/spyder.cmake @@ -33,7 +33,7 @@ external_source (spyder 2.2.5 spyder-2.2.5.zip 1c9aa650dae9f883616e917803f8a3be - https://bitbucket.org/spyder-ide/spyderlib/downloads) + https://bitbucket.org/spyder-ide/spyderlib/downloads/) # Download and install spyder From 72fc1fbde1866fbde3fc36b9cacf5b706ac74ee2 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 19:26:10 -0400 Subject: [PATCH 035/125] mpfr: Link used for downloading mpfr no longer works. Added a new one that does work. Verified that the md5 is a match. --- mpfr.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpfr.cmake b/mpfr.cmake index 2fbe10a..50008dc 100644 --- a/mpfr.cmake +++ b/mpfr.cmake @@ -18,7 +18,7 @@ external_source (mpfr 3.1.1 mpfr-3.1.1.tar.gz 769411e241a3f063ae1319eb5fac2462 - http://www.mpfr.org/mpfr-current/) + ftp://ftp.gnu.org/gnu/mpfr/) message ("Installing ${mpfr_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${mpfr_NAME} From afe3fac715bb9a687bcd58a20bceba7244d37eb8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 22 Apr 2014 22:18:43 -0400 Subject: [PATCH 036/125] scipy-stack: Fixed a variable not being set correctly. --- scipy-stack.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scipy-stack.cmake b/scipy-stack.cmake index a16468d..6547753 100644 --- a/scipy-stack.cmake +++ b/scipy-stack.cmake @@ -4,7 +4,7 @@ if (NOT scipy-stack_NAME) CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -scipy-stack_NAME = "scipy-stack" +set(scipy-stack_NAME "scipy-stack") include (ExternalProject) include (ExternalSource) From a4d5559a2a9d5b1a45826db977043069d29e2669 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 23 Apr 2014 17:07:12 -0400 Subject: [PATCH 037/125] openblas: Replaced head by working commit. Removed TARGET specification (seems to be working without it). README_openblas: Added README to for openblas to explain TARGET specification and point to further information. --- README_openblas.txt | 7 +++++++ openblas.cmake | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 README_openblas.txt diff --git a/README_openblas.txt b/README_openblas.txt new file mode 100644 index 0000000..6bef511 --- /dev/null +++ b/README_openblas.txt @@ -0,0 +1,7 @@ +If you are having trouble building OpenBLAS out of the box, you may need to specify your CPU Architecture. +Common architecture options include SandyBridge and Haswell. They can be specified by using the TARGET flag. +For example, TARGET=SANDYBRIDGE will build for the SandyBridge architecture. Similarly, TARGET=HASWELL will +target the Haswell (or Crystalwell) architecture(s). More information can be found on the OpenBLAS GitHub +webpage located ( https://github.com/xianyi/OpenBLAS/ ) here. To do this simply modify the BUILD_COMMAND to +include this flag ____after____ the call to $(MAKE) as it must be an argument to make. It is recommend the +same be done for the INSTALL_COMMAND as well. \ No newline at end of file diff --git a/openblas.cmake b/openblas.cmake index 4fc2ce2..0724059 100644 --- a/openblas.cmake +++ b/openblas.cmake @@ -10,8 +10,7 @@ include (ExternalProject) include (ExternalSource) external_git_repo (openblas - #v0.2.8 - HEAD + 4d42368214f2fd102b2d163c086e0f2d8c166dc6 https://github.com/xianyi/OpenBLAS) message ("Installing ${openblas_NAME} into ilastik build area: ${BUILDEM_DIR} ...") @@ -23,11 +22,11 @@ ExternalProject_Add(${openblas_NAME} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND "" - # Added Sandybridge target. This is required for SandyBridge architecture. It also will optimize for Haswell architechture, which includes Clearwell. - BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) NO_AVX=1 NO_AFFINITY=1 TARGET=SANDYBRIDGE -j8 + # Add TARGET=xxx (where xxx is an architecture) to the BUILD_COMMAND to optimize and/or avoid particular build errors. See README_openblas.txt for details. + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) NO_AVX=1 NO_AFFINITY=1 -j8 BUILD_IN_SOURCE 1 - # Added Sandybridge target. This is required for SandyBridge architecture. It also will optimize for Haswell architechture, which includes Clearwell. - INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PREFIX=${BUILDEM_DIR} TARGET=SANDYBRIDGE install && + # Add TARGET=xxx (where xxx is an architecture) to the BUILD_COMMAND to optimize and/or avoid particular build errors. See README_openblas.txt for details. + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PREFIX=${BUILDEM_DIR} install && ln -fs libopenblas.so ${BUILDEM_DIR}/lib/libblas.so && ln -fs libopenblas.so ${BUILDEM_DIR}/lib/liblapack.so ) From 476ab119d558c23b3bc858011cc42cb5d06ff6d5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 23 Apr 2014 17:34:07 -0400 Subject: [PATCH 038/125] README_openblas: Added more details about default TARGET (NEHALEM) and a link to a list of architectures options for TARGET in the OpenBLAS repo. Broke up the contents a nicer more reader friendly way. --- README_openblas.txt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README_openblas.txt b/README_openblas.txt index 6bef511..17a311b 100644 --- a/README_openblas.txt +++ b/README_openblas.txt @@ -1,7 +1,15 @@ If you are having trouble building OpenBLAS out of the box, you may need to specify your CPU Architecture. -Common architecture options include SandyBridge and Haswell. They can be specified by using the TARGET flag. -For example, TARGET=SANDYBRIDGE will build for the SandyBridge architecture. Similarly, TARGET=HASWELL will -target the Haswell (or Crystalwell) architecture(s). More information can be found on the OpenBLAS GitHub -webpage located ( https://github.com/xianyi/OpenBLAS/ ) here. To do this simply modify the BUILD_COMMAND to -include this flag ____after____ the call to $(MAKE) as it must be an argument to make. It is recommend the -same be done for the INSTALL_COMMAND as well. \ No newline at end of file +Common architecture options include SandyBridge and Haswell. Even if your build worked correctly, it may +not be optimal. The default architecture, if not specified, is Nehalem, which is probably not the ideal +choice unless using an older computer. + +To specify the architecture simply use the TARGET flag. For example, TARGET=SANDYBRIDGE will build for +the SandyBridge architecture. Similarly, TARGET=HASWELL will target the Haswell (or Crystalwell) +architecture(s). To do this simply modify the BUILD_COMMAND to include this flag ____after____ the call +to $(MAKE) as it must be an argument to make. It is recommend the same be done for the INSTALL_COMMAND +as well. + +More information can be found on the OpenBLAS GitHub webpage ( https://github.com/xianyi/OpenBLAS/ ). A list +of architectures supported can be found here ( https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt ). +Note that at the time of writing this READNME, the list has not been updated in about a year; so, it does not +list HASWELL even though it is supported by the version we are using. \ No newline at end of file From f99da5ab7d9776b11df7c71291b253636016845f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 23 Apr 2014 18:27:59 -0400 Subject: [PATCH 039/125] vtk: Forced manual reference counting as garbage collection is deprecated and VTK has not fully implemented automatic reference counting. --- vtk.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vtk.cmake b/vtk.cmake index 864cecc..e464d99 100644 --- a/vtk.cmake +++ b/vtk.cmake @@ -81,6 +81,10 @@ ExternalProject_Add(${vtk_NAME} -DZLIB_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR} -DZLIB_LIBRARY=${BUILDEM_LIB_DIR}/libz.${BUILDEM_PLATFORM_DYLIB_EXTENSION} + # XCode Tools 5.1 moving forward no longer supports garbage collection ( -fobjc-gc flag ). However, Mac, AFAIK + # still supports Manual and Automatic Reference Counting. By setting VTK_REQUIRED_OBJCXX_FLAGS to "", manual + # reference counting is used by VTK, which should work on other Mac OS versions. + -DVTK_REQUIRED_OBJCXX_FLAGS="" # We want vtk to be built in parallel if possible. # Therefore we use $(MAKE) instead of 'make', which somehow enables sub-make files to use the jobserver correctly. From 5f0ad7c991eb1aa3a1e7ea9ac535ef96d42279a3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 23 Apr 2014 19:32:37 -0400 Subject: [PATCH 040/125] vtk: Added note about VTK 5 not supporting automatic reference counting. --- vtk.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vtk.cmake b/vtk.cmake index e464d99..df090fa 100644 --- a/vtk.cmake +++ b/vtk.cmake @@ -82,7 +82,8 @@ ExternalProject_Add(${vtk_NAME} -DZLIB_LIBRARY=${BUILDEM_LIB_DIR}/libz.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # XCode Tools 5.1 moving forward no longer supports garbage collection ( -fobjc-gc flag ). However, Mac, AFAIK - # still supports Manual and Automatic Reference Counting. By setting VTK_REQUIRED_OBJCXX_FLAGS to "", manual + # still supports Manual and Automatic Reference Counting. According to VTK, version 6 will support automatic + # reference counting, but the version we are using does not. By setting VTK_REQUIRED_OBJCXX_FLAGS to "", manual # reference counting is used by VTK, which should work on other Mac OS versions. -DVTK_REQUIRED_OBJCXX_FLAGS="" From 964434c41a6c35d810f0cb0bc7c341be5ca549f3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 27 May 2014 12:04:18 -0400 Subject: [PATCH 041/125] joblib: Provided a separate cmake for joblib. Tested and it works. This isn't strictly necessary if scikit-learn is installed as it will have joblib under sklearn.externals. However, it doesn't hurt to have it separated, especially, for those, who only want joblib. This uses the same version that scikit-learn uses currently ( 0.7.1 ). --- joblib.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 joblib.cmake diff --git a/joblib.cmake b/joblib.cmake new file mode 100644 index 0000000..18b4d19 --- /dev/null +++ b/joblib.cmake @@ -0,0 +1,37 @@ +# Adds joblib support. Allows for advanced memoizing with disk and +# advanced multi-threading techniques. + +if (NOT joblib_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) + +external_git_repo(joblib + 0.7.1 # 40fc9389c4e18510ba2a19c8bd8502fdbdd7e165 + https://github.com/joblib/joblib) + + +# Download and install joblib +message ("Installing ${joblib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${joblib_NAME} + DEPENDS ${python_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${joblib_URL} + GIT_TAG ${joblib_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${joblib_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT joblib_NAME) \ No newline at end of file From 2e085b0e607700c6c66481c6fc665c461d591753 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 27 May 2014 12:06:21 -0400 Subject: [PATCH 042/125] Updated scikit-image to 0.9.3 --- scikit-image.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scikit-image.cmake b/scikit-image.cmake index 5524393..572ea6e 100644 --- a/scikit-image.cmake +++ b/scikit-image.cmake @@ -16,10 +16,10 @@ include (numpy) include (scipy) external_source (scikit-image - 0.7.2 - scikit-image-0.7.2.tar.gz - 80eb9862fa09c7e06eda6e2a9fc4042f - http://pypi.python.org/packages/source/s/scikit-image) + 0.9.3 + scikit-image-0.9.3.tar.gz + f010e0cd46ee2996a6875c96b216e768 + https://pypi.python.org/packages/source/s/scikit-image) message ("Installing ${scikit-image_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${scikit-image_NAME} From 8713ca779c9b3a0bc3bd0f9ab4a137bc7070a466 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 30 May 2014 11:24:59 -0400 Subject: [PATCH 043/125] python: Fails on Mavericks when multithreaded. Forced to be single threaded. --- python.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python.cmake b/python.cmake index a8b01ca..14ecc55 100644 --- a/python.cmake +++ b/python.cmake @@ -65,7 +65,7 @@ ExternalProject_Add(${python_NAME} ${PYTHON_DEBUG_CONFIG_ARGS} "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" - BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) -j1 # Fails on Mavericks when multithreaded. INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PYTHONAPPSDIR=${BUILDEM_BIN_DIR}/${python_NAME} install BUILD_IN_SOURCE 1 # Required for Mac From 128ac7f06c8a1f674fd08cdfd553e6f27f06ecb0 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 22 Jun 2014 12:19:23 -0400 Subject: [PATCH 044/125] futures: Apparently, the futures package is being used by tiling.py in volumina. As a result, futures has been added as a cmake. --- futures.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 futures.cmake diff --git a/futures.cmake b/futures.cmake new file mode 100644 index 0000000..2e29355 --- /dev/null +++ b/futures.cmake @@ -0,0 +1,40 @@ +# +# Install futures library from source. +# + +if (NOT futures_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) + +external_source (futures + 2.1.6 + futures-2.1.6.tar.gz + cfab9ac3cd55d6c7ddd0546a9f22f453 + https://pypi.python.org/packages/source/f/futures/futures-2.1.6.tar.gz) + + +message ("Installing ${futures_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${futures_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + URL ${futures_URL} + URL_MD5 ${futures_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND "" +) + +set_target_properties(${futures_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT futures_NAME) From 39782c7a1df69b621344da4edeb806547d91ed3b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Mon, 7 Jul 2014 13:30:44 -0400 Subject: [PATCH 045/125] sqlite: Created a cmake for sqlite. This is expected by Python to create the sqlite3 module ( https://docs.python.org/2/library/sqlite3.html ). python: Added dependency on sqlite. --- python.cmake | 4 +++- sqlite.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 sqlite.cmake diff --git a/python.cmake b/python.cmake index 14ecc55..a25b713 100644 --- a/python.cmake +++ b/python.cmake @@ -16,6 +16,8 @@ include (PatchSupport) include (zlib) include (openssl) # without openssl, hashlib might have missing encryption methods +include (sqlite) # required to implement the standard module sqlite3 + # (https://docs.python.org/2/library/sqlite3.html) external_source (python 2.7.6 @@ -49,7 +51,7 @@ if (${PYTHON_BUILD_DEBUG}) endif() ExternalProject_Add(${python_NAME} - DEPENDS ${zlib_NAME} ${openssl_NAME} + DEPENDS ${zlib_NAME} ${openssl_NAME} ${sqlite_NAME} PREFIX ${BUILDEM_DIR} URL ${python_URL} URL_MD5 ${python_MD5} diff --git a/sqlite.cmake b/sqlite.cmake new file mode 100644 index 0000000..8629c07 --- /dev/null +++ b/sqlite.cmake @@ -0,0 +1,39 @@ +# Builds SQLite, which Python uses to implement the standard library module +# sqlite3 ( https://docs.python.org/2/library/sqlite3.html ). + +if (NOT sqlite_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (PatchSupport) + + +external_source (sqlite + 3.8.5 + sqlite-autoconf-3080500.tar.gz + 0544ef6d7afd8ca797935ccc2685a9ed + http://www.sqlite.org/2014/) + +message ("Installing ${sqlite_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${sqlite_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sqlite_URL} + URL_MD5 ${sqlite_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${sqlite_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + LDFLAGS=${BUILDEM_LDFLAGS} + CPPFLAGS=-I${BUILDEM_DIR}/include + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${sqlite_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sqlite_NAME) \ No newline at end of file From b03d56987f18892755927dc1b9b0d2ceb2b39093 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 8 Jul 2014 13:40:27 -0400 Subject: [PATCH 046/125] scipy-stack: Changed all arguments to add_custom_target to be use NAME strings. --- scipy-stack.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scipy-stack.cmake b/scipy-stack.cmake index 6547753..416262d 100644 --- a/scipy-stack.cmake +++ b/scipy-stack.cmake @@ -25,8 +25,8 @@ include (ipython) include (nose) -add_custom_target(scipy-stack - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} +add_custom_target(${scipy-stack_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} ) endif (NOT scipy-stack_NAME) \ No newline at end of file From d2b6f6f6a68728747235a98c36a50a04c8bda3aa Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 8 Jul 2014 14:28:11 -0400 Subject: [PATCH 047/125] scipy-stack: Changed from using add_custom_target to ExternalProject_Add (with null steps). This has the same effect and works nicely with the build system. --- scipy-stack.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scipy-stack.cmake b/scipy-stack.cmake index 416262d..c5ee665 100644 --- a/scipy-stack.cmake +++ b/scipy-stack.cmake @@ -25,8 +25,13 @@ include (ipython) include (nose) -add_custom_target(${scipy-stack_NAME} +ExternalProject_Add(${scipy-stack_NAME} DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} + DOWNLOAD_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + TEST_COMMAND "" + INSTALL_COMMAND "" ) endif (NOT scipy-stack_NAME) \ No newline at end of file From 058601243e48aaff984ce17fd152af2dae30e05a Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 8 Jul 2014 14:52:55 -0400 Subject: [PATCH 048/125] scipy-stack: Made sure to exclude it from the all target. Also, added a message before beginning the build process. --- scipy-stack.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scipy-stack.cmake b/scipy-stack.cmake index c5ee665..8eca628 100644 --- a/scipy-stack.cmake +++ b/scipy-stack.cmake @@ -25,6 +25,7 @@ include (ipython) include (nose) +message ("Installing ${scipy-stack_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${scipy-stack_NAME} DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyqt4_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${statsmodels_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${sympy_NAME} ${ipython_NAME} ${nose_NAME} DOWNLOAD_COMMAND "" @@ -34,4 +35,6 @@ ExternalProject_Add(${scipy-stack_NAME} INSTALL_COMMAND "" ) +set_target_properties(${scipy-stack_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + endif (NOT scipy-stack_NAME) \ No newline at end of file From 8b67672c85a0afe226a44dda1977bc5b093d9bef Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 16 Jul 2014 19:40:38 -0400 Subject: [PATCH 049/125] h5py: Updated version to 2.3.1. --- h5py.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/h5py.cmake b/h5py.cmake index acfd8ec..29a4326 100644 --- a/h5py.cmake +++ b/h5py.cmake @@ -15,10 +15,10 @@ include (hdf5) include (numpy) external_source (h5py - 2.1.3 - h5py-2.1.3.tar.gz - afd3c14f763339e186dd9cd24eb2eb74 - http://h5py.googlecode.com/files) + 2.3.1 + h5py-2.3.1.tar.gz + 8f32f96d653e904d20f9f910c6d9dd91 + https://pypi.python.org/packages/source/h/h5py) message ("Installing ${h5py_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${h5py_NAME} From df779bb2cd0dc64466cff9024e593e6741894ee9 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 2 Aug 2014 19:25:43 -0400 Subject: [PATCH 050/125] julia: Added julia as a build target. Currently, it builds its own dependencies (many of which overlap with things that are already built). It would be good if this could either be avoided or taken advantage of in the future. Just like OpenBLAS, julia needs to have the architecture specified if the build fails. This can be done with the OPENBLAS_TARGET_ARCH variable. --- julia.cmake | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 julia.cmake diff --git a/julia.cmake b/julia.cmake new file mode 100644 index 0000000..f5d6846 --- /dev/null +++ b/julia.cmake @@ -0,0 +1,35 @@ +# A standard asynchronous message passing library. +# Required by pyzmq, which is used by iPython. + +if (NOT julia_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +# Need to use v0.3.0-rc1 as there is a build error in the lower versions where julia is not properly installed in ${BUILDEM_DIR}/bin. Attempts to install it there or links to the actual executable resulted in mismatches between runtime and linking libraries. Using this version resolves these problems. +external_git_repo(julia + v0.3.0-rc1 # 3737cc28bc3116b21fb2502cdccbbeef5fbcd1b3 + https://github.com/JuliaLang/julia) + +message ("Installing ${julia_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${julia_NAME} + DEPENDS "" + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${julia_URL} + GIT_TAG ${julia_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + # Julia builds its own dependencies. Trying to get it to share was not straightforward. It builds its own OpenBLAS. So, can suffer from the same problems that OpenBLAS does. Add OPENBLAS_TARGET_ARCH=xxx (where xxx is an architecture) to the BUILD_COMMAND to optimize and/or avoid particular build errors. See README_openblas.txt for details. + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) testall + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install prefix=${BUILDEM_DIR} +) + +set_target_properties(${julia_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT julia_NAME) \ No newline at end of file From c034dcc8fe65e7babe39eae1e414b544afbe735b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 3 Aug 2014 01:04:12 -0400 Subject: [PATCH 051/125] julia: Updated title description. --- julia.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/julia.cmake b/julia.cmake index f5d6846..b2ed67c 100644 --- a/julia.cmake +++ b/julia.cmake @@ -1,5 +1,4 @@ -# A standard asynchronous message passing library. -# Required by pyzmq, which is used by iPython. +# Builds julia. if (NOT julia_NAME) From a441f6c7f380c0fcd33a0f1562c856bb2a335320 Mon Sep 17 00:00:00 2001 From: Stephen Plaza Date: Tue, 19 Aug 2014 18:39:21 -0400 Subject: [PATCH 052/125] updates openssl package to work on Fedora 20 --- openssl.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openssl.cmake b/openssl.cmake index 5637396..fc7b323 100644 --- a/openssl.cmake +++ b/openssl.cmake @@ -13,9 +13,9 @@ include (BuildSupport) include (zlib) external_source (openssl - 1.0.1c - openssl-1.0.1c.tar.gz - ae412727c8c15b67880aef7bd2999b2e + 1.0.1i + openssl-1.0.1i.tar.gz + c8dc151a671b9b92ff3e4c118b174972 http://www.openssl.org/source) if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") From b1db86a29900ad6291cb4ce86290d4850f3344c8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 20 Aug 2014 20:00:28 -0400 Subject: [PATCH 053/125] pip.cmake: Added pip for installing Python packages. --- pip.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pip.cmake diff --git a/pip.cmake b/pip.cmake new file mode 100644 index 0000000..f8ebcb8 --- /dev/null +++ b/pip.cmake @@ -0,0 +1,37 @@ +# Adds pip, the python installer. + +if (NOT pip_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) + +external_git_repo(pip + 1.5.6 # 81f21f2261d422d243f66b2dfeef0faae72ab119 + https://github.com/pypa/pip) + + +# Download and install pip +message ("Installing ${pip_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pip_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${pip_URL} + GIT_TAG ${pip_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pip_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pip_NAME) From b2675b3216559d5bdde0c957a3cc92ce1e007e4e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 29 Aug 2014 20:07:28 -0400 Subject: [PATCH 054/125] readline.cmake: Added a patch to ensure readline is installed in the package on Linux, if readline is not already installed, as some versions (i.e. CentOS) don't already have readline. patches/readline-setup.patch: Patch that ensures readline is installed on Linux. --- patches/readline-setup.patch | 22 ++++++++++++++++++++++ readline.cmake | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 patches/readline-setup.patch diff --git a/patches/readline-setup.patch b/patches/readline-setup.patch new file mode 100644 index 0000000..110b579 --- /dev/null +++ b/patches/readline-setup.patch @@ -0,0 +1,22 @@ +diff --git a/setup.py b/setup.py +index 1b79682..df5fc3a 100644 +--- a/setup.py ++++ b/setup.py +@@ -24,6 +24,8 @@ if 'darwin' in sysplat: + install_requires += ['readline'] + if 'win32' in sysplat: + install_requires += ['pyreadline'] ++if 'linux' in sysplat: ++ # Check to see if readline is already installed. ++ # If it is, installing this will break the existing readline. ++ has_readline = True ++ try: ++ import readline ++ except ImportError: ++ has_readline = False ++ ++ if not has_readline: ++ install_requires += ['readline'] + + setup( + name = name, diff --git a/readline.cmake b/readline.cmake index 4b14958..54d4045 100644 --- a/readline.cmake +++ b/readline.cmake @@ -27,7 +27,9 @@ ExternalProject_Add(${readline_NAME} GIT_REPOSITORY ${readline_URL} GIT_TAG ${readline_TAG} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Allows readline to be installed for Linux where it may not always be present (i.e. CentOS). + ${readline_SRC_DIR}/setup.py ${PATCH_DIR}/readline-setup.patch CONFIGURE_COMMAND "" BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build BUILD_IN_SOURCE 1 From 682865e69836579c67842ff5532a51eab7a3eb82 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 13:27:49 -0400 Subject: [PATCH 055/125] readline.cmake: Renamed to python-readline.cmake. python-readline.cmake: Renamed from readline.cmake. python-readline.cmake: Updated the name of the patch. patches/readline-setup.patch: Renamed to patches/python-readline-setup.patch. patches/python-readline-setup.patch: Renamed from patches/readline-setup.patch. ipython.cmake: Changed readline to python-readline. --- ipython.cmake | 4 ++-- patches/{readline-setup.patch => python-readline-setup.patch} | 0 readline.cmake => python-readline.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename patches/{readline-setup.patch => python-readline-setup.patch} (100%) rename readline.cmake => python-readline.cmake (94%) diff --git a/ipython.cmake b/ipython.cmake index ac02613..a53a254 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -13,7 +13,7 @@ include (BuildSupport) include (python) include (pyqt4) include (sphinxcontrib-napoleon) # For sphinx extension. Doesn't necessarily need napolean, but it is nice to have and is quick to install. -include (readline) +include (python-readline) include (pyzmq) include (nose) include (pygments) @@ -27,7 +27,7 @@ external_git_repo(ipython message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ipython_NAME} - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${readline_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${python-readline_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${ipython_URL} GIT_TAG ${ipython_TAG} diff --git a/patches/readline-setup.patch b/patches/python-readline-setup.patch similarity index 100% rename from patches/readline-setup.patch rename to patches/python-readline-setup.patch diff --git a/readline.cmake b/python-readline.cmake similarity index 94% rename from readline.cmake rename to python-readline.cmake index 54d4045..34c0a6c 100644 --- a/readline.cmake +++ b/python-readline.cmake @@ -29,7 +29,7 @@ ExternalProject_Add(${readline_NAME} UPDATE_COMMAND "" PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} # Allows readline to be installed for Linux where it may not always be present (i.e. CentOS). - ${readline_SRC_DIR}/setup.py ${PATCH_DIR}/readline-setup.patch + ${readline_SRC_DIR}/setup.py ${PATCH_DIR}/python-readline-setup.patch CONFIGURE_COMMAND "" BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build BUILD_IN_SOURCE 1 From 986b167a2c45e7d2718db568d4b09310172495ca Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 14:02:53 -0400 Subject: [PATCH 056/125] readline.cmake: Added readline to build from source. python.cmake: Added readline as dependency for python. ipython.cmake: Removed python-readline dependency. --- ipython.cmake | 3 +-- python.cmake | 3 ++- readline.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 readline.cmake diff --git a/ipython.cmake b/ipython.cmake index a53a254..ee3feff 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -13,7 +13,6 @@ include (BuildSupport) include (python) include (pyqt4) include (sphinxcontrib-napoleon) # For sphinx extension. Doesn't necessarily need napolean, but it is nice to have and is quick to install. -include (python-readline) include (pyzmq) include (nose) include (pygments) @@ -27,7 +26,7 @@ external_git_repo(ipython message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ipython_NAME} - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${python-readline_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${ipython_URL} GIT_TAG ${ipython_TAG} diff --git a/python.cmake b/python.cmake index a25b713..de532d5 100644 --- a/python.cmake +++ b/python.cmake @@ -16,6 +16,7 @@ include (PatchSupport) include (zlib) include (openssl) # without openssl, hashlib might have missing encryption methods +include (readline) # To support the readline module. include (sqlite) # required to implement the standard module sqlite3 # (https://docs.python.org/2/library/sqlite3.html) @@ -51,7 +52,7 @@ if (${PYTHON_BUILD_DEBUG}) endif() ExternalProject_Add(${python_NAME} - DEPENDS ${zlib_NAME} ${openssl_NAME} ${sqlite_NAME} + DEPENDS ${zlib_NAME} ${openssl_NAME} ${readline_NAME} ${sqlite_NAME} PREFIX ${BUILDEM_DIR} URL ${python_URL} URL_MD5 ${python_MD5} diff --git a/readline.cmake b/readline.cmake new file mode 100644 index 0000000..e214e1f --- /dev/null +++ b/readline.cmake @@ -0,0 +1,40 @@ +# +# Install readline from source. +# + +if (NOT readline_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +external_source (readline + 6.2 + readline-6.2.tar.gz + 67948acb2ca081f23359d0256e9a271c + ftp://ftp.gnu.org/gnu/readline) + +message ("Installing ${readline_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${readline_NAME} + PREFIX ${BUILDEM_DIR} + URL ${readline_URL} + URL_MD5 ${readline_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${readline_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + --enable-shared + --enable-static + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${readline_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT readline_NAME) From f8819692a2f1b4caa28c1acdeea522bed61bdd86 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 15:49:19 -0400 Subject: [PATCH 057/125] readline.cmake: Added patch step for all patches from ( ftp://ftp.gnu.org/pub/gnu/readline/readline-6.2-patches ) applied per file. patches/readline-6.2-callback.patch: Patch for callback.c. patches/readline-6.2-input.patch: Patch for input.c. patches/readline-6.2-patchlevel.patch: Patch for patchlevel. patches/readline-6.2-shobj-conf.patch: Patch for support/shobj-conf. patches/readline-6.2-vi_mode.patch: Patch for vi_mode.c. --- patches/readline-6.2-callback.patch | 15 ++++++ patches/readline-6.2-input.patch | 36 +++++++++++++ patches/readline-6.2-patchlevel.patch | 10 ++++ patches/readline-6.2-shobj-conf.patch | 32 +++++++++++ patches/readline-6.2-vi_mode.patch | 76 +++++++++++++++++++++++++++ readline.cmake | 9 +++- 6 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 patches/readline-6.2-callback.patch create mode 100644 patches/readline-6.2-input.patch create mode 100644 patches/readline-6.2-patchlevel.patch create mode 100644 patches/readline-6.2-shobj-conf.patch create mode 100644 patches/readline-6.2-vi_mode.patch diff --git a/patches/readline-6.2-callback.patch b/patches/readline-6.2-callback.patch new file mode 100644 index 0000000..0ea4028 --- /dev/null +++ b/patches/readline-6.2-callback.patch @@ -0,0 +1,15 @@ +diff --git a/readline-6.2/callback.c b/readline-6.2/callback.c +index 4ee6361..7682cd0 100644 +--- a/readline-6.2/callback.c ++++ b/readline-6.2/callback.c +@@ -148,6 +148,9 @@ rl_callback_read_char () + eof = _rl_vi_domove_callback (_rl_vimvcxt); + /* Should handle everything, including cleanup, numeric arguments, + and turning off RL_STATE_VIMOTION */ ++ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) ++ _rl_internal_char_cleanup (); ++ + return; + } + #endif + diff --git a/patches/readline-6.2-input.patch b/patches/readline-6.2-input.patch new file mode 100644 index 0000000..8fa168f --- /dev/null +++ b/patches/readline-6.2-input.patch @@ -0,0 +1,36 @@ +diff --git a/readline-6.2/input.c b/readline-6.2/input.c +index 7c74c99..b49af88 100644 +--- a/readline-6.2/input.c ++++ b/readline-6.2/input.c +@@ -409,7 +409,7 @@ rl_clear_pending_input () + int + rl_read_key () + { +- int c; ++ int c, r; + + rl_key_sequence_length++; + +@@ -429,14 +429,18 @@ rl_read_key () + { + while (rl_event_hook) + { +- if (rl_gather_tyi () < 0) /* XXX - EIO */ ++ if (rl_get_char (&c) != 0) ++ break; ++ ++ if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */ + { + rl_done = 1; + return ('\n'); + } ++ else if (r == 1) /* read something */ ++ continue; ++ + RL_CHECK_SIGNALS (); +- if (rl_get_char (&c) != 0) +- break; + if (rl_done) /* XXX - experimental */ + return ('\n'); + (*rl_event_hook) (); + diff --git a/patches/readline-6.2-patchlevel.patch b/patches/readline-6.2-patchlevel.patch new file mode 100644 index 0000000..23e43f1 --- /dev/null +++ b/patches/readline-6.2-patchlevel.patch @@ -0,0 +1,10 @@ +diff --git a/readline-6.2/patchlevel b/readline-6.2/patchlevel +index fdf4740..e0ba09d 100644 +--- a/readline-6.2/patchlevel ++++ b/readline-6.2/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-1 ++5 + diff --git a/patches/readline-6.2-shobj-conf.patch b/patches/readline-6.2-shobj-conf.patch new file mode 100644 index 0000000..9b63c93 --- /dev/null +++ b/patches/readline-6.2-shobj-conf.patch @@ -0,0 +1,32 @@ +diff --git a/readline-6.2/support/shobj-conf b/readline-6.2/support/shobj-conf +index 5a63e80..cb3095c 100644 +--- a/readline-6.2/support/shobj-conf ++++ b/readline-6.2/support/shobj-conf +@@ -157,13 +157,15 @@ freebsd[4-9]*|freebsdelf*|dragonfly*) + ;; + + # Darwin/MacOS X +-darwin[89]*|darwin10*) ++darwin[89]*|darwin1[0123]*) + SHOBJ_STATUS=supported + SHLIB_STATUS=supported + + SHOBJ_CFLAGS='-fno-common' + +- SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' ++# SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' ++ # we can finally kill Mac OS X 10.3 ++ SHOBJ_LD='${CC}' + + SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' + SHLIB_LIBSUFF='dylib' +@@ -186,7 +188,7 @@ darwin*|macosx*) + SHLIB_LIBSUFF='dylib' + + case "${host_os}" in +- darwin[789]*|darwin10*) SHOBJ_LDFLAGS='' ++ darwin[789]*|darwin1[0123]*) SHOBJ_LDFLAGS='' + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' + ;; + *) SHOBJ_LDFLAGS='-dynamic' + diff --git a/patches/readline-6.2-vi_mode.patch b/patches/readline-6.2-vi_mode.patch new file mode 100644 index 0000000..ebb349e --- /dev/null +++ b/patches/readline-6.2-vi_mode.patch @@ -0,0 +1,76 @@ +diff --git a/readline-6.2/vi_mode.c b/readline-6.2/vi_mode.c +index 41e1dbb..4408053 100644 +--- a/readline-6.2/vi_mode.c ++++ b/readline-6.2/vi_mode.c +@@ -1114,7 +1114,7 @@ rl_domove_read_callback (m) + rl_beg_of_line (1, c); + _rl_vi_last_motion = c; + RL_UNSETSTATE (RL_STATE_VIMOTION); +- return (0); ++ return (vidomove_dispatch (m)); + } + #if defined (READLINE_CALLBACKS) + /* XXX - these need to handle rl_universal_argument bindings */ +@@ -1234,11 +1234,19 @@ rl_vi_delete_to (count, key) + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } +- else if (vi_redoing) ++ else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } ++ else if (vi_redoing) /* handle redoing `dd' here */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ rl_mark = rl_end; ++ rl_beg_of_line (1, key); ++ RL_UNSETSTATE (RL_STATE_VIMOTION); ++ r = vidomove_dispatch (_rl_vimvcxt); ++ } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { +@@ -1316,11 +1324,19 @@ rl_vi_change_to (count, key) + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } +- else if (vi_redoing) ++ else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */ + { + _rl_vimvcxt->motion = _rl_vi_last_motion; + r = rl_domove_motion_callback (_rl_vimvcxt); + } ++ else if (vi_redoing) /* handle redoing `cc' here */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ rl_mark = rl_end; ++ rl_beg_of_line (1, key); ++ RL_UNSETSTATE (RL_STATE_VIMOTION); ++ r = vidomove_dispatch (_rl_vimvcxt); ++ } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { +@@ -1377,6 +1393,19 @@ rl_vi_yank_to (count, key) + _rl_vimvcxt->motion = '$'; + r = rl_domove_motion_callback (_rl_vimvcxt); + } ++ else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ r = rl_domove_motion_callback (_rl_vimvcxt); ++ } ++ else if (vi_redoing) /* handle redoing `yy' here */ ++ { ++ _rl_vimvcxt->motion = _rl_vi_last_motion; ++ rl_mark = rl_end; ++ rl_beg_of_line (1, key); ++ RL_UNSETSTATE (RL_STATE_VIMOTION); ++ r = vidomove_dispatch (_rl_vimvcxt); ++ } + #if defined (READLINE_CALLBACKS) + else if (RL_ISSTATE (RL_STATE_CALLBACK)) + { + diff --git a/readline.cmake b/readline.cmake index e214e1f..192b378 100644 --- a/readline.cmake +++ b/readline.cmake @@ -22,7 +22,14 @@ ExternalProject_Add(${readline_NAME} URL ${readline_URL} URL_MD5 ${readline_MD5} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # These patches are the result of smashing all of the patches from ( ftp://ftp.gnu.org/pub/gnu/readline/readline-6.2-patches/ ) into one massive patch. + # Then, they have been split out to have one patch per file changed. + ${readline_SRC_DIR}/callback.c ${PATCH_DIR}/readline-6.2-callback.patch + ${readline_SRC_DIR}/input.c ${PATCH_DIR}/readline-6.2-input.patch + ${readline_SRC_DIR}/patchlevel ${PATCH_DIR}/readline-6.2-patchlevel.patch + ${readline_SRC_DIR}/support/shobj-conf ${PATCH_DIR}/readline-6.2-shobj-conf.patch + ${readline_SRC_DIR}/vi_mode.c ${PATCH_DIR}/readline-6.2-vi_mode.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${readline_SRC_DIR}/configure --prefix=${BUILDEM_DIR} --enable-shared From 9bbbed283fef495bc5340c03c3ebb1bdcb4be0ee Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 15:52:16 -0400 Subject: [PATCH 058/125] python.cmake: Removed readline fix for Mac OS as it is no longer necessary. patches/python-fix-readline-bug.sh: Deleted script as it is no longer used. --- patches/python-fix-readline-bug.sh | 3 --- python.cmake | 7 ------- 2 files changed, 10 deletions(-) delete mode 100644 patches/python-fix-readline-bug.sh diff --git a/patches/python-fix-readline-bug.sh b/patches/python-fix-readline-bug.sh deleted file mode 100644 index d024a6b..0000000 --- a/patches/python-fix-readline-bug.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -mv $1/lib/python2.7/lib-dynload/readline.so $1/lib/python2.7/lib-dynload/readline.so.disabled \ No newline at end of file diff --git a/python.cmake b/python.cmake index de532d5..a9ed885 100644 --- a/python.cmake +++ b/python.cmake @@ -74,13 +74,6 @@ ExternalProject_Add(${python_NAME} BUILD_IN_SOURCE 1 # Required for Mac ) -if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - ExternalProject_Add_Step(${python_NAME} ${python_NAME}-fix-readline-bug - COMMAND bash ${PATCH_DIR}/python-fix-readline-bug.sh ${PYTHON_PREFIX} - DEPENDEES install - ) -endif() - set (PYTHON_INCLUDE_PATH ${PYTHON_PREFIX}/include/python2.7) set (PYTHON_LIBRARY_FILE ${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}) set (PYTHON_EXE ${PYTHON_PREFIX}/bin/python) From a8573a780eb9fa6f35b269fc8ed4aee4dba841da Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 16:11:24 -0400 Subject: [PATCH 059/125] python-readline.cmake: Removed python-readline as building readline makes this unnecessary. patches/python-readline-setup.patch: Removed patch as it is no longer necessary. --- patches/python-readline-setup.patch | 22 --------------- python-readline.cmake | 42 ----------------------------- 2 files changed, 64 deletions(-) delete mode 100644 patches/python-readline-setup.patch delete mode 100644 python-readline.cmake diff --git a/patches/python-readline-setup.patch b/patches/python-readline-setup.patch deleted file mode 100644 index 110b579..0000000 --- a/patches/python-readline-setup.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/setup.py b/setup.py -index 1b79682..df5fc3a 100644 ---- a/setup.py -+++ b/setup.py -@@ -24,6 +24,8 @@ if 'darwin' in sysplat: - install_requires += ['readline'] - if 'win32' in sysplat: - install_requires += ['pyreadline'] -+if 'linux' in sysplat: -+ # Check to see if readline is already installed. -+ # If it is, installing this will break the existing readline. -+ has_readline = True -+ try: -+ import readline -+ except ImportError: -+ has_readline = False -+ -+ if not has_readline: -+ install_requires += ['readline'] - - setup( - name = name, diff --git a/python-readline.cmake b/python-readline.cmake deleted file mode 100644 index 34c0a6c..0000000 --- a/python-readline.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# Pulls down the right readline depending on whether it is Windows or Mac using anyreadline. -# Does nothing on Linux as it should have GNU readline. -# -# Required by iPython. - - -if (NOT readline_NAME) - -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - -include (ExternalProject) -include (ExternalSource) -include (BuildSupport) -include (TemplateSupport) - -include (python) -include (setuptools) - -external_git_repo(readline - v0_1_1 #0796d3eaa9158f6ac82b7f8eea96f372851b79e3 - https://github.com/pombredanne/anyreadline) - -message ("Installing ${readline_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") -ExternalProject_Add(${readline_NAME} - DEPENDS ${python_NAME} ${setuptools_NAME} - PREFIX ${BUILDEM_DIR} - GIT_REPOSITORY ${readline_URL} - GIT_TAG ${readline_TAG} - UPDATE_COMMAND "" - PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} - # Allows readline to be installed for Linux where it may not always be present (i.e. CentOS). - ${readline_SRC_DIR}/setup.py ${PATCH_DIR}/python-readline-setup.patch - CONFIGURE_COMMAND "" - BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build - BUILD_IN_SOURCE 1 - TEST_COMMAND "" - INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install -) - -set_target_properties(${readline_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) - -endif (NOT readline_NAME) From cd0a05515cd8470e6f5c8d60151a9894fcc1443d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 30 Aug 2014 20:15:59 -0400 Subject: [PATCH 060/125] pyzmq.cmake: Requires Cython to build. --- pyzmq.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyzmq.cmake b/pyzmq.cmake index a57738b..5b99a76 100644 --- a/pyzmq.cmake +++ b/pyzmq.cmake @@ -10,6 +10,7 @@ include (ExternalSource) include (BuildSupport) +include (cython) include (python) include(zeromq) @@ -21,7 +22,7 @@ external_git_repo(pyzmq message ("Installing ${pyzmq_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${pyzmq_NAME} - DEPENDS ${python_NAME} ${zeromq_NAME} + DEPENDS ${cython_NAME} ${python_NAME} ${zeromq_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${pyzmq_URL} GIT_TAG ${pyzmq_TAG} From 67e7ff1e30288ff0adcd74bebd0af5469accfd9e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 10 Jul 2014 17:29:20 -0400 Subject: [PATCH 061/125] spams-python: Created a cmake to install SPAMS with Python bindings. Requires a patch be applied to the setup.py file to ensure that ATLAS is being used to build. --- patches/spams-python-setup-atlas.patch | 67 ++++++++++++++++++++++++++ patches/spams-python-setup.patch | 67 ++++++++++++++++++++++++++ spams-python.cmake | 45 +++++++++++++++++ 3 files changed, 179 insertions(+) create mode 100644 patches/spams-python-setup-atlas.patch create mode 100644 patches/spams-python-setup.patch create mode 100644 spams-python.cmake diff --git a/patches/spams-python-setup-atlas.patch b/patches/spams-python-setup-atlas.patch new file mode 100644 index 0000000..779f1e9 --- /dev/null +++ b/patches/spams-python-setup-atlas.patch @@ -0,0 +1,67 @@ +--- setup.py_old 2014-07-09 19:03:41.996900059 +0000 ++++ setup.py 2014-07-10 20:18:55.653738878 +0000 +@@ -7,31 +7,35 @@ + # includes numpy : package numpy.distutils , numpy.get_include() + # python setup.py build --inplace + # python setup.py install --prefix=dist, +-incs = ['.'] + map(lambda x: os.path.join('spams',x),[ 'linalg', 'prox', 'decomp', 'dictLearn']) + [numpy.get_include()] + ['/usr/include/python2.7/'] ++incs = ['.'] + map(lambda x: os.path.join('spams',x),[ 'linalg', 'prox', 'decomp', 'dictLearn']) + [numpy.get_include()] + + osname = distutils.util.get_platform() +-cc_flags = ['-fPIC', '-fopenmp'] +-link_flags = ['-fopenmp', '-s' ] +-libs = ['stdc++', 'blas', 'lapack' ] ++ ++buildem_dir = os.environ["BUILDEM_DIR"] ++cc_flags = ['-fPIC', '-fopenmp', '-static-libgfortran', '-Wunused-variable'] ++link_flags = ['-fopenmp', '-static-libgfortran'] ++ ++dynamic_libs = ['stdc++', 'cblas', 'lapack'] ++static_libs = ['atlas'] ++ + libdirs = [] + ++# What's the point of a standarized build system if we are just going to route around it. + if osname.startswith("macosx"): +- cc_flags = ['-fPIC', '-fopenmp','-m32'] +- link_flags = ['-m32', '-framework', 'Python'] ++ cc_flags += ["-F" + os.path.join(buildem_dir, "Frameworks")] ++ link_flags = ['-framework', 'Python'] ++elif osname.startswith("win"): ++ # Assuming MinGW system. ++ # Don't mess with path as we have ideally set it the right way already. ++ # Don't use R for BLAS as we have built BLAS already. ++ cc_flags += ['-DWIN32'] ++ link_flags += ['-mwindows'] ++ ++# These assume GCC style syntax is allowed. Should work for clang (when they have openmp). Will not work with other compilers. ++dynamic_libs = ["-l" + _ for _ in dynamic_libs] ++static_libs = ["-Wl,-Bstatic"] + ["-l" + _ for _ in static_libs] + ["-Wl,-Bdynamic"] + +-if osname.startswith("win32"): +- cc_flags = ['-fPIC', '-fopenmp','-DWIN32'] +- link_flags = ['-fopenmp', '-mwindows'] +- path = os.environ['PATH'] +- os.environ['PATH'] = 'C:/MinGW/bin;' + path +- libs = ['stdc++', 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files/R/R-2.15.1/bin/i386'] +- +-if osname.startswith("win-amd64"): +- cc_flags = ['-openmp', '-EHsc', '-DWIN32', '-DCYGWIN', '-DWINDOWS', '-I','C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/include'] +- link_flags = [] +- libs = [ 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/lib/amd64','C:/Program Files/R/R-2.15.1/bin/x64'] ++libs = dynamic_libs + static_libs + + + ##path = os.environ['PATH']; print "XX OS %s, path %s" %(osname,path) +@@ -42,7 +46,8 @@ + include_dirs = incs, + extra_compile_args = ['-DNDEBUG', '-DUSE_BLAS_LIB'] + cc_flags, + library_dirs = libdirs, +- libraries = libs, ++ # Want to control the formatting. ++ extra_objects = libs, + # strip the .so + extra_link_args = link_flags, + language = 'c++', diff --git a/patches/spams-python-setup.patch b/patches/spams-python-setup.patch new file mode 100644 index 0000000..8948bb7 --- /dev/null +++ b/patches/spams-python-setup.patch @@ -0,0 +1,67 @@ +--- setup.py_old 2014-07-09 19:03:41.996900059 +0000 ++++ setup.py 2014-07-10 20:18:55.653738878 +0000 +@@ -7,31 +7,35 @@ + # includes numpy : package numpy.distutils , numpy.get_include() + # python setup.py build --inplace + # python setup.py install --prefix=dist, +-incs = ['.'] + map(lambda x: os.path.join('spams',x),[ 'linalg', 'prox', 'decomp', 'dictLearn']) + [numpy.get_include()] + ['/usr/include/python2.7/'] ++incs = ['.'] + map(lambda x: os.path.join('spams',x),[ 'linalg', 'prox', 'decomp', 'dictLearn']) + [numpy.get_include()] + + osname = distutils.util.get_platform() +-cc_flags = ['-fPIC', '-fopenmp'] +-link_flags = ['-fopenmp', '-s' ] +-libs = ['stdc++', 'blas', 'lapack' ] ++ ++buildem_dir = os.environ["BUILDEM_DIR"] ++cc_flags = ['-fPIC', '-fopenmp', '-Wunused-variable'] ++link_flags = ['-fopenmp'] ++ ++dynamic_libs = ['stdc++', 'blas', 'lapack'] ++static_libs = [] ++ + libdirs = [] + ++# What's the point of a standarized build system if we are just going to route around it. + if osname.startswith("macosx"): +- cc_flags = ['-fPIC', '-fopenmp','-m32'] +- link_flags = ['-m32', '-framework', 'Python'] ++ cc_flags += ["-F" + os.path.join(buildem_dir, "Frameworks")] ++ link_flags = ['-framework', 'Python'] ++elif osname.startswith("win"): ++ # Assuming MinGW system. ++ # Don't mess with path as we have ideally set it the right way already. ++ # Don't use R for BLAS as we have built BLAS already. ++ cc_flags += ['-DWIN32'] ++ link_flags += ['-mwindows'] ++ ++# These assume GCC style syntax is allowed. Should work for clang (when they have openmp). Will not work with other compilers. ++dynamic_libs = ["-l" + _ for _ in dynamic_libs] ++static_libs = ["-Wl,-Bstatic"] + ["-l" + _ for _ in static_libs] + ["-Wl,-Bdynamic"] + +-if osname.startswith("win32"): +- cc_flags = ['-fPIC', '-fopenmp','-DWIN32'] +- link_flags = ['-fopenmp', '-mwindows'] +- path = os.environ['PATH'] +- os.environ['PATH'] = 'C:/MinGW/bin;' + path +- libs = ['stdc++', 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files/R/R-2.15.1/bin/i386'] +- +-if osname.startswith("win-amd64"): +- cc_flags = ['-openmp', '-EHsc', '-DWIN32', '-DCYGWIN', '-DWINDOWS', '-I','C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/include'] +- link_flags = [] +- libs = [ 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/lib/amd64','C:/Program Files/R/R-2.15.1/bin/x64'] ++libs = dynamic_libs + static_libs + + + ##path = os.environ['PATH']; print "XX OS %s, path %s" %(osname,path) +@@ -42,7 +46,8 @@ + include_dirs = incs, + extra_compile_args = ['-DNDEBUG', '-DUSE_BLAS_LIB'] + cc_flags, + library_dirs = libdirs, +- libraries = libs, ++ # Want to control the formatting. ++ extra_objects = libs, + # strip the .so + extra_link_args = link_flags, + language = 'c++', diff --git a/spams-python.cmake b/spams-python.cmake new file mode 100644 index 0000000..575826f --- /dev/null +++ b/spams-python.cmake @@ -0,0 +1,45 @@ +# +# Install spams-python from source +# + +if (NOT spams-python_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (PatchSupport) + +external_source (spams-python + 2.4 + spams-python-v2.4-svn2014-03-27.tar.gz + 57b4851bf2d623fc8a23d0fd4c204694 + http://spams-devel.gforge.inria.fr/hitcounter2.php?file=33494/) + +message ("Installing ${spams-python_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${spams-python_NAME} + DEPENDS ${atlas_NAME} ${python_NAME} ${setuptools_NAME} ${numpy_NAME} ${scipy_NAME} + PREFIX ${BUILDEM_DIR} + URL ${spams-python_URL} + URL_MD5 ${spams-python_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Patches SPAMS in a way where we are sure it will run. + + # The first patch should work with any LAPACK and BLAS implementation. + ${spams-python_SRC_DIR}/setup.py ${PATCH_DIR}/spams-python-setup.patch + # If you wish to use the tuned ATLAS library as well, use this patch. + #${spams-python_SRC_DIR}/setup.py ${PATCH_DIR}/spams-python-setup-atlas.patch + + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${spams-python_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT spams-python_NAME) + From 83e372342637c8a01421ae6c91fef3ca94efd5dd Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Fri, 4 Apr 2014 14:18:31 -0400 Subject: [PATCH 062/125] Added jsonschema.cmake --- jsonschema.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 jsonschema.cmake diff --git a/jsonschema.cmake b/jsonschema.cmake new file mode 100644 index 0000000..d2339b8 --- /dev/null +++ b/jsonschema.cmake @@ -0,0 +1,41 @@ +# +# Install jsonschema library from source +# + +if (NOT jsonschema_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) + +external_source (jsonschema + 2.3.0 + jsonschema-2.3.0.tar.gz + 410075e1969a9ec1838b5a6e1313c32b + https://pypi.python.org/packages/source/j/jsonschema) + +message ("Installing ${jsonschema_NAME} into ilastik build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${jsonschema_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + URL ${jsonschema_URL} + URL_MD5 ${jsonschema_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND "" +) + +set_target_properties(${jsonschema_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + + +endif (NOT jsonschema_NAME) + From 22933faf41ecabd96bfc8f43a6b5970312d59975 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Mon, 17 Mar 2014 18:06:47 -0400 Subject: [PATCH 063/125] ilastik.cmake: Changed remote url to ilastik/ilastik-meta, not janelia-flyem/ilastik --- ilastik.cmake | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ilastik.cmake b/ilastik.cmake index 719d400..8635755 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -33,7 +33,7 @@ include (nose) include (faulthandler) # select the desired ilastik commit -set(DEFAULT_ILASTIK_VERSION "20131205") +set(DEFAULT_ILASTIK_VERSION "v1.0.2") IF(NOT DEFINED ILASTIK_VERSION) SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}") ENDIF() @@ -43,20 +43,27 @@ SET(ILASTIK_VERSION ${ILASTIK_VERSION} external_git_repo (ilastik ${ILASTIK_VERSION} - https://github.com/janelia-flyem/flyem-ilastik + https://github.com/ilastik/ilastik-meta ilastik) set(lazyflow_SRC_DIR "${ilastik_SRC_DIR}/lazyflow") if("${ILASTIK_VERSION}" STREQUAL "master") - set(ILASTIK_UPDATE_COMMAND git checkout master && git pull origin master && git submodule update --init --recursive && + # If the user's build is old, he might be linked to the janelia-flyem remote + # Force the remote to update from ilastik/ilastik-meta by removing origin and adding it again + set(ILASTIK_UPDATE_COMMAND git remote rm origin && git remote add origin https://github.com/ilastik/ilastik-meta && + git fetch origin && + git checkout master && git pull origin master && git submodule update --init --recursive && cd lazyflow && git checkout master && git pull origin master && git submodule update && cd .. && cd volumina && git checkout master && git pull origin master && cd .. && cd ilastik && git checkout master && git pull origin master && cd ..) else() - set(ILASTIK_UPDATE_COMMAND git fetch && git checkout ${ILASTIK_VERSION} && git submodule update --init --recursive) + # If the user's build is old, he might be linked to the janelia-flyem remote + # Force the remote to update from ilastik/ilastik-meta by removing origin and adding it again + set(ILASTIK_UPDATE_COMMAND git remote rm origin && git remote add origin https://github.com/ilastik/ilastik-meta && + git fetch origin && git checkout ${ILASTIK_VERSION} && git submodule update --init --recursive) endif() From 630b15696caab058a688e286d30fb86c6ec311c2 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Fri, 4 Apr 2014 14:19:23 -0400 Subject: [PATCH 064/125] ilastik.cmake: Added a new dependency: jsonschema --- ilastik.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 8635755..66b9970 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -31,6 +31,7 @@ include (pgmlink) include (scikit-learn) include (nose) include (faulthandler) +include (jsonschema) # Required for the dvid extension. # select the desired ilastik commit set(DEFAULT_ILASTIK_VERSION "v1.0.2") @@ -71,7 +72,7 @@ message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: $ set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} - ${cylemon_NAME} ${scikit-learn_NAME}) + ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME}) if (${build_pgmlink}) # Tracking depends on pgmlink, which depends on CPLEX. From 37827540fd3905c24acab374ffd2a43f0a8da2f8 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Tue, 8 Apr 2014 22:21:52 -0400 Subject: [PATCH 065/125] ilastik.cmake: Require opengm --- ilastik.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ilastik.cmake b/ilastik.cmake index 66b9970..534da94 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -32,6 +32,7 @@ include (scikit-learn) include (nose) include (faulthandler) include (jsonschema) # Required for the dvid extension. +include (opengm) # select the desired ilastik commit set(DEFAULT_ILASTIK_VERSION "v1.0.2") @@ -71,8 +72,8 @@ endif() message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...") set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} - ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} - ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME}) + ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} + ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) if (${build_pgmlink}) # Tracking depends on pgmlink, which depends on CPLEX. From 1c034a9bdf87020d166a0adee6d9e63e72124560 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Tue, 27 May 2014 11:27:45 -0400 Subject: [PATCH 066/125] Added futures.cmake (python futures module backported from Python 3) Conflicts: futures.cmake --- futures.cmake | 9 +++++---- ilastik.cmake | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/futures.cmake b/futures.cmake index 2e29355..b0f64d6 100644 --- a/futures.cmake +++ b/futures.cmake @@ -1,5 +1,5 @@ # -# Install futures library from source. +# Install futures library from source # if (NOT futures_NAME) @@ -17,10 +17,9 @@ external_source (futures 2.1.6 futures-2.1.6.tar.gz cfab9ac3cd55d6c7ddd0546a9f22f453 - https://pypi.python.org/packages/source/f/futures/futures-2.1.6.tar.gz) + https://pypi.python.org/packages/source/f/futures) - -message ("Installing ${futures_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +message ("Installing ${futures_NAME} into ilastik build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${futures_NAME} DEPENDS ${python_NAME} ${setuptools_NAME} PREFIX ${BUILDEM_DIR} @@ -37,4 +36,6 @@ ExternalProject_Add(${futures_NAME} set_target_properties(${futures_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + endif (NOT futures_NAME) + diff --git a/ilastik.cmake b/ilastik.cmake index 534da94..c693001 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -33,6 +33,7 @@ include (nose) include (faulthandler) include (jsonschema) # Required for the dvid extension. include (opengm) +include (futures) # select the desired ilastik commit set(DEFAULT_ILASTIK_VERSION "v1.0.2") @@ -71,7 +72,7 @@ endif() message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...") -set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} +set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} ${futures_NAME} ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) From adb5748b9f12805613449925b77ae0eee80b5cff Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Tue, 10 Jun 2014 17:06:09 -0400 Subject: [PATCH 067/125] ilastik.cmake: Updated default ilastik checkout sha --- ilastik.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index c693001..8e8902e 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -36,7 +36,7 @@ include (opengm) include (futures) # select the desired ilastik commit -set(DEFAULT_ILASTIK_VERSION "v1.0.2") +set(DEFAULT_ILASTIK_VERSION 233886caf405623d8e17b260716b743cb4b96527) # 2014-06-10 IF(NOT DEFINED ILASTIK_VERSION) SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}") ENDIF() From 648a6b56b60e4e3573d07d2423b8a21e060eec94 Mon Sep 17 00:00:00 2001 From: Steve Plaza Date: Wed, 11 Jun 2014 15:34:01 -0400 Subject: [PATCH 068/125] updates sha for ilastik.cmake --- ilastik.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 8e8902e..2357fd2 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -36,7 +36,7 @@ include (opengm) include (futures) # select the desired ilastik commit -set(DEFAULT_ILASTIK_VERSION 233886caf405623d8e17b260716b743cb4b96527) # 2014-06-10 +set(DEFAULT_ILASTIK_VERSION 18026ae2efb9e9e04046598cd5fccca3a42bcdaa) # 2014-06-11 IF(NOT DEFINED ILASTIK_VERSION) SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}") ENDIF() @@ -146,6 +146,7 @@ configure_file(${TEMPLATE_DIR}/ilastik_script.template ${BUILDEM_DIR}/bin/ilasti set(LAUNCH_ILASTIK ilastik/ilastik/workflows/pixelClassification/pixelClassificationClusterized.py) configure_file(${TEMPLATE_DIR}/ilastik_script.template ${BUILDEM_DIR}/bin/ilastik_clusterized @ONLY) + set_target_properties(${ilastik_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) endif (NOT ilastik_NAME) From 92007454710274bce4e82b791c9f9bc9599ce8ab Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Mon, 31 Mar 2014 11:06:54 -0400 Subject: [PATCH 069/125] opengm.cmake: Compile with hdf5, boost, and python --- opengm.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/opengm.cmake b/opengm.cmake index b965fea..a2ebb6a 100644 --- a/opengm.cmake +++ b/opengm.cmake @@ -11,6 +11,10 @@ include (ExternalSource) include (BuildSupport) include (PatchSupport) +include (boost) +include (hdf5) +include (python) + external_git_repo (opengm 576dc472324a5dce40b7e9bb4c270afbd9b3da37 https://github.com/opengm/opengm) @@ -21,7 +25,7 @@ endif() message ("Installing ${opengm_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${opengm_NAME} - DEPENDS ${boost_NAME} + DEPENDS ${boost_NAME} ${hdf5_NAME} ${python_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${opengm_URL} GIT_TAG ${opengm_TAG} @@ -36,6 +40,9 @@ ExternalProject_Add(${opengm_NAME} -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -DWITH_CPLEX=ON -DWITH_BOOST=ON + -DWITH_HDF5=ON + -DBUILD_PYTHON_WRAPPER=ON + -DWITH_OPENMP=OFF # Mac doesn't support OpenMP ${CMAKE_CPLEX_ROOT_DIR} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) From b8df931c6e6d41350bfa247c62a116984d42bd96 Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Tue, 8 Apr 2014 23:07:12 -0400 Subject: [PATCH 070/125] opengm: Build without CPLEX if it can't be found. Conflicts: opengm.cmake --- opengm.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opengm.cmake b/opengm.cmake index a2ebb6a..d8d7362 100644 --- a/opengm.cmake +++ b/opengm.cmake @@ -21,6 +21,9 @@ external_git_repo (opengm if(CPLEX_ROOT_DIR) set(CMAKE_CPLEX_ROOT_DIR "-DCPLEX_ROOT_DIR=${CPLEX_ROOT_DIR}") + set(WITH_CPLEX ON) +else() + set(WITH_CPLEX OFF) endif() message ("Installing ${opengm_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") @@ -38,7 +41,7 @@ ExternalProject_Add(${opengm_NAME} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} - -DWITH_CPLEX=ON + -DWITH_CPLEX=${WITH_CPLEX} -DWITH_BOOST=ON -DWITH_HDF5=ON -DBUILD_PYTHON_WRAPPER=ON From f35f4988935ed26a67815c203f85818ab544896d Mon Sep 17 00:00:00 2001 From: Stuart Berg Date: Wed, 28 May 2014 16:09:19 -0400 Subject: [PATCH 071/125] opengm: Added a patch to let us skip the sphinx docs build with a cmake switch. Conflicts: opengm.cmake --- opengm.cmake | 4 ++ patches/opengm.patch | 89 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 patches/opengm.patch diff --git a/opengm.cmake b/opengm.cmake index d8d7362..fe10245 100644 --- a/opengm.cmake +++ b/opengm.cmake @@ -36,6 +36,9 @@ ExternalProject_Add(${opengm_NAME} PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} # This patch disables linking against the rt-lib on Mac for the combilp test ${opengm_SRC_DIR}/src/unittest/inference/CMakeLists.txt ${PATCH_DIR}/opengm-toggle-rt.patch + # This patch adds the BUILD_PYTHON_DOCS setting, used to avoid building the sphinx documentation. + # Future versions of OpenGM will probably not need this patch. + ${opengm_SRC_DIR}/src/interfaces/python/CMakeLists.txt ${PATCH_DIR}/opengm.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opengm_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} @@ -45,6 +48,7 @@ ExternalProject_Add(${opengm_NAME} -DWITH_BOOST=ON -DWITH_HDF5=ON -DBUILD_PYTHON_WRAPPER=ON + -DBUILD_PYTHON_DOCS=OFF -DWITH_OPENMP=OFF # Mac doesn't support OpenMP ${CMAKE_CPLEX_ROOT_DIR} diff --git a/patches/opengm.patch b/patches/opengm.patch new file mode 100644 index 0000000..77ce090 --- /dev/null +++ b/patches/opengm.patch @@ -0,0 +1,89 @@ +--- src/interfaces/python/CMakeLists.txt 2014-05-28 16:03:43.000000000 -0400 ++++ src/interfaces/python/CMakeLists.txt2 2014-05-28 16:03:38.000000000 -0400 +@@ -16,47 +16,50 @@ + + message(STATUS ${OPENGM_PYTHON_BUILD_MODULE_DIR}) + +-find_package(SPHINX) +-if(SPHINX_FOUND) +- message(STATUS "FOUND_SPHINX") ++set( BUILD_PYTHON_DOCS 0 CACHE BOOL "Build the Python documentation with Sphinx" ) + +- if(NOT DEFINED SPHINX_THEME) +- set(SPHINX_THEME default) ++if(BUILD_PYTHON_DOCS) ++ find_package(SPHINX) ++ if(SPHINX_FOUND) ++ message(STATUS "FOUND_SPHINX") ++ ++ if(NOT DEFINED SPHINX_THEME) ++ set(SPHINX_THEME default) ++ endif() ++ if(NOT DEFINED SPHINX_THEME_DIR) ++ set(SPHINX_THEME_DIR) ++ endif() ++ # configured documentation tools and intermediate build results ++ set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") ++ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/_build) ++ # Sphinx cache with pickled ReST documents ++ set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/_doctrees") ++ # HTML output directory ++ set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/html") ++ configure_file( ++ "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py.in" ++ #"${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py" ++ "${BINARY_BUILD_DIR}/conf.py" ++ @ONLY) ++ add_custom_target(python-doc ALL ++ ${SPHINX_EXECUTABLE} ++ -q -b html ++ #-c "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" ++ -c "${BINARY_BUILD_DIR}" ++ -d "${SPHINX_CACHE_DIR}" ++ "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" ++ "${SPHINX_HTML_DIR}" ++ COMMENT "Building HTML documentation with Sphinx") ++ add_dependencies(python-doc _opengmcore ) ++ add_dependencies(python-doc _inference ) ++ add_dependencies(python-doc _hdf5 ) ++ ++ else() ++ message(STATUS "CANNOT Building HTML documentation with Sphinx , did not find Sphinx") + endif() +- if(NOT DEFINED SPHINX_THEME_DIR) +- set(SPHINX_THEME_DIR) +- endif() +- # configured documentation tools and intermediate build results +- set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") +- file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/_build) +- # Sphinx cache with pickled ReST documents +- set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/_doctrees") +- # HTML output directory +- set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/opengm/html") +- configure_file( +- "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py.in" +- #"${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source/conf.py" +- "${BINARY_BUILD_DIR}/conf.py" +- @ONLY) +- add_custom_target(python-doc ALL +- ${SPHINX_EXECUTABLE} +- -q -b html +- #-c "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" +- -c "${BINARY_BUILD_DIR}" +- -d "${SPHINX_CACHE_DIR}" +- "${CMAKE_CURRENT_SOURCE_DIR}/docsrc/source" +- "${SPHINX_HTML_DIR}" +- COMMENT "Building HTML documentation with Sphinx") +- add_dependencies(python-doc _opengmcore ) +- add_dependencies(python-doc _inference ) +- add_dependencies(python-doc _hdf5 ) +- +-else() +- message(STATUS "CANNOT Building HTML documentation with Sphinx , did not find Sphinx") + endif() + + + + + +- From 3807a124222a03b5494eb2c0eb5c66ecacaaa188 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 31 Aug 2014 01:04:16 -0400 Subject: [PATCH 072/125] openblas.cmake: Added an additional step for installing links. Previously, the links pointed to a non-existent libopenblas.so on Mac. Now, links on Mac point to libopenblas.dylib. --- openblas.cmake | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/openblas.cmake b/openblas.cmake index 0724059..e680772 100644 --- a/openblas.cmake +++ b/openblas.cmake @@ -26,11 +26,24 @@ ExternalProject_Add(${openblas_NAME} BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) NO_AVX=1 NO_AFFINITY=1 -j8 BUILD_IN_SOURCE 1 # Add TARGET=xxx (where xxx is an architecture) to the BUILD_COMMAND to optimize and/or avoid particular build errors. See README_openblas.txt for details. - INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PREFIX=${BUILDEM_DIR} install && - ln -fs libopenblas.so ${BUILDEM_DIR}/lib/libblas.so && - ln -fs libopenblas.so ${BUILDEM_DIR}/lib/liblapack.so + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) PREFIX=${BUILDEM_DIR} install ) +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + ExternalProject_Add_Step(${openblas_NAME} "install_links" # Names of project and custom step + COMMAND ln -fs libopenblas.dylib ${BUILDEM_DIR}/lib/libblas.dylib && + ln -fs libopenblas.dylib ${BUILDEM_DIR}/lib/liblapack.dylib + DEPENDEES install + ) +else() + ExternalProject_Add_Step(${openblas_NAME} "install_links" # Names of project and custom step + COMMAND ln -fs libopenblas.so ${BUILDEM_DIR}/lib/libblas.so && + ln -fs libopenblas.so ${BUILDEM_DIR}/lib/liblapack.so + DEPENDEES install + ) +endif() + + set_target_properties(${openblas_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) endif (NOT openblas_NAME) From 2f6fec50ec9f5f52681cd3b87fdfc1ed38a0b5a3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 31 Aug 2014 01:08:42 -0400 Subject: [PATCH 073/125] spams-python.cmake: Updated to pass environment variable namely BUILDEM_DIR, GCC, and GXX. The variables GCC and GXX should point to GNU gcc and g++ compilers, respectively. patches/spams-python-setup.patch: Simplified the patch to avoid issues on Mac with specifying which libraries to build statically and which to build dynamically. --- patches/spams-python-setup.patch | 59 +++++++++++++------------------- spams-python.cmake | 4 +-- 2 files changed, 25 insertions(+), 38 deletions(-) diff --git a/patches/spams-python-setup.patch b/patches/spams-python-setup.patch index 8948bb7..3576e5c 100644 --- a/patches/spams-python-setup.patch +++ b/patches/spams-python-setup.patch @@ -1,6 +1,8 @@ ---- setup.py_old 2014-07-09 19:03:41.996900059 +0000 -+++ setup.py 2014-07-10 20:18:55.653738878 +0000 -@@ -7,31 +7,35 @@ +diff --git a/setup.py b/setup.py +index 2307122..64570f2 100644 +--- a/setup.py ++++ b/setup.py +@@ -7,31 +7,29 @@ import numpy # includes numpy : package numpy.distutils , numpy.get_include() # python setup.py build --inplace # python setup.py install --prefix=dist, @@ -11,57 +13,42 @@ -cc_flags = ['-fPIC', '-fopenmp'] -link_flags = ['-fopenmp', '-s' ] -libs = ['stdc++', 'blas', 'lapack' ] -+ +-libdirs = [] + +-if osname.startswith("macosx"): +- cc_flags = ['-fPIC', '-fopenmp','-m32'] +- link_flags = ['-m32', '-framework', 'Python'] +buildem_dir = os.environ["BUILDEM_DIR"] -+cc_flags = ['-fPIC', '-fopenmp', '-Wunused-variable'] ++cc_flags = ['-fPIC', '-fopenmp', '-Wunused-variable', '-m64'] +link_flags = ['-fopenmp'] + -+dynamic_libs = ['stdc++', 'blas', 'lapack'] -+static_libs = [] -+ - libdirs = [] ++libs = ['stdc++', 'blas', 'lapack', 'gomp'] +-if osname.startswith("win32"): +- cc_flags = ['-fPIC', '-fopenmp','-DWIN32'] +- link_flags = ['-fopenmp', '-mwindows'] +- path = os.environ['PATH'] +- os.environ['PATH'] = 'C:/MinGW/bin;' + path +- libs = ['stdc++', 'Rblas', 'Rlapack' ] +- libdirs = ['C:/Program Files/R/R-2.15.1/bin/i386'] ++libdirs = [os.path.join(buildem_dir, 'lib')] ++ +# What's the point of a standarized build system if we are just going to route around it. - if osname.startswith("macosx"): -- cc_flags = ['-fPIC', '-fopenmp','-m32'] -- link_flags = ['-m32', '-framework', 'Python'] ++if osname.startswith("macosx"): + cc_flags += ["-F" + os.path.join(buildem_dir, "Frameworks")] -+ link_flags = ['-framework', 'Python'] ++ link_flags = ["-F" + os.path.join(buildem_dir, "Frameworks"), '-framework', 'Python'] +elif osname.startswith("win"): + # Assuming MinGW system. + # Don't mess with path as we have ideally set it the right way already. + # Don't use R for BLAS as we have built BLAS already. + cc_flags += ['-DWIN32'] + link_flags += ['-mwindows'] -+ -+# These assume GCC style syntax is allowed. Should work for clang (when they have openmp). Will not work with other compilers. -+dynamic_libs = ["-l" + _ for _ in dynamic_libs] -+static_libs = ["-Wl,-Bstatic"] + ["-l" + _ for _ in static_libs] + ["-Wl,-Bdynamic"] --if osname.startswith("win32"): -- cc_flags = ['-fPIC', '-fopenmp','-DWIN32'] -- link_flags = ['-fopenmp', '-mwindows'] -- path = os.environ['PATH'] -- os.environ['PATH'] = 'C:/MinGW/bin;' + path -- libs = ['stdc++', 'Rblas', 'Rlapack' ] -- libdirs = ['C:/Program Files/R/R-2.15.1/bin/i386'] -- -if osname.startswith("win-amd64"): - cc_flags = ['-openmp', '-EHsc', '-DWIN32', '-DCYGWIN', '-DWINDOWS', '-I','C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/include'] - link_flags = [] - libs = [ 'Rblas', 'Rlapack' ] - libdirs = ['C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/lib/amd64','C:/Program Files/R/R-2.15.1/bin/x64'] -+libs = dynamic_libs + static_libs ##path = os.environ['PATH']; print "XX OS %s, path %s" %(osname,path) -@@ -42,7 +46,8 @@ - include_dirs = incs, - extra_compile_args = ['-DNDEBUG', '-DUSE_BLAS_LIB'] + cc_flags, - library_dirs = libdirs, -- libraries = libs, -+ # Want to control the formatting. -+ extra_objects = libs, - # strip the .so - extra_link_args = link_flags, - language = 'c++', diff --git a/spams-python.cmake b/spams-python.cmake index 575826f..d85310c 100644 --- a/spams-python.cmake +++ b/spams-python.cmake @@ -33,10 +33,10 @@ ExternalProject_Add(${spams-python_NAME} #${spams-python_SRC_DIR}/setup.py ${PATCH_DIR}/spams-python-setup-atlas.patch CONFIGURE_COMMAND "" - BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_COMMAND BUILDEM_DIR=${BUILDEM_DIR} ${BUILDEM_ENV_STRING} CC=${GCC} CXX=${GXX} ${PYTHON_EXE} setup.py build BUILD_IN_SOURCE 1 TEST_COMMAND "" - INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install + INSTALL_COMMAND BUILDEM_DIR=${BUILDEM_DIR} ${BUILDEM_ENV_STRING} CC=${GCC} CXX=${GXX} ${PYTHON_EXE} setup.py install ) set_target_properties(${spams-python_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) From 5c26b779d9b9f54aa4a05ac8f5805e904c0cf39e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sun, 31 Aug 2014 03:01:27 -0400 Subject: [PATCH 074/125] ilastik.cmake: Added scikit-image as dependency. --- ilastik.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 2357fd2..23280d2 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -28,6 +28,7 @@ include (greenlet) include (cylemon) include (yapsy) include (pgmlink) +include (scikit-image) include (scikit-learn) include (nose) include (faulthandler) @@ -74,7 +75,7 @@ message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: $ set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} ${futures_NAME} ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} - ${cylemon_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) + ${cylemon_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) if (${build_pgmlink}) # Tracking depends on pgmlink, which depends on CPLEX. From 35e38fa401c2973a103b0849a6668859a7b987ce Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 23 Sep 2014 09:03:03 -0400 Subject: [PATCH 075/125] ilastik.cmake: Added qimage2ndarray as a dependency. --- ilastik.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 23280d2..af81f1d 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -35,6 +35,7 @@ include (faulthandler) include (jsonschema) # Required for the dvid extension. include (opengm) include (futures) +include (qimage2ndarray) # select the desired ilastik commit set(DEFAULT_ILASTIK_VERSION 18026ae2efb9e9e04046598cd5fccca3a42bcdaa) # 2014-06-11 @@ -75,7 +76,7 @@ message ("Installing ${ilastik_NAME}/${ILASTIK_VERSION} into FlyEM build area: $ set (ilastik_dependencies ${vigra_NAME} ${h5py_NAME} ${psutil_NAME} ${nose_NAME} ${futures_NAME} ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME} ${faulthandler_NAME} - ${cylemon_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ) + ${cylemon_NAME} ${scikit-image_NAME} ${scikit-learn_NAME} ${jsonschema_NAME} ${opengm_NAME} ${qimage2ndarray_NAME}) if (${build_pgmlink}) # Tracking depends on pgmlink, which depends on CPLEX. From 405611abe2838e04cbf798acff00e8e3e65ebf1a Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 23 Sep 2014 09:10:08 -0400 Subject: [PATCH 076/125] templates/exec.template: Added template to construct exec.sh, which acts like exec for BuildEM. ilastik-gui.cmake: Added step to install exec.sh. ilastik.cmake: Added step to install exec.sh. --- ilastik-gui.cmake | 4 ++++ ilastik.cmake | 4 ++++ templates/exec.template | 13 +++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 templates/exec.template diff --git a/ilastik-gui.cmake b/ilastik-gui.cmake index d0d5c5e..4cc514f 100644 --- a/ilastik-gui.cmake +++ b/ilastik-gui.cmake @@ -42,6 +42,10 @@ add_custom_target (${ilastik-gui_NAME} ALL set(SETENV_ILASTIK setenv_ilastik_gui) configure_file(${TEMPLATE_DIR}/${SETENV_ILASTIK}.in ${BUILDEM_DIR}/bin/${SETENV_ILASTIK}.sh @ONLY) +# Create exec script for easy execution. +set(SETENV_ILASTIK setenv_ilastik_gui) +configure_file(${TEMPLATE_DIR}/exec.template ${BUILDEM_DIR}/bin/exec.sh @ONLY) + # Add gui launch script set(LAUNCH_ILASTIK ilastik/ilastik.py) configure_file(${TEMPLATE_DIR}/ilastik_script.template ${BUILDEM_DIR}/bin/ilastik_gui @ONLY) diff --git a/ilastik.cmake b/ilastik.cmake index af81f1d..7534112 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -136,6 +136,10 @@ file(RELATIVE_PATH PYTHON_PREFIX_RELATIVE ${BUILDEM_DIR} ${PYTHON_PREFIX}) set(SETENV_ILASTIK setenv_ilastik_gui) configure_file(${TEMPLATE_DIR}/${SETENV_ILASTIK}.in ${BUILDEM_DIR}/bin/${SETENV_ILASTIK}.sh @ONLY) +# Create exec script for easy execution. +set(SETENV_ILASTIK setenv_ilastik_gui) +configure_file(${TEMPLATE_DIR}/exec.template ${BUILDEM_DIR}/bin/exec.sh @ONLY) + # Add headless launch script set(LAUNCH_ILASTIK "ilastik/ilastik.py --headless") configure_file(${TEMPLATE_DIR}/ilastik_script.template ${BUILDEM_DIR}/bin/ilastik_headless @ONLY) diff --git a/templates/exec.template b/templates/exec.template new file mode 100644 index 0000000..0125d69 --- /dev/null +++ b/templates/exec.template @@ -0,0 +1,13 @@ +#!/bin/bash + +export ILASTIK_PATH= + +# we assume that this script resides in BUILDEM_DIR +export BUILDEM_DIR=$(cd `dirname $0`/.. && pwd) +echo "BUILDEM_DIR: $BUILDEM_DIR" +source $BUILDEM_DIR/bin/@SETENV_ILASTIK@.sh + +# no longer need this shell as +# we just wanted to set environment +# before executing the command. +exec "$@" From cb32191f4a15f7e90ab98698f22070ab1e592b8e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 23 Sep 2014 09:12:59 -0400 Subject: [PATCH 077/125] boost.cmake: Upgraded version of Boost. --- boost.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boost.cmake b/boost.cmake index 22e81b2..ac9ba55 100644 --- a/boost.cmake +++ b/boost.cmake @@ -17,10 +17,10 @@ set (boost_INCLUDE_DIR ${BUILDEM_INCLUDE_DIR}/boost) include_directories (${boost_INCLUDE_DIR}) external_source (boost - 1_51_0 - boost_1_51_0.tar.gz - 6a1f32d902203ac70fbec78af95b3cf8 - http://downloads.sourceforge.net/project/boost/boost/1.51.0) + 1_56_0 + boost_1_56_0.tar.bz2 + a744cf167b05d72335f27c88115f211d + http://hivelocity.dl.sourceforge.net/project/boost/boost/1.56.0) set (boost_LIBS ${BUILDEM_LIB_DIR}/libboost_thread.${BUILDEM_PLATFORM_DYLIB_EXTENSION} ${BUILDEM_LIB_DIR}/libboost_system.${BUILDEM_PLATFORM_DYLIB_EXTENSION} From e26a373d02a1af108d3f621aed90701f9af22a03 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 11 Oct 2014 19:34:55 -0400 Subject: [PATCH 078/125] boost.cmake: Added libboost_container to the boost_LIBS build list. --- boost.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/boost.cmake b/boost.cmake index ac9ba55..d6ed2c3 100644 --- a/boost.cmake +++ b/boost.cmake @@ -22,7 +22,8 @@ external_source (boost a744cf167b05d72335f27c88115f211d http://hivelocity.dl.sourceforge.net/project/boost/boost/1.56.0) -set (boost_LIBS ${BUILDEM_LIB_DIR}/libboost_thread.${BUILDEM_PLATFORM_DYLIB_EXTENSION} +set (boost_LIBS ${BUILDEM_LIB_DIR}/libboost_container.${BUILDEM_PLATFORM_DYLIB_EXTENSION} + ${BUILDEM_LIB_DIR}/libboost_thread.${BUILDEM_PLATFORM_DYLIB_EXTENSION} ${BUILDEM_LIB_DIR}/libboost_system.${BUILDEM_PLATFORM_DYLIB_EXTENSION} ${BUILDEM_LIB_DIR}/libboost_program_options.${BUILDEM_PLATFORM_DYLIB_EXTENSION} ${BUILDEM_LIB_DIR}/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION} @@ -42,7 +43,7 @@ ExternalProject_Add(${boost_NAME} UPDATE_COMMAND "" PATCH_COMMAND "" CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ./bootstrap.sh - --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread,program_options,chrono + --with-libraries=container,date_time,filesystem,python,regex,serialization,system,test,thread,program_options,chrono --with-python=${PYTHON_EXE} --prefix=${BUILDEM_DIR} BUILD_COMMAND ${BUILDEM_ENV_STRING} ./b2 From 23e892e71615dbff538158d7a45fe44092e24cef Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 11 Oct 2014 19:41:50 -0400 Subject: [PATCH 079/125] vigra.cmake: Added Boost_INCLUDE_DIR to vigra's CMake variables. --- vigra.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/vigra.cmake b/vigra.cmake index 4a8f918..a9ed3ae 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -71,6 +71,7 @@ ExternalProject_Add(${vigra_NAME} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} -DCMAKE_EXE_LINKER_FLAGS=${BUILDEM_LDFLAGS} -DDEPENDENCY_SEARCH_PREFIX=${BUILDEM_DIR} + -DBoost_INCLUDE_DIR=${BUILDEM_DIR}/include -DBoost_LIBRARY_DIRS=${BUILDEM_DIR}/lib # -DBoost_PYTHON_LIBRARY=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_RELEASE=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} From 2dfd619737ae6557fc8533d7796b2a86d6824531 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 11 Oct 2014 19:44:21 -0400 Subject: [PATCH 080/125] vigra.cmake: Changed Python library path to start with PYTHON_PREFIX instead of BUILDEM_DIR. Required on all platforms (including Mac). --- vigra.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vigra.cmake b/vigra.cmake index a9ed3ae..3c558e0 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -76,7 +76,7 @@ ExternalProject_Add(${vigra_NAME} # -DBoost_PYTHON_LIBRARY=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_RELEASE=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_DEBUG=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} - # -DVIGRANUMPY_LIBRARIES=${BUILDEM_DIR}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION} + -DVIGRANUMPY_LIBRARIES=${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DJPEG_INCLUDE_DIR=${BUILDEM_DIR}/include -DJPEG_LIBRARY=${BUILDEM_DIR}/lib/libjpeg.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DHDF5_CORE_LIBRARY=${BUILDEM_DIR}/lib/libhdf5.${BUILDEM_PLATFORM_DYLIB_EXTENSION} From 93f9eb268896c9b573eb9b91c529ad74e2ee2024 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 11 Oct 2014 19:45:31 -0400 Subject: [PATCH 081/125] vigra.cmake: Added the library libboost_container to the vigra CMake variable VIGRANUMPY_LIBRARIES. --- vigra.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vigra.cmake b/vigra.cmake index 3c558e0..a8359be 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -76,7 +76,7 @@ ExternalProject_Add(${vigra_NAME} # -DBoost_PYTHON_LIBRARY=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_RELEASE=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} # -DBoost_PYTHON_LIBRARY_DEBUG=${BUILDEM_DIR}/lib/libboost_python-mt.${BUILDEM_PLATFORM_DYLIB_EXTENSION} - -DVIGRANUMPY_LIBRARIES=${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION} + -DVIGRANUMPY_LIBRARIES=${PYTHON_PREFIX}/lib/libpython2.7.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_python.${BUILDEM_PLATFORM_DYLIB_EXTENSION}^^${BUILDEM_DIR}/lib/libboost_container.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DJPEG_INCLUDE_DIR=${BUILDEM_DIR}/include -DJPEG_LIBRARY=${BUILDEM_DIR}/lib/libjpeg.${BUILDEM_PLATFORM_DYLIB_EXTENSION} -DHDF5_CORE_LIBRARY=${BUILDEM_DIR}/lib/libhdf5.${BUILDEM_PLATFORM_DYLIB_EXTENSION} From db8de6547faabe5db71844f6e5f5a9e36c9f3ffd Mon Sep 17 00:00:00 2001 From: Carsten Haubold Date: Thu, 22 May 2014 14:57:29 +0200 Subject: [PATCH 082/125] Update psutil to fix https://github.com/ilastik/ilastik/issues/891 --- psutil.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/psutil.cmake b/psutil.cmake index 338bd50..faad4ff 100644 --- a/psutil.cmake +++ b/psutil.cmake @@ -13,10 +13,12 @@ include (BuildSupport) include (python) external_source (psutil - 0.6.1 - psutil-0.6.1.tar.gz - 3cfcbfb8525f6e4c70110e44a85e907e - http://psutil.googlecode.com/files) + 2.1.1 + psutil-2.1.1.tar.gz + 72a6b15d589fab11f6ca245b775bc3c6 + https://pypi.python.org/packages/source/p/psutil + FORCE +) message ("Installing ${psutil_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${psutil_NAME} From 14ac04b598ddf4dfb95113e553ba9f4a469e9cb8 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 22 Oct 2014 16:06:18 -0400 Subject: [PATCH 083/125] vigra.cmake: Eliminated extra spaces. --- vigra.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vigra.cmake b/vigra.cmake index a8359be..31abfb9 100644 --- a/vigra.cmake +++ b/vigra.cmake @@ -64,7 +64,7 @@ ExternalProject_Add(${vigra_NAME} #URL ${vigra_URL} #URL_MD5 ${vigra_MD5} UPDATE_COMMAND ${VIGRA_UPDATE_COMMAND} - PATCH_COMMAND "" + PATCH_COMMAND "" LIST_SEPARATOR ^^ CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${vigra_SRC_DIR} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} From 67784af54e152ae64692d79bf6061eed8c62aa77 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:46:18 -0500 Subject: [PATCH 084/125] opencv.cmake: Changed order of includes to match the depends list. --- opencv.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.cmake b/opencv.cmake index 7318eed..81960b2 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -12,10 +12,10 @@ include (BuildSupport) include (PatchSupport) include (zlib) -include (openexr) include (libtiff) include (libjpeg) include (libpng) +include (openexr) external_source (opencv 2.4.5 From 63d5dc5523e44afdcfe7ca346772f523f6ddd996 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:47:49 -0500 Subject: [PATCH 085/125] opencv.cmake: Added missing dependencies to OpenCV. --- opencv.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opencv.cmake b/opencv.cmake index 81960b2..d507096 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -16,6 +16,10 @@ include (libtiff) include (libjpeg) include (libpng) include (openexr) +include (qt4) +include (python) +include (numpy) +include (sphinx) external_source (opencv 2.4.5 @@ -28,7 +32,7 @@ set (opencv_LIBS ${BUILDEM_LIB_DIR}/libopencv_ml.so ${BUILDEM_LIB_DIR}/libop message ("Installing ${opencv_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${opencv_NAME} - DEPENDS ${zlib_NAME} ${libjpeg_NAME} ${libpng_NAME} ${libtiff_NAME} ${openexr_NAME} + DEPENDS ${zlib_NAME} ${libjpeg_NAME} ${libpng_NAME} ${libtiff_NAME} ${openexr_NAME} ${qt4_NAME} ${python_NAME} ${numpy_NAME} ${sphinx_NAME} PREFIX ${BUILDEM_DIR} URL ${opencv_URL} URL_MD5 ${opencv_MD5} From 160ef4673d3e97272a3def09bc31e58660b0763b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:48:52 -0500 Subject: [PATCH 086/125] opencv.cmake: Specified paths to python and its includes for configuring OpenCV Python bindings. --- opencv.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencv.cmake b/opencv.cmake index d507096..1b3ea59 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -38,7 +38,7 @@ ExternalProject_Add(${opencv_NAME} URL_MD5 ${opencv_MD5} UPDATE_COMMAND "" PATCH_COMMAND "" - CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opencv_SRC_DIR} + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opencv_SRC_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXE} -DPYTHON_LIBRARY=${PYTHON_LIBRARY_FILE} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_PATH} -DPYTHON_PACKAGES_PATH=${PYTHON_PREFIX}/lib/python2.7/site-packages -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} From a8e72e8f5736c8dbadc13cfef1de1dec66863074 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 22 Oct 2014 13:55:51 -0400 Subject: [PATCH 087/125] geos.cmake: Added geo, which is a dependency of shapely. --- geos.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 geos.cmake diff --git a/geos.cmake b/geos.cmake new file mode 100644 index 0000000..4704324 --- /dev/null +++ b/geos.cmake @@ -0,0 +1,49 @@ +# +# Install geos from source. +# Provides an open source geometry engine. +# + +if (NOT geos_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +external_source (geos + 3.4.2 + geos-3.4.2.tar.bz2 + fc5df2d926eb7e67f988a43a92683bae + http://download.osgeo.org/geos/) + + +# if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +# set (GEOS_ENABLE_MACOSX_FRAMEWORK ON) +# set (GEOS_ENABLE_MACOSX_FRAMEWORK_UNIXCOMPAT ON) +# else() +# set (GEOS_ENABLE_MACOSX_FRAMEWORK OFF) +# endif() + + +message ("Installing ${geos_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${geos_NAME} + DEPENDS + PREFIX ${BUILDEM_DIR} + URL ${geos_URL} + URL_MD5 ${geos_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${geos_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${geos_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT geos_NAME) From 0e59d03e54379b5ab6b5dd8c8926766e034c30db Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 11:55:19 -0500 Subject: [PATCH 088/125] patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch: Patches a broken test. Known failure on Mac ( http://trac.osgeo.org/geos/ticket/299 ). --- ...s-CoordinateArraySequenceFactoryTest.cpp.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch diff --git a/patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch b/patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch new file mode 100644 index 0000000..6c539a9 --- /dev/null +++ b/patches/geos-CoordinateArraySequenceFactoryTest.cpp.patch @@ -0,0 +1,15 @@ +diff --git a/CoordinateArraySequenceFactoryTest.cpp b/CoordinateArraySequenceFactoryTest.cpp +index 1bf6b66..8fa603e 100644 +--- a/CoordinateArraySequenceFactoryTest.cpp ++++ b/CoordinateArraySequenceFactoryTest.cpp +@@ -51,8 +51,8 @@ namespace tut + + CoordinateArrayFactoryCPtr derived; + derived = dynamic_cast(base); +- ensure( 0 != derived ); +- ensure(typeid(derived).name(), typeid(derived) == typeid(CoordinateArrayFactoryCPtr) ); ++ //ensure( 0 != derived ); ++ //ensure(typeid(derived).name(), typeid(derived) == typeid(CoordinateArrayFactoryCPtr) ); + } + catch (std::exception& e) + { From b191d6cc9afc5a985a7261e41043f8f7728b4b89 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 11:56:09 -0500 Subject: [PATCH 089/125] geos.cmake: Added a patch to geos to bypass a broken test. --- geos.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geos.cmake b/geos.cmake index 4704324..4d72451 100644 --- a/geos.cmake +++ b/geos.cmake @@ -33,7 +33,9 @@ ExternalProject_Add(${geos_NAME} URL ${geos_URL} URL_MD5 ${geos_MD5} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Turns off test that is known failure on Mac and that does not appear to be fixed ( http://trac.osgeo.org/geos/ticket/299 ). + ${geos_SRC_DIR}/tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp ${PATCH_DIR}/geos-CoordinateArraySequenceFactoryTest.cpp.patch CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${geos_SRC_DIR}/configure --prefix=${BUILDEM_DIR} "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}" From 8ad76fa76a9805fbaeccf3aa25a382127c78c73c Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 22 Oct 2014 13:56:17 -0400 Subject: [PATCH 090/125] shapely.cmake: Added shapely, which is a dependency of sima. --- shapely.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 shapely.cmake diff --git a/shapely.cmake b/shapely.cmake new file mode 100644 index 0000000..b0b21b9 --- /dev/null +++ b/shapely.cmake @@ -0,0 +1,44 @@ +# +# Provides Python bindings to GEOS as well as additional functionality in analyzing and manipulating geometric objects. +# + +if (NOT shapely_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (geos) +include (python) +include (setuptools) +include (cython) +include (numpy) + +external_source (shapely + 1.4.3 + Shapely-1.4.3.tar.gz + 0b152ead7004cb359a1d5430e0eb94ca + http://pypi.python.org/packages/source/S/Shapely/) + + +# Download and install shapely +message ("Installing ${shapely_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${shapely_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} ${cython_NAME} ${numpy_NAME} ${geos_NAME} + PREFIX ${BUILDEM_DIR} + URL ${shapely_URL} + URL_MD5 ${shapely_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${shapely_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT shapely_NAME) From b48579be1f4fbde2325683028894ab7f775cd19e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:43:30 -0500 Subject: [PATCH 091/125] ffmpeg.cmake: Added ffmpeg, which is required for animations in matplotlib and opencv. --- ffmpeg.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ffmpeg.cmake diff --git a/ffmpeg.cmake b/ffmpeg.cmake new file mode 100644 index 0000000..0b5e3c1 --- /dev/null +++ b/ffmpeg.cmake @@ -0,0 +1,39 @@ +# +# Install ffmpeg from source. +# Provides support for audio and video. +# + +if (NOT ffmpeg_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +external_source (ffmpeg + 2.4.3 + ffmpeg-2.4.3.tar.bz2 + 8da635baff57d7ab704b1daca5a99b47 + http://www.ffmpeg.org/releases/ + FORCE) + +message ("Installing ${ffmpeg_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${ffmpeg_NAME} + PREFIX ${BUILDEM_DIR} + URL ${ffmpeg_URL} + URL_MD5 ${ffmpeg_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${ffmpeg_SRC_DIR}/configure + --prefix=${BUILDEM_DIR} + --disable-yasm + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + BUILD_IN_SOURCE 1 + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${ffmpeg_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT ffmpeg_NAME) From 001e231604f44b30d1c6a07d6909daec93b7e1a5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:51:17 -0500 Subject: [PATCH 092/125] opencv.cmake: Added FFmpeg as a dependency of OpenCV and provided proper linking flags related to FFmpeg. --- opencv.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opencv.cmake b/opencv.cmake index 1b3ea59..e4728d0 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -16,6 +16,7 @@ include (libtiff) include (libjpeg) include (libpng) include (openexr) +include (ffmpeg) include (qt4) include (python) include (numpy) @@ -32,7 +33,7 @@ set (opencv_LIBS ${BUILDEM_LIB_DIR}/libopencv_ml.so ${BUILDEM_LIB_DIR}/libop message ("Installing ${opencv_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${opencv_NAME} - DEPENDS ${zlib_NAME} ${libjpeg_NAME} ${libpng_NAME} ${libtiff_NAME} ${openexr_NAME} ${qt4_NAME} ${python_NAME} ${numpy_NAME} ${sphinx_NAME} + DEPENDS ${zlib_NAME} ${libjpeg_NAME} ${libpng_NAME} ${libtiff_NAME} ${openexr_NAME} ${ffmpeg_NAME} ${qt4_NAME} ${python_NAME} ${numpy_NAME} ${sphinx_NAME} PREFIX ${BUILDEM_DIR} URL ${opencv_URL} URL_MD5 ${opencv_MD5} @@ -41,7 +42,7 @@ ExternalProject_Add(${opencv_NAME} CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${opencv_SRC_DIR} -DPYTHON_EXECUTABLE=${PYTHON_EXE} -DPYTHON_LIBRARY=${PYTHON_LIBRARY_FILE} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_PATH} -DPYTHON_PACKAGES_PATH=${PYTHON_PREFIX}/lib/python2.7/site-packages -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} - -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} + "-DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -liconv -L${BUILDEM_LIB_DIR} -lswresample" BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) # TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install From e9db38d8e1217e4357c1d1a23dd08b86dc780f4b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:53:09 -0500 Subject: [PATCH 093/125] opencv.cmake: Update OpenCV version as sima requires 2.4.8 at a minimum. --- opencv.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opencv.cmake b/opencv.cmake index e4728d0..3b955e5 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -23,10 +23,10 @@ include (numpy) include (sphinx) external_source (opencv - 2.4.5 - opencv-2.4.5.tar.gz - 8eac87462c7bec8b89021b723207c623 - http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.5/ + 2.4.8.3 + 2.4.8.3.tar.gz + a64feba01bd74c36ddf04d560d9cafd3 + https://github.com/Itseez/opencv/archive/ ) set (opencv_LIBS ${BUILDEM_LIB_DIR}/libopencv_ml.so ${BUILDEM_LIB_DIR}/libopencv_core.so) From 7a518cde9c3a5756504e544ddc8b052d339933f0 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 22 Oct 2014 13:56:41 -0400 Subject: [PATCH 094/125] sima.cmake: Added sima, which is a tool for "analysis of time-series imaging data arising from fluorescence microscopy". --- sima.cmake | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sima.cmake diff --git a/sima.cmake b/sima.cmake new file mode 100644 index 0000000..4dd8900 --- /dev/null +++ b/sima.cmake @@ -0,0 +1,48 @@ +# +# For use in the analysis of time-series imaging data arising from fluorescence microscopy. +# + +if (NOT sima_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (numpy) +include (scipy) +include (matplotlib) +include (scikit-image) +include (shapely) +include (h5py) +include (opencv) + + +external_source (sima + 0.3.1 + sima-0.3.1.tar.gz + 5910ea2c8c1bbcd7deb001ce64a5a9f4 + http://pypi.python.org/packages/source/s/sima/) + + +# Download and install sima +message ("Installing ${sima_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${sima_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${scipy_NAME} ${matplotlib_NAME} ${scikit-image_NAME} ${shapely_NAME} ${h5py_NAME} ${opencv_NAME} + PREFIX ${BUILDEM_DIR} + URL ${sima_URL} + URL_MD5 ${sima_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${sima_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT sima_NAME) From f029dfdb61db0c243c170bda2763231a7b030b5d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 11:03:20 -0500 Subject: [PATCH 095/125] patches/sima-extract.py.patch: Use non-sparse inv from SciPy as our version does not include the sparse implementation. patches/sima-misc-__init__.py.patch: Use LooseVersion instead of StrictVersion for enforcing which OpenCV version is used. patches/sima-normcut.py.patch: Use LooseVersion instead of StrictVersion for enforcing which OpenCV version is used. patches/sima-segment.py.patch: Use LooseVersion instead of StrictVersion for enforcing which OpenCV version is used. Also, nanmean is not in scipy, but is in scipy.stats. However, bottleneck's nanmean is roughly an order of magnitude faster. --- patches/sima-extract.py.patch | 13 +++++++++++++ patches/sima-misc-__init__.py.patch | 22 ++++++++++++++++++++++ patches/sima-normcut.py.patch | 22 ++++++++++++++++++++++ patches/sima-segment.py.patch | 24 ++++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 patches/sima-extract.py.patch create mode 100644 patches/sima-misc-__init__.py.patch create mode 100644 patches/sima-normcut.py.patch create mode 100644 patches/sima-segment.py.patch diff --git a/patches/sima-extract.py.patch b/patches/sima-extract.py.patch new file mode 100644 index 0000000..b98522c --- /dev/null +++ b/patches/sima-extract.py.patch @@ -0,0 +1,13 @@ +diff --git a/extract.py b/extract.py +index 34d14f4..9d19c34 100644 +--- a/extract.py ++++ b/extract.py +@@ -8,7 +8,7 @@ from multiprocessing import Pool, cpu_count + + import numpy as np + from scipy.sparse import vstack, diags, csc_matrix +-from scipy.sparse.linalg import inv ++from scipy.linalg import inv + + + def _demixing_matrix(dataset): diff --git a/patches/sima-misc-__init__.py.patch b/patches/sima-misc-__init__.py.patch new file mode 100644 index 0000000..7c39cf4 --- /dev/null +++ b/patches/sima-misc-__init__.py.patch @@ -0,0 +1,22 @@ +diff --git a/misc/__init__.py b/misc/__init__.py +index 87b42da..cc73f9e 100644 +--- a/misc/__init__.py ++++ b/misc/__init__.py +@@ -1,7 +1,7 @@ + import os + import itertools as it + import errno +-from distutils.version import StrictVersion ++from distutils.version import LooseVersion + + from numpy import nanmax + try: +@@ -9,7 +9,7 @@ try: + except ImportError: + cv2_available = False + else: +- cv2_available = StrictVersion(cv2.__version__) >= StrictVersion('2.4.8') ++ cv2_available = LooseVersion(cv2.__version__) >= LooseVersion('2.4.8') + + + def lazyprop(fn): diff --git a/patches/sima-normcut.py.patch b/patches/sima-normcut.py.patch new file mode 100644 index 0000000..eb86250 --- /dev/null +++ b/patches/sima-normcut.py.patch @@ -0,0 +1,22 @@ +diff --git a/normcut.py b/normcut.py +index 48e5000..b6fc90a 100644 +--- a/normcut.py ++++ b/normcut.py +@@ -7,7 +7,7 @@ Reference + IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, + VOL. 22, NO. 8, AUGUST 2000. + """ +-from distutils.version import StrictVersion ++from distutils.version import LooseVersion + + import numpy as np + from scipy.sparse.linalg import eigsh +@@ -19,7 +19,7 @@ try: + except ImportError: + cv2_available = False + else: +- cv2_available = StrictVersion(cv2.__version__) >= StrictVersion('2.4.8') ++ cv2_available = LooseVersion(cv2.__version__) >= LooseVersion('2.4.8') + + + def normcut_vectors(affinity_matrix, k): diff --git a/patches/sima-segment.py.patch b/patches/sima-segment.py.patch new file mode 100644 index 0000000..db23f80 --- /dev/null +++ b/patches/sima-segment.py.patch @@ -0,0 +1,24 @@ +diff --git a/segment.py b/segment.py +index d927b0c..153ef8f 100644 +--- a/segment.py ++++ b/segment.py +@@ -1,6 +1,6 @@ + import os + import itertools as it +-from distutils.version import StrictVersion ++from distutils.version import LooseVersion + + import numpy as np + from scipy import sparse, ndimage +@@ -11,9 +11,9 @@ try: + except ImportError: + cv2_available = False + else: +- cv2_available = StrictVersion(cv2.__version__) >= StrictVersion('2.4.8') ++ cv2_available = LooseVersion(cv2.__version__) >= LooseVersion('2.4.8') + +-from scipy import nanmean ++from scipy.stats import nanmean + try: + from sklearn.decomposition import FastICA + except ImportError: From 48a682915c43feefd1f4aa18ee633e54365b15a5 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 21 Nov 2014 10:55:27 -0500 Subject: [PATCH 096/125] sima.cmake: Added patches to SIMA to relax OpenCV version constraints from StrictVersion to LooseVersion. Also, used nanmean from SciPy (however bottleneck's nanmean is faster by roughly an order of magnitude). Do not have access to sparse inversion in our version of SciPy. So, we used a non-sparse inversion, which may be slower. --- sima.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sima.cmake b/sima.cmake index 4dd8900..74461c9 100644 --- a/sima.cmake +++ b/sima.cmake @@ -36,7 +36,12 @@ ExternalProject_Add(${sima_NAME} URL ${sima_URL} URL_MD5 ${sima_MD5} UPDATE_COMMAND "" - PATCH_COMMAND "" + PATCH_COMMAND ${BUILDEM_ENV_STRING} ${PATCH_EXE} + # Turns off test that is known failure on Mac. + ${sima_SRC_DIR}/sima/extract.py ${PATCH_DIR}/sima-extract.py.patch + ${sima_SRC_DIR}/sima/misc/__init__.py ${PATCH_DIR}/sima-misc-__init__.py.patch + ${sima_SRC_DIR}/sima/normcut.py ${PATCH_DIR}/sima-normcut.py.patch + ${sima_SRC_DIR}/sima/segment.py ${PATCH_DIR}/sima-segment.py.patch CONFIGURE_COMMAND "" BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build BUILD_IN_SOURCE 1 From 931c17338d4cca3a8e298b68995cb0e1cbdbe68b Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 12 Dec 2014 09:56:38 -0500 Subject: [PATCH 097/125] patches/sima-motion.py.patch: Corrected to use nanmean from SciPy. --- patches/sima-motion.py.patch | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 patches/sima-motion.py.patch diff --git a/patches/sima-motion.py.patch b/patches/sima-motion.py.patch new file mode 100644 index 0000000..942e7a0 --- /dev/null +++ b/patches/sima-motion.py.patch @@ -0,0 +1,49 @@ +diff --git a/motion.py b/motion.py +index e747353..31bc941 100644 +--- a/motion.py ++++ b/motion.py +@@ -21,7 +21,7 @@ from numpy.linalg import det, svd, pinv + from scipy.special import gammaln + from scipy.signal import fftconvolve + from scipy.cluster.vq import kmeans2 +-from scipy.stats import nanstd ++from scipy.stats import nanmean, nanstd + from scipy.stats.mstats import mquantiles + from scipy.ndimage.filters import gaussian_filter + +@@ -99,7 +99,7 @@ def _estimate_movement_model(shifts, num_rows): + shifts.shape[1] * num_rows)) + assert det(cov_matrix) > 0 + +- mean_shift = np.nanmean(shifts, axis=1) ++ mean_shift = nanmean(shifts, axis=1) + centered_shifts = np.nan_to_num( + shifts - + np.dot(mean_shift.reshape([2, 1]), np.ones([1, shifts.shape[1]])) +@@ -349,7 +349,7 @@ class _MCImagingDataset(ImagingDataset): + pixel_means, pixel_variances = self._pixel_distribution() + cov_matrix_est, decay_matrix, log_transition_matrix = \ + _estimate_movement_model(shifts, self.num_rows) +- mean_shift = np.nanmean(shifts, axis=1) ++ mean_shift = nanmean(shifts, axis=1) + + # add a bit of extra room to move around + extra_buffer = ((max_displacement - np.nanmax(shifts, 1) + +@@ -706,7 +706,7 @@ class _MCImagingDataset(ImagingDataset): + The displacement to add to each shift to align the minimal shift + with the edge of the corrected image. + """ +- good_corr = correlations >= np.nanmean(correlations) - \ ++ good_corr = correlations >= nanmean(correlations) - \ + 2 * nanstd(correlations) + # only include image frames with sufficiently high correlation + min_shifts = np.nanmin(shifts[:, good_corr], axis=1).astype(int) +@@ -760,7 +760,7 @@ class _MCImagingDataset(ImagingDataset): + array + The photon-to-intensity gains for each channel. + """ +- corr_mean = np.nanmean(correlations) ++ corr_mean = nanmean(correlations) + corr_stdev = nanstd(correlations) + # Calculate displacements between consecutive images + diffs = np.diff(shifts, axis=1) From 72bb7ceb3bcbaf518ee302ab3c09cbcf58bdc0ff Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 12 Dec 2014 09:58:34 -0500 Subject: [PATCH 098/125] sima.cmake: Apply sima-motion.py.patch. --- sima.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/sima.cmake b/sima.cmake index 74461c9..2456071 100644 --- a/sima.cmake +++ b/sima.cmake @@ -40,6 +40,7 @@ ExternalProject_Add(${sima_NAME} # Turns off test that is known failure on Mac. ${sima_SRC_DIR}/sima/extract.py ${PATCH_DIR}/sima-extract.py.patch ${sima_SRC_DIR}/sima/misc/__init__.py ${PATCH_DIR}/sima-misc-__init__.py.patch + ${sima_SRC_DIR}/sima/motion.py ${PATCH_DIR}/sima-motion.py.patch ${sima_SRC_DIR}/sima/normcut.py ${PATCH_DIR}/sima-normcut.py.patch ${sima_SRC_DIR}/sima/segment.py ${PATCH_DIR}/sima-segment.py.patch CONFIGURE_COMMAND "" From 8d7f558b0199e66e83520b1b120d91853f3a0d58 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 12 Dec 2014 14:13:07 -0500 Subject: [PATCH 099/125] rank_filter.cmake: Provide support for building the Python module rank_filter. --- rank_filter.cmake | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 rank_filter.cmake diff --git a/rank_filter.cmake b/rank_filter.cmake new file mode 100644 index 0000000..fcca1bf --- /dev/null +++ b/rank_filter.cmake @@ -0,0 +1,52 @@ +# +# Install rank_filter module from source +# + +if (NOT rank_filter_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +set(DISABLE_VIGRANUMPY 0) + +include (python) +include (numpy) +include (boost) +include (vigra) +include (nose) + +external_git_repo (rank_filter + v0.1 + https://github.com/jakirkham/rank_filter) + +message("Installing ${rank_filter_NAME}/${VIGRA_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${rank_filter_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${boost_NAME} ${vigra_NAME} ${nose_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${rank_filter_URL} + GIT_TAG ${rank_filter_TAG} + PATCH_COMMAND "" + LIST_SEPARATOR ^^ + CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${rank_filter_SRC_DIR} + -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} + -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} + -DCMAKE_EXE_LINKER_FLAGS=${BUILDEM_LDFLAGS} + -DDEPENDENCY_SEARCH_PREFIX=${BUILDEM_DIR} + -DBOOST_ROOT=${BUILDEM_DIR} + -DVIGRA_ROOT=${BUILDEM_DIR} + "-DCMAKE_CXX_FLAGS=-pthread ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + "-DCMAKE_CXX_LINK_FLAGS=-pthread ${BUILDEM_ADDITIONAL_CXX_FLAGS}" + -DCMAKE_CXX_FLAGS_RELEASE=-O2\ -DNDEBUG + -DCMAKE_CXX_FLAGS_DEBUG="${CMAKE_CXX_FLAGS_DEBUG}" + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) + TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) test + INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install +) + +set_target_properties(${rank_filter_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT rank_filter_NAME) + From f7166fb723482b9a096fe7f3357dd66ea811dd28 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Mon, 15 Dec 2014 13:52:37 -0500 Subject: [PATCH 100/125] templates/exec.template: Make exec.template an executable. This way, when it is copied to bin, it should be an executable. --- templates/exec.template | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 templates/exec.template diff --git a/templates/exec.template b/templates/exec.template old mode 100644 new mode 100755 From 123ddbe499c2240eaae6f2740f41d8d08cede381 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Thu, 18 Dec 2014 09:48:30 -0500 Subject: [PATCH 101/125] ilastik.cmake: Update the ilastik version. --- ilastik.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ilastik.cmake b/ilastik.cmake index 7534112..61ad166 100644 --- a/ilastik.cmake +++ b/ilastik.cmake @@ -38,7 +38,7 @@ include (futures) include (qimage2ndarray) # select the desired ilastik commit -set(DEFAULT_ILASTIK_VERSION 18026ae2efb9e9e04046598cd5fccca3a42bcdaa) # 2014-06-11 +set(DEFAULT_ILASTIK_VERSION 779685cc1e6b78b633fcd1737c5eae78e8b72ddb) # 2014-09-18 IF(NOT DEFINED ILASTIK_VERSION) SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}") ENDIF() From 66f53143b14ad841e6929d4a9f20cc343251690c Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 6 Jan 2015 14:51:37 -0500 Subject: [PATCH 102/125] nanshe.cmake: Adds nanshe to the src directory just like ilastik. Does not install in site-packages. --- nanshe.cmake | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 nanshe.cmake diff --git a/nanshe.cmake b/nanshe.cmake new file mode 100644 index 0000000..146ffe3 --- /dev/null +++ b/nanshe.cmake @@ -0,0 +1,42 @@ +# Activity based segmentation of Calcium image data based on ( dx.doi.org/10.1109/ISBI.2013.6556660 ). + +if (NOT nanshe_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + + +include (pip) +include (scipy-stack) +include (ilastik) +include (spams-python) +include (rank_filter) + + +external_git_repo(nanshe + HEAD + https://github.com/jakirkham/nanshe) + + +# Download and install nanshe +message ("Installing ${nanshe_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${nanshe_NAME} + DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${nanshe_URL} + GIT_TAG ${nanshe_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + BUILD_IN_SOURCE 1 + INSTALL_COMMAND "" +) + +set_target_properties(${nanshe_NAME} PROPERTIES EXCLUDE_FROM_ALL OFF) + +endif (NOT nanshe_NAME) From 9ee3036c1da1e7557ef1dc4ea1f551256861b4f3 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 6 Jan 2015 16:44:52 -0500 Subject: [PATCH 103/125] templates/setenv_ilastik_gui.in: Add nanshe to the PYTHONPATH as well. --- templates/setenv_ilastik_gui.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/setenv_ilastik_gui.in b/templates/setenv_ilastik_gui.in index 32375a0..e5a48fb 100644 --- a/templates/setenv_ilastik_gui.in +++ b/templates/setenv_ilastik_gui.in @@ -33,6 +33,8 @@ else export PYTHONPATH=$ILASTIK_PATH/lazyflow:$PYTHONPATH export PYTHONPATH=$ILASTIK_PATH/lazyflow/lazyflow/drtile:$PYTHONPATH export PYTHONPATH=$ILASTIK_PATH/volumina:$PYTHONPATH + + export PYTHONPATH=$BUILDEM_DIR/src/nanshe-git:$PYTHONPATH export PATH=$PYTHON_PREFIX/bin:$PATH export PATH=$BUILDEM_DIR/bin:$PATH From 1aad659899e00d8a8347bc20fba51279237aa427 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 6 Jan 2015 16:46:05 -0500 Subject: [PATCH 104/125] templates/setenv_ilastik_headless.in: Add nanshe to the PYTHONPATH as well. --- templates/setenv_ilastik_headless.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/setenv_ilastik_headless.in b/templates/setenv_ilastik_headless.in index 481c696..9430644 100644 --- a/templates/setenv_ilastik_headless.in +++ b/templates/setenv_ilastik_headless.in @@ -26,6 +26,8 @@ else export PYTHONPATH=$ILASTIK_PATH/ilastik:$PYTHONPATH export PYTHONPATH=$ILASTIK_PATH/lazyflow:$PYTHONPATH export PYTHONPATH=$ILASTIK_PATH/lazyflow/lazyflow/drtile:$PYTHONPATH + + export PYTHONPATH=$BUILDEM_DIR/src/nanshe-git:$PYTHONPATH export PATH=$PYTHON_PREFIX/bin:$PATH export PATH=$BUILDEM_DIR/bin:$PATH From 4ab53a7e80d252c484bec0dc8516472a2933bdea Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 9 Jan 2015 20:14:48 -0500 Subject: [PATCH 105/125] hdf5storage.cmake: Adds additional support for the HDF5 format in Python. Provides method for loading and saving MATLAB v7.3 files. Will fallback to SciPy if the version is older. --- hdf5storage.cmake | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 hdf5storage.cmake diff --git a/hdf5storage.cmake b/hdf5storage.cmake new file mode 100644 index 0000000..a82b256 --- /dev/null +++ b/hdf5storage.cmake @@ -0,0 +1,47 @@ +# +# A python module to provide additional support for the HDF5 format. +# Is able to load and save MATLAB v7.3 file. Will fallback to SciPy when it is unable to. +# + + +if (NOT hdf5storage_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (numpy) +include (h5py) +include (scipy) + +external_source (hdf5storage +# Run the fake file using echo to initialize the shell. + 0.1.3 + hdf5storage-0.1.3.zip + 1bdda81bd88ce2f23adbda0217e16375 + https://pypi.python.org/packages/source/h/hdf5storage/) + + +# Download and install hdf5storage +message ("Installing ${hdf5storage_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${hdf5storage_NAME} + DEPENDS ${python_NAME} ${numpy_NAME} ${h5py_NAME} ${scipy_NAME} + PREFIX ${BUILDEM_DIR} + URL ${hdf5storage_URL} + URL_MD5 ${hdf5storage_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${hdf5storage_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT hdf5storage_NAME) + From 4707213836dc8144764172f6797a2ec3ae4492ff Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 9 Jan 2015 22:59:50 -0500 Subject: [PATCH 106/125] templates/exec.template: Cleaned up comments. --- templates/exec.template | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/exec.template b/templates/exec.template index 0125d69..3f20536 100755 --- a/templates/exec.template +++ b/templates/exec.template @@ -2,12 +2,10 @@ export ILASTIK_PATH= -# we assume that this script resides in BUILDEM_DIR +# We assume that this script resides in BUILDEM_DIR. export BUILDEM_DIR=$(cd `dirname $0`/.. && pwd) echo "BUILDEM_DIR: $BUILDEM_DIR" source $BUILDEM_DIR/bin/@SETENV_ILASTIK@.sh -# no longer need this shell as -# we just wanted to set environment -# before executing the command. +# No longer need this shell as we just wanted to set environment before executing the command. exec "$@" From f7bd0967529d66b517b51cbb13b8adf61e88f286 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 9 Jan 2015 23:00:23 -0500 Subject: [PATCH 107/125] templates/exec.template: Removed quotes as they were unnecessary and hindered some behavior (i.e. opening a subshell). --- templates/exec.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/exec.template b/templates/exec.template index 3f20536..994b717 100755 --- a/templates/exec.template +++ b/templates/exec.template @@ -8,4 +8,4 @@ echo "BUILDEM_DIR: $BUILDEM_DIR" source $BUILDEM_DIR/bin/@SETENV_ILASTIK@.sh # No longer need this shell as we just wanted to set environment before executing the command. -exec "$@" +exec $@ From 047d484b3ab86504f26c3c7a87afc21029e3adf1 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:22:28 -0500 Subject: [PATCH 108/125] gmpy.cmake: Use PyPI for downloads instead of their Google Code page. --- gmpy.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gmpy.cmake b/gmpy.cmake index 44ea9ce..0254416 100644 --- a/gmpy.cmake +++ b/gmpy.cmake @@ -22,7 +22,7 @@ external_source (gmpy 2.0.3 gmpy2-2.0.3.zip 63f367b4dceb20dcd72c143e7c9a8632 - http://gmpy.googlecode.com/files/ + http://pypi.python.org/packages/source/g/gmpy2/ FORCE) From e6879c2c0f6379e444c26747a86cb0e1633d2e3f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:28:19 -0500 Subject: [PATCH 109/125] gmpy.cmake: Turn off FORCE as the archive is already in the cache. --- gmpy.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gmpy.cmake b/gmpy.cmake index 0254416..49861c5 100644 --- a/gmpy.cmake +++ b/gmpy.cmake @@ -22,8 +22,7 @@ external_source (gmpy 2.0.3 gmpy2-2.0.3.zip 63f367b4dceb20dcd72c143e7c9a8632 - http://pypi.python.org/packages/source/g/gmpy2/ - FORCE) + http://pypi.python.org/packages/source/g/gmpy2/) message ("Installing ${gmpy_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From 2e89bb66b612689a2d2860145b61eaf4f3731c54 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:30:15 -0500 Subject: [PATCH 110/125] gmpy.cmake: Bump version from 2.0.3 to 2.0.5. --- gmpy.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gmpy.cmake b/gmpy.cmake index 49861c5..f5e7e8a 100644 --- a/gmpy.cmake +++ b/gmpy.cmake @@ -19,9 +19,9 @@ include (mpc) external_source (gmpy - 2.0.3 - gmpy2-2.0.3.zip - 63f367b4dceb20dcd72c143e7c9a8632 + 2.0.5 + gmpy2-2.0.5.zip + 95f008bcab6372164358123f43e3f490 http://pypi.python.org/packages/source/g/gmpy2/) From 170cdefa08f2363b78e7f095599f5014b1fab2fd Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:53:56 -0500 Subject: [PATCH 111/125] ipython.cmake: Add newline at EOF. --- ipython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipython.cmake b/ipython.cmake index ee3feff..a27d4db 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -40,4 +40,4 @@ ExternalProject_Add(${ipython_NAME} set_target_properties(${ipython_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) -endif (NOT ipython_NAME) \ No newline at end of file +endif (NOT ipython_NAME) From 720f72f9181e35a366a7e5be60a86d8274bac62c Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:58:38 -0500 Subject: [PATCH 112/125] ann.cmake: Add terminal /. --- ann.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ann.cmake b/ann.cmake index dbe0ee6..64f5cb9 100644 --- a/ann.cmake +++ b/ann.cmake @@ -15,7 +15,7 @@ external_source (ann 1.1.2 ann_1.1.2.tar.gz 7ffaacc7ea79ca39d4958a6378071365 - http://www.cs.umd.edu/~mount/ANN/Files/1.1.2 + http://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ FORCE) message ("Installing ${ann_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From 9a127a412bf2e6802daf037409ce4a2ed9baa122 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 18:58:54 -0500 Subject: [PATCH 113/125] ann.cmake: Turn off FORCE as it is already in downloads. --- ann.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ann.cmake b/ann.cmake index 64f5cb9..2ce809c 100644 --- a/ann.cmake +++ b/ann.cmake @@ -15,8 +15,7 @@ external_source (ann 1.1.2 ann_1.1.2.tar.gz 7ffaacc7ea79ca39d4958a6378071365 - http://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ - FORCE) + http://www.cs.umd.edu/~mount/ANN/Files/1.1.2/) message ("Installing ${ann_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ann_NAME} From 0a74b0a257070245a1443ad1bafc6794977ae735 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:01:25 -0500 Subject: [PATCH 114/125] dlib.cmake: Turn off FORCE as it is already in downloads. --- dlib.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlib.cmake b/dlib.cmake index 7bb3c6e..d13cf39 100644 --- a/dlib.cmake +++ b/dlib.cmake @@ -15,8 +15,7 @@ external_source (dlib 18.3 dlib-18.3.tar.bz2 1ad26ec7bddccf8a605e1edfd0620c65 - http://downloads.sourceforge.net/project/dclib/dlib/v18.3 - FORCE) + http://downloads.sourceforge.net/project/dclib/dlib/v18.3) message ("Installing ${dlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${dlib_NAME} From 1ec962a737cac757b1aeb30a8e8d12c257b97ae6 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:11:28 -0500 Subject: [PATCH 115/125] libxml2.cmake: Turn off FORCE as it is already in downloads. --- libxml2.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/libxml2.cmake b/libxml2.cmake index 1fe8022..d6fac2e 100644 --- a/libxml2.cmake +++ b/libxml2.cmake @@ -16,7 +16,6 @@ if (NOT libxml2_NAME) libxml2-2.9.1.tar.gz 9c0cfef285d5c4a5c80d00904ddab380 ftp://xmlsoft.org/libxml2 - FORCE ) From 19fd88ed432b2f265eeacd4ba99e5e0a83bec620 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:55:35 -0500 Subject: [PATCH 116/125] psutil.cmake: Turn off FORCE as it is already in downloads. --- psutil.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/psutil.cmake b/psutil.cmake index faad4ff..890e932 100644 --- a/psutil.cmake +++ b/psutil.cmake @@ -17,7 +17,6 @@ external_source (psutil psutil-2.1.1.tar.gz 72a6b15d589fab11f6ca245b775bc3c6 https://pypi.python.org/packages/source/p/psutil - FORCE ) message ("Installing ${psutil_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From 307dcfa951017ce53f404d5263f38fcb1c8e28ea Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:42:18 -0500 Subject: [PATCH 117/125] matplotlib.cmake: Bump version to 1.4.2. --- matplotlib.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matplotlib.cmake b/matplotlib.cmake index d08062a..4d34c4f 100644 --- a/matplotlib.cmake +++ b/matplotlib.cmake @@ -28,10 +28,10 @@ include (freetype2) include (tornado) external_source (matplotlib - 1.1.1 - matplotlib-1.1.1.tar.gz - 8cbeaae8ba9da703d926e74c3e7c8a57 - http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.1.1) + 1.4.2 + matplotlib-1.4.2.tar.gz + 7d22efb6cce475025733c50487bd8898 + http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.4.2) message ("Installing ${matplotlib_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${matplotlib_NAME} From b7879f023fbf4ec322e0e8fc07c7c4edb9abcb3e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 20:12:24 -0500 Subject: [PATCH 118/125] ipython.cmake: Bump version from 1.2.1 to 2.1.0. --- ipython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipython.cmake b/ipython.cmake index a27d4db..c451de2 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -21,7 +21,7 @@ include (jinja) external_git_repo(ipython - rel-1.2.1 #9c4f59ddd54d797072d28d2d5549bc5ea234216d + rel-2.1.0 #681fd77d0aa43f0b2648674ce3da9185021c0e3d https://github.com/ipython/ipython/) message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") From ca333c9bcf712da99facc63ed994296e9ad2e154 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 19:52:28 -0500 Subject: [PATCH 119/125] opencv.cmake: Correct spacing. --- opencv.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opencv.cmake b/opencv.cmake index 3b955e5..4fce495 100644 --- a/opencv.cmake +++ b/opencv.cmake @@ -43,8 +43,8 @@ ExternalProject_Add(${opencv_NAME} -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR} -DCMAKE_PREFIX_PATH=${BUILDEM_DIR} "-DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -liconv -L${BUILDEM_LIB_DIR} -lswresample" - BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) -# TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check + BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) +# TEST_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) check INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install ) From b2f8382f0ae1363b5d285bfe65cd692556419128 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 20:59:19 -0500 Subject: [PATCH 120/125] python-markdown.cmake: Markdown parser for Python. --- python-markdown.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 python-markdown.cmake diff --git a/python-markdown.cmake b/python-markdown.cmake new file mode 100644 index 0000000..ab4678f --- /dev/null +++ b/python-markdown.cmake @@ -0,0 +1,37 @@ +# Adds python-markdown, a markdown parser. + +if (NOT python-markdown_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (python) +include (setuptools) + +external_git_repo(python-markdown + 2.5.2-final # a9195fd2261d8a29762f7d8fc34b520c94fd09ec + https://github.com/waylan/Python-Markdown) + + +# Download and install python-markdown +message ("Installing ${python-markdown_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${python-markdown_NAME} + DEPENDS ${python_NAME} ${setuptools_NAME} + PREFIX ${BUILDEM_DIR} + GIT_REPOSITORY ${python-markdown_URL} + GIT_TAG ${python-markdown_TAG} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${python-markdown_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT python-markdown_NAME) From 7a3c6fb266e69550750d0b399678cebf75e6dbad Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 21:01:47 -0500 Subject: [PATCH 121/125] ipython.cmake: Correct spacing. --- ipython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipython.cmake b/ipython.cmake index c451de2..691f822 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -28,7 +28,7 @@ message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ipython_NAME} DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} PREFIX ${BUILDEM_DIR} - GIT_REPOSITORY ${ipython_URL} + GIT_REPOSITORY ${ipython_URL} GIT_TAG ${ipython_TAG} UPDATE_COMMAND "" PATCH_COMMAND "" From 830ffbb759502ce87a51fc055b454251094c8940 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Wed, 14 Jan 2015 21:02:00 -0500 Subject: [PATCH 122/125] ipython.cmake: Make python-markdown a dependency. --- ipython.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipython.cmake b/ipython.cmake index 691f822..7f61689 100644 --- a/ipython.cmake +++ b/ipython.cmake @@ -18,6 +18,7 @@ include (nose) include (pygments) include (tornado) include (jinja) +include (python-markdown) external_git_repo(ipython @@ -26,7 +27,7 @@ external_git_repo(ipython message ("Installing ${ipython_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${ipython_NAME} - DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} + DEPENDS ${python_NAME} ${sphinxcontrib-napoleon_NAME} ${pyzmq_NAME} ${nose_NAME} ${pygments_NAME} ${tornado_NAME} ${jinja_NAME} ${python-markdown_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${ipython_URL} GIT_TAG ${ipython_TAG} From 228eb73e60def125dd2977f08f944d1b16104a8d Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 20 Jan 2015 11:36:13 -0500 Subject: [PATCH 123/125] pylibtiff.cmake: Added pylibtiff to provide Python bindings to libtiff. --- pylibtiff.cmake | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pylibtiff.cmake diff --git a/pylibtiff.cmake b/pylibtiff.cmake new file mode 100644 index 0000000..e1ccea9 --- /dev/null +++ b/pylibtiff.cmake @@ -0,0 +1,45 @@ +# +# Provides a thin wrapper for libtiff to be used from Python. +# + +if (NOT pylibtiff_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) + +include (libtiff) +include (python) +include (setuptools) +include (numpy) +include (nose) + +external_source (pylibtiff + 0.4.0 + libtiff-0.4.0.tar.gz + f7cad14620548b21bf05a276a040f487 + http://pypi.python.org/packages/source/l/libtiff/) + + +# Download and install pylibtiff +message ("Installing ${pylibtiff_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") + +ExternalProject_Add(${pylibtiff_NAME} + DEPENDS ${libtiff_NAME} ${python_NAME} ${setuptools_NAME} ${numpy_NAME} ${nose_NAME} + PREFIX ${BUILDEM_DIR} + URL ${pylibtiff_URL} + URL_MD5 ${pylibtiff_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${pylibtiff_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT pylibtiff_NAME) From 7d054beb95b0c1834e8e86f2b9b05e611900630e Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 23 Jan 2015 00:44:13 -0500 Subject: [PATCH 124/125] cloud_sptheme.cmake: Added cloud theme. A theme for Sphinx. --- cloud_sptheme.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cloud_sptheme.cmake diff --git a/cloud_sptheme.cmake b/cloud_sptheme.cmake new file mode 100644 index 0000000..f9b6e1e --- /dev/null +++ b/cloud_sptheme.cmake @@ -0,0 +1,40 @@ +# +# Install cloud_sptheme from source. Provides theme for Sphinx. +# + +if (NOT cloud_sptheme_NAME) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +include (ExternalProject) +include (ExternalSource) +include (BuildSupport) +include (TemplateSupport) + +include (python) +include (sphinx) + +external_source (cloud_sptheme + 1.6 + cloud_sptheme-1.6.tar.gz + 23d5fce0b87836d9f29573d6ee6a9bc1 + https://pypi.python.org/packages/source/c/cloud_sptheme/) + +message ("Installing ${cloud_sptheme_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") +ExternalProject_Add(${cloud_sptheme_NAME} + DEPENDS ${python_NAME} ${sphinx_NAME} + PREFIX ${BUILDEM_DIR} + URL ${cloud_sptheme_URL} + URL_MD5 ${cloud_sptheme_MD5} + UPDATE_COMMAND "" + PATCH_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py build + BUILD_IN_SOURCE 1 + TEST_COMMAND "" + INSTALL_COMMAND ${BUILDEM_ENV_STRING} ${PYTHON_EXE} setup.py install +) + +set_target_properties(${cloud_sptheme_NAME} PROPERTIES EXCLUDE_FROM_ALL ON) + +endif (NOT cloud_sptheme_NAME) From d181e3a4d37db29fb9f87df16f5684d6debd7e67 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Fri, 23 Jan 2015 01:07:49 -0500 Subject: [PATCH 125/125] nanshe.cmake: Add cloud_sptheme as a dependency. --- nanshe.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nanshe.cmake b/nanshe.cmake index 146ffe3..08a04b5 100644 --- a/nanshe.cmake +++ b/nanshe.cmake @@ -14,6 +14,7 @@ include (scipy-stack) include (ilastik) include (spams-python) include (rank_filter) +include (cloud_sptheme) external_git_repo(nanshe @@ -25,7 +26,7 @@ external_git_repo(nanshe message ("Installing ${nanshe_NAME} into FlyEM build area: ${BUILDEM_DIR} ...") ExternalProject_Add(${nanshe_NAME} - DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} + DEPENDS ${pip_NAME} ${scipy-stack_NAME} ${ilastik_NAME} ${spams-python_NAME} ${rank_filter_NAME} ${cloud_sptheme_NAME} PREFIX ${BUILDEM_DIR} GIT_REPOSITORY ${nanshe_URL} GIT_TAG ${nanshe_TAG}