Commit 9a25fd05 authored by Salko Jr, Robert's avatar Salko Jr, Robert
Browse files

Eliminate miniconda install

The miniconda is not working correctly currently and has been causing a lot of problems and slow installs.  I'm switching to using the installed python instead.  I also updated the supported numpy version, which has caused a results change.
parent b0771c53
Loading
Loading
Loading
Loading
+0 −58
Original line number Diff line number Diff line
@@ -25,65 +25,7 @@ find_program(PYTHON "python")
SET(PYTHON_EXE
    ${PYTHON}
)
# Find if a Python module is installed
# Found at http://www.cmake.org/pipermail/cmake/2011-January/041666.html
# To use do: find_python_module(PyQt4 REQUIRED)
function(find_python_module module)
	string(TOUPPER ${module} module_upper)
	if(NOT PY_${module_upper})
		if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED")
			set(${module}_FIND_REQUIRED TRUE)
		endif()
		# A module's location is usually a directory, but for binary modules
		# it's a .so file.
		execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
			"import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))"
			RESULT_VARIABLE _${module}_status
			OUTPUT_VARIABLE _${module}_location
			ERROR_QUIET
			OUTPUT_STRIP_TRAILING_WHITESPACE)
		if(NOT _${module}_status)
			set(PY_${module_upper} ${_${module}_location} CACHE STRING
				"Location of Python module ${module}")
		endif(NOT _${module}_status)
	endif(NOT PY_${module_upper})
	find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper})
endfunction(find_python_module)


if(NOT "find_python_module(PyQt4)")
  SET(MAKE_INSTALL_DIR_COMMAND
  "mkdir -p ${CMAKE_CURRENT_BINARY_DIR}"
  )
  if(UNIX AND NOT APPLE)
     SET(PYTHON_CONFIGURE_COMMAND
     "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/linux/Miniconda2-latest-Linux-x86_64.sh -b -u -p ${CMAKE_CURRENT_BINARY_DIR}/conda"
     )
     SET(PYTHON_UPDATE_COMMAND
     "${CMAKE_CURRENT_BINARY_DIR}/conda/bin/pip install -r ${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/linux/requirements.txt --no-index --find-links file://${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/linux"
     )
     MESSAGE("Building Python via Miniconda")
  else()
     SET(PYTHON_CONFIGURE_COMMAND
     "${CMAKE_CURRENT_SOURCE_DIR}/cmake/bundle/macos/Miniconda2-latest-MacOSX-x86_64.sh -b -u -p ${CMAKE_CURRENT_BINARY_DIR}/conda"
     )
     SET(PYTHON_UPDATE_COMMAND
     "${CMAKE_CURRENT_BINARY_DIR}/conda/bin/pip install -r ${CMAKE_CURRENT_BINARY_DIR}/cmake/bundle/macos/requirements.txt --no-index --find-links file://${CMAKE_CURRENT_BINARY_DIR}/cmake/bundle/macos"
     )
     MESSAGE("bash  -c ${PYTHON_CONFIGURE_COMMAND}")
  endif()
  execute_process(
      COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/conda
      COMMAND bash -c ${PYTHON_CONFIGURE_COMMAND}
      OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/miniconda.log
  )
  execute_process(
       COMMAND bash -c ${PYTHON_UPDATE_COMMAND}
       OUTPUT_FILE${CMAKE_CURRENT_BINARY_DIR}/update_miniconda.log
  )
endif()

INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/conda DESTINATION ${CMAKE_INSTALL_PREFIX} USE_SOURCE_PERMISSIONS )
INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SubKit DESTINATION ${CMAKE_INSTALL_PREFIX} USE_SOURCE_PERMISSIONS )
INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/wasp   DESTINATION ${CMAKE_INSTALL_PREFIX}/SubKit USE_SOURCE_PERMISSIONS )
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/MANIFEST.in ${CMAKE_CURRENT_BINARY_DIR}/setup.py DESTINATION  ${CMAKE_INSTALL_PREFIX} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ WORLD_WRITE)
+2 −2
Original line number Diff line number Diff line
matplotlib<=2.2.4
matplotlib
sympy
scipy
numpy>=1.13.0,<=1.16.4
numpy>=1.16.0
h5py
+2 −2
Original line number Diff line number Diff line
@@ -28,10 +28,10 @@ setup(name='SubKit',
      packages=find_packages(),
      include_package_data=True,
      install_requires=[
          'matplotlib<=2.2.4',
          'matplotlib',
          'sympy',
          'scipy',
          'numpy>=1.13.0,<=1.16.4',
          'numpy>=1.16.0',
          'h5py'
      ]
      )
+2 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ ctf model
**   I          AN          PW ABOT ATOP NMGP           X           Y        XSIZ        YSIZ
     1  3.2484e-02   3.7117e-1  0.0  0.0    0 -8.0000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     2  7.7831e-02   3.3625e-1  0.0  0.0    0 -4.8000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     3  9.8966e-02   6.4435e-1  0.0  0.0    0 -1.6000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     3  9.8966e-02   3.2217e-1  0.0  0.0    0 -1.6000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     4  9.8966e-02   3.2217e-1  0.0  0.0    0  1.6000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     5  7.7831e-02   3.3625e-1  0.0  0.0    0  4.8000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     6  3.2484e-02   3.7117e-1  0.0  0.0    0  8.0000e-01  1.4400e+00  3.2000e-01  3.2000e-01
@@ -119,7 +119,7 @@ ctf model
    82  5.6056e-02   4.5407e-1  0.0  0.0    0  1.1200e+00 -1.1200e+00  3.2000e-01  3.2000e-01
    83  3.2484e-02   3.7117e-1  0.0  0.0    0 -8.0000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    84  7.7831e-02   3.3625e-1  0.0  0.0    0 -4.8000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    85  9.8966e-02   6.4435e-1  0.0  0.0    0 -1.6000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    85  9.8966e-02   3.2217e-1  0.0  0.0    0 -1.6000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    86  9.8966e-02   3.2217e-1  0.0  0.0    0  1.6000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    87  7.7831e-02   3.3625e-1  0.0  0.0    0  4.8000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    88  3.2484e-02   3.7117e-1  0.0  0.0    0  8.0000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ ctf model
     3  2.0106e+00  5.0265e+00  0.0  0.0    0  2.5600e+00  0.0000e+00  1.6000e+00  1.6000e+00
     4  3.2484e-02   3.7117e-1  0.0  0.0    0 -8.0000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     5  7.7831e-02   3.3625e-1  0.0  0.0    0 -4.8000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     6  9.8966e-02   6.4435e-1  0.0  0.0    0 -1.6000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     6  9.8966e-02   3.2217e-1  0.0  0.0    0 -1.6000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     7  9.8966e-02   3.2217e-1  0.0  0.0    0  1.6000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     8  7.7831e-02   3.3625e-1  0.0  0.0    0  4.8000e-01  1.4400e+00  3.2000e-01  3.2000e-01
     9  3.2484e-02   3.7117e-1  0.0  0.0    0  8.0000e-01  1.4400e+00  3.2000e-01  3.2000e-01
@@ -122,7 +122,7 @@ ctf model
    85  5.6056e-02   4.5407e-1  0.0  0.0    0  1.1200e+00 -1.1200e+00  3.2000e-01  3.2000e-01
    86  3.2484e-02   3.7117e-1  0.0  0.0    0 -8.0000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    87  7.7831e-02   3.3625e-1  0.0  0.0    0 -4.8000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    88  9.8966e-02   6.4435e-1  0.0  0.0    0 -1.6000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    88  9.8966e-02   3.2217e-1  0.0  0.0    0 -1.6000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    89  9.8966e-02   3.2217e-1  0.0  0.0    0  1.6000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    90  7.7831e-02   3.3625e-1  0.0  0.0    0  4.8000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
    91  3.2484e-02   3.7117e-1  0.0  0.0    0  8.0000e-01 -1.4400e+00  3.2000e-01  3.2000e-01
Loading