Skip to content

Commit

Permalink
Merge pull request #75 from scikit-build/add-windows-addon-flang
Browse files Browse the repository at this point in the history
windows: Add install-flang add-on
  • Loading branch information
jcfr committed Aug 20, 2018
2 parents 93f7606 + a86ba23 commit 458aba0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 13 deletions.
47 changes: 35 additions & 12 deletions docs/windows/install-scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ install them:

* or from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-python-36-x64.ps1'))
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-git.ps1'))

Expand All @@ -32,7 +32,7 @@ Install selected CMake version in ``C:\cmake-X.Y.Z``.

* from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
$cmakeVersion="3.8.1"
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-cmake.ps1'))

Expand All @@ -45,6 +45,29 @@ Install selected CMake version in ``C:\cmake-X.Y.Z``.
.. important:: In case of installation problem, see :ref:`addressing_underlying_connection_closed`


``install-flang.ps1``
^^^^^^^^^^^^^^^^^^^^^

Install latest ``flang`` in a new conda environment named `flang-env`.

* from a windows command terminal open as administrator ::

@powershell -ExecutionPolicy Unrestricted "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-flang.ps1'))"


* from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-flang.ps1'))

Flang is a Fortran compiler targeting LLVM, it was `announced <https://www.llnl.gov/news/nnsa-national-labs-team-nvidia-develop-open-source-fortran-compiler-technology>`_
in 2015.

Source code is hosted on GitHub at https://github.com/flang-compiler/flang, the windows fork is hosted as https://github.com/isuruf/flang

.. important:: In case of installation problem, see :ref:`addressing_underlying_connection_closed`


``install-git.ps1``
^^^^^^^^^^^^^^^^^^^

Expand All @@ -57,7 +80,7 @@ Install Git 2.11.0 (including Git Bash) on the system.

* from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-git.ps1'))


Expand All @@ -69,7 +92,7 @@ Install Git 2.11.0 (including Git Bash) on the system.


``install-miniconda3.ps1``
^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^

Install latest miniconda3 environment into ``C:\Miniconda3``.

Expand All @@ -80,7 +103,7 @@ Install latest miniconda3 environment into ``C:\Miniconda3``.

* from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-miniconda3.ps1'))


Expand All @@ -103,7 +126,7 @@ Install ninja executable v1.7.2 into ``C:\ninja-1.7.2``.

* from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-ninja.ps1'))


Expand All @@ -126,7 +149,7 @@ Install NSIS 3.01 on the system.

* from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-nsis.ps1'))


Expand Down Expand Up @@ -186,13 +209,13 @@ Install Python 2.7 64-bit and update the PATH.

* from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-python-27-x64.ps1'))


This is equivalent to: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
$pythonVersion = "2.7"
$pythonArch = "64"
$pythonPrependPath = "1"
Expand All @@ -217,13 +240,13 @@ Install Python 3.6 64-bit and update the PATH.

* from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-python-36-x64.ps1'))


This is equivalent to: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
$pythonVersion = "3.6"
$pythonArch = "64"
$pythonPrependPath = "1"
Expand Down Expand Up @@ -251,7 +274,7 @@ Install `Slik SVN <https://sliksvn.com/download/>`_ 1.9.5 in the following direc

* from a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy Unrestricted -Force
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-svn.ps1'))


Expand Down
2 changes: 1 addition & 1 deletion scikit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test:
cwd=os.path.abspath("./windows")
)
for addon in ["cmake", "git", "miniconda3", "ninja", "nsis",
for addon in ["cmake", "git", "miniconda3", "flang", "ninja", "nsis",
"python", "python-36-x64", "python-27-x64", "svn"]:
exec_addon(".\install-%s.ps1" % addon)
Expand Down
11 changes: 11 additions & 0 deletions windows/install-flang.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
trap { Write-Error $_; Exit 1 }

$CONDA_ROOT="C:\Miniconda3"

if(!(Test-Path -Path $CONDA_ROOT )){
throw "Creating 'flang-env' environment and installing 'flang' requires $CONDA_ROOT"
}
$env:path = "$CONDA_ROOT;$CONDA_ROOT\Scripts;$env:path"
conda config --set show_channel_urls yes
conda config --prepend channels conda-forge
conda create -q -y -n flang-env flang

0 comments on commit 458aba0

Please sign in to comment.