Skip to content

Commit

Permalink
Merge branch 'simplify-windows-addon-install'
Browse files Browse the repository at this point in the history
* simplify-windows-addon-install:
  docs: Simplify instructions for installing windows add-ons
  • Loading branch information
jcfr committed Aug 20, 2018
2 parents 458aba0 + e855f62 commit 1366043
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 81 deletions.
4 changes: 2 additions & 2 deletions docs/addons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Add-ons
=======

Each category is named after a CI worker (e.g appveyor) or operating system (e.g Windows)
Each category is named after a CI worker (e.g AppVeyor) or operating system (e.g Windows)
and references add-ons designed to be used on the associated continuous integration service
or system.

Expand Down Expand Up @@ -54,7 +54,7 @@ Windows
-------

These scripts are designed to work on any windows workstation running Windows 7 and above and can
be directly used from either command line terminal or a powershell terminal using a simple one-liner.
be directly used from a powershell terminal (or command line terminal) using a simple one-liner.

Content of the scripts can easily be inspected in the `associated source repository <https://github.com/scikit-build/scikit-ci-addons/tree/master/windows>`_.

Expand Down
7 changes: 4 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ Welcome to scikit-ci-addons's documentation!
============================================

scikit-ci-addons is a command line tool and a set of scripts useful to help
drive the CI of projects leveraging services like Appveyor, CircleCI, or TravisCI.
drive the CI of projects leveraging services like `AppVeyor`_, `CircleCI`_, or `Travis CI`_.

Originally developed to help install prerequisites for building Python
extension, it is now useful to support other type of projects.

Contents:

.. toctree::
:maxdepth: 2
:caption: User guide
Expand Down Expand Up @@ -49,3 +47,6 @@ Resources
* Mailing list: https://groups.google.com/forum/#!forum/scikit-build


.. _AppVeyor: https://ci.appveyor.com
.. _CircleCI: https://circleci.com
.. _Travis CI: https://travis-ci.com
148 changes: 72 additions & 76 deletions docs/windows/install-scripts.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
For example, on a new system without python or git installed, the following can be done to
install them:

* 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-python-36-x64.ps1'))"
@powershell -ExecutionPolicy Unrestricted "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-git.ps1'))"


* or from a powershell terminal open as administrator: ::
For example, on a new system without python or git installed, they can be installed from a powershell terminal
open as administrator: ::

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

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 @@ -25,14 +19,11 @@ Details for each ``install-*.ps1`` scripts are reported below.

Install selected CMake version in ``C:\cmake-X.Y.Z``.

* from a windows command terminal open as administrator ::

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


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

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

$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 @@ -42,123 +33,114 @@ Install selected CMake version in ``C:\cmake-X.Y.Z``.
- setting ``$cmakeVersion`` to "X.Y.Z" before executing the script allows to select a specific CMake version.
- on AppVeyor, the download and install can be skipped by adding directory ``C:\cmake-X.Y.Z`` to the ``cache``. For more details, see https://www.appveyor.com/docs/build-cache/#configuring-cache-items

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

- to understand why ``SecurityProtocol`` is set, 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: ::
From a powershell terminal open as administrator: ::

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

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`
.. note::

- to understand why ``SecurityProtocol`` is set, see :ref:`addressing_underlying_connection_closed`

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

Install Git 2.11.0 (including Git Bash) on the system.

* 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-git.ps1'))"


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

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

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


.. note::

- Git executables are added to the ``PATH``

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

- to understand why ``SecurityProtocol`` is set, see :ref:`addressing_underlying_connection_closed`

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

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

* 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-miniconda3.ps1'))"


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

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

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


.. note::

- miniconda environment is **NOT** added to the ``PATH`` and registry.

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

- to understand why ``SecurityProtocol`` is set, see :ref:`addressing_underlying_connection_closed`

``install-ninja.ps1``
^^^^^^^^^^^^^^^^^^^^^

Install ninja executable v1.7.2 into ``C:\ninja-1.7.2``.

* 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-ninja.ps1'))"


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

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

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


.. note::

- ninja executable is **NOT** added to the ``PATH``

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

- to understand why ``SecurityProtocol`` is set, see :ref:`addressing_underlying_connection_closed`

``install-nsis.ps1``
^^^^^^^^^^^^^^^^^^^^

Install NSIS 3.01 on the system.

* 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-nsis.ps1'))"


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

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

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


.. note::

- nsis executable is added to the ``PATH``

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

- to understand why ``SecurityProtocol`` is set, see :ref:`addressing_underlying_connection_closed`

``install-python.ps1``
^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -190,32 +172,33 @@ in the following directories: ::
- setting ``$pythonPrependPath`` to 1 will add install and Scripts directories the PATH and .PY to PATHEXT. This
variable should be set only if ``$pythonVersion`` and ``$pythonArch`` are set. By default, the value is 0.

.. note::

- to understand why ``SecurityProtocol`` is set, see :ref:`addressing_underlying_connection_closed`

.. warning::
- The downloaded versions of python may **NOT** be the latest version including security patches.
If running in a production environment (e.g webserver), these versions should be built from source.

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


``install-python-27-x64.ps1``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Install Python 2.7 64-bit and update the PATH.

* 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-python-27-x64.ps1'))"


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

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

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 -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

$pythonVersion = "2.7"
$pythonArch = "64"
$pythonPrependPath = "1"
Expand All @@ -225,28 +208,29 @@ This is equivalent to: ::

- ``C:\Python27-x64`` and ``C:\Python27-x64\Scripts`` are prepended to the ``PATH``

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

- to understand why ``SecurityProtocol`` is set, see :ref:`addressing_underlying_connection_closed`


``install-python-36-x64.ps1``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Install Python 3.6 64-bit and update the PATH.

* 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-python-36-x64.ps1'))"


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

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

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 -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

$pythonVersion = "3.6"
$pythonArch = "64"
$pythonPrependPath = "1"
Expand All @@ -256,7 +240,9 @@ This is equivalent to: ::

- ``C:\Python36-x64`` and ``C:\Python36-x64\Scripts`` are prepended to the ``PATH``

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

- to understand why ``SecurityProtocol`` is set, see :ref:`addressing_underlying_connection_closed`


``install-svn.ps1``
Expand All @@ -267,22 +253,21 @@ Install `Slik SVN <https://sliksvn.com/download/>`_ 1.9.5 in the following direc
C:\SlikSvn


* 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-svn.ps1'))"


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

Set-ExecutionPolicy Unrestricted -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48

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


.. note::

- svn executable is added to the ``PATH``

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

- to understand why ``SecurityProtocol`` is set, see :ref:`addressing_underlying_connection_closed`


``install-utils.ps1``
Expand Down Expand Up @@ -336,10 +321,21 @@ provides convenience functions useful to download and install programs:
Extract zip file into `$destDir` only if `$destDir` does not exist.


Frequently Asked Questions
^^^^^^^^^^^^^^^^^^^^^^^^^^

Installing add-on from a Windows command line terminal
""""""""""""""""""""""""""""""""""""""""""""""""""""""

This can be using the following syntax::

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


.. _addressing_underlying_connection_closed:

Addressing "The underlying connection was closed" error
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"""""""""""""""""""""""""""""""""""""""""""""""""""""""

::

Expand Down

0 comments on commit 1366043

Please sign in to comment.