diff --git a/README.md b/README.md index 01a9942..53739d5 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,8 @@ Initial Release: December 2014 - Sets part.left/right/top/bottom using geometry.ACC constant, tests added - Fixes issue https://github.com/spacether/pycalculix/issues/57 where part.left was not being set if a line was slightly skewed +- Fixes a mac install issue where gcc@7 was assuming a specific X.X.X version + of gcc7 #### 1.1.1 - Omits test_pinned_plate from Mac OS X with Python >= 3.6 because it does not diff --git a/dist/documentation.zip b/dist/documentation.zip index a0b37f9..3e4250d 100644 Binary files a/dist/documentation.zip and b/dist/documentation.zip differ diff --git a/dist/examples.zip b/dist/examples.zip index ac3c3d3..b5649bf 100644 Binary files a/dist/examples.zip and b/dist/examples.zip differ diff --git a/dist/pycalculix-1.1.2.zip b/dist/pycalculix-1.1.2.zip index 323cac4..9150a80 100644 Binary files a/dist/pycalculix-1.1.2.zip and b/dist/pycalculix-1.1.2.zip differ diff --git a/docs/index.rst b/docs/index.rst index 806ecd0..884a439 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,5 @@ .. pycalculix documentation master file, created by - sphinx-quickstart on Fri Dec 14 10:41:52 2018. + sphinx-quickstart on Sun Dec 23 14:21:14 2018. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. diff --git a/pycalculix/installer.py b/pycalculix/installer.py index f671bec..3be3f4d 100644 --- a/pycalculix/installer.py +++ b/pycalculix/installer.py @@ -131,24 +131,29 @@ def mac_add_ccx(): subprocess.check_call(command_line, shell=True) # check to see if we have the fortran that ccx needs and return if we do gcc7_to_path = "/usr/local/opt/gcc/lib/gcc/7" + needed_fortran_path = "%s/libgfortran.4.dylib" % gcc7_to_path if os.path.isfile(needed_fortran_path): if os.path.islink(link_to_path): print('Linked gcc7 fortran found and used') else: print('System gcc7 fortran found and used') + print('Finished installing calculix (ccx)') return # install gcc@7 with brew if we don't have it - brew_fortran_path = ("/usr/local/Cellar/gcc@7/7.3.0/lib/gcc/7/" - "libgfortran.4.dylib") - if not os.path.isfile(brew_fortran_path): + paths = glob.glob("/usr/local/Cellar/gcc@7/*") + if not paths: command_line = "brew install gcc@7" subprocess.check_call(command_line, shell=True) print('Installed gcc@7 (needed by calculix)') + paths = glob.glob("/usr/local/Cellar/gcc@7/*") # link gcc@7 from_path to to_path - gcc7_from_path = "/usr/local/Cellar/gcc@7/7.3.0/lib/gcc/7" + gcc7_from_path = "%s/lib/gcc/7" % paths[-1] command_line = "ln -s %s %s" % (gcc7_from_path, gcc7_to_path) subprocess.check_call(command_line, shell=True) + if not os.path.isfile(needed_fortran_path): + raise Exception("Install failed, libgfortran.4.dylib (a library that " + "ccx needs) was NOT FOUND") print('Finished installing calculix (ccx)')