Skip to content

Commit c06879a

Browse files
committed
add wheelhouse
1 parent 1528b3e commit c06879a

File tree

3 files changed

+81
-35
lines changed

3 files changed

+81
-35
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ env:
1616
PYANSYS_OFF_SCREEN: True
1717
DOCKER_PACKAGE: docker.pkg.github.com/pyansys/pymapdl/mapdl
1818
DOCKER_IMAGE_VERSION_DOCS_BUILD: v21.2.1
19+
# Following env vars when changed will "reset" the mentioned cache,
20+
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...
21+
# You should go up in number, if you go down (or repeat a previous value)
22+
# you might end up reusing a previous cache if it haven't been deleted already.
23+
# It applies 7 days retention policy by default.
24+
RESET_PIP_CACHE: 0
25+
RESET_EXAMPLES_CACHE: 0
26+
RESET_DOC_BUILD_CACHE: 0
27+
RESET_AUTOSUMMARY_CACHE: 0
28+
PACKAGE_NAME: PyMAPDL
1929

2030
jobs:
2131

@@ -68,13 +78,33 @@ jobs:
6878
Python-${{ runner.os }}-${{ matrix.python-version }}
6979
7080
- name: Install PyMAPDL
71-
run: |
72-
pip install .
81+
run: pip install .
7382

7483
- name: Test import
7584
working-directory: tests
85+
run: python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report(gpu=False))"
86+
87+
- name: Retrieve PyMAPDL version
7688
run: |
77-
python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report(gpu=False))"
89+
echo "::set-output name=PYMAPDL_VERSION::$(python -c "from ansys.mapdl.core import __version__; print(__version__)")"
90+
echo "PyMAPDL version is: $(python -c "from ansys.mapdl.core import __version__; print(__version__)")"
91+
id: version
92+
93+
- name: Generate wheelhouse
94+
run: pip wheel . -w wheelhouse
95+
96+
- name: Zip wheelhouse
97+
uses: vimtor/action-zip@v1
98+
with:
99+
files: wheelhouse
100+
dest: ${{ env.PACKAGE_NAME }}-v${{ steps.version.outputs.PYMAPDL_VERSION }}-wheelhouse-${{ runner.os }}-${{ matrix.python-version }}.zip
101+
102+
- name: Upload Wheelhouse
103+
uses: actions/upload-artifact@v2
104+
with:
105+
name: ${{ env.PACKAGE_NAME }}-v${{ steps.version.outputs.PYMAPDL_VERSION }}-wheelhouse-${{ runner.os }}-${{ matrix.python-version }}
106+
path: '*.zip'
107+
retention-days: 7
78108

79109
docs_build:
80110
name: Build Documentation
@@ -306,7 +336,8 @@ jobs:
306336
./**/*.whl
307337
./**/*.tar.gz
308338
./**/*.pdf
309-
339+
./**/*.zip
340+
310341
- name: Notify if fail
311342
uses: skitionek/notify-microsoft-teams@master
312343
if: ${{ failure() }}
@@ -316,5 +347,5 @@ jobs:
316347
job: ${{ toJson(job) }}
317348
steps: ${{ toJson(steps) }}
318349
overwrite: "{
319-
title: `Release FAILED!`,
350+
title: `Release FAILED!`,
320351
}"

README.rst

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,34 @@ For a local "development" version, install with:
113113
pip install -e .
114114
115115
116+
Offline Installation
117+
~~~~~~~~~~~~~~~~~~~~
118+
If you lack an internet connection on your install machine, the recommended way
119+
of installing PyMAPDL is downloading the wheelhouse archive from the `Releases
120+
Page <https://github.com/pyansys/pymapdl/releases>`_ for your corresponding
121+
machine architecture.
122+
123+
Each wheelhouse archive contains all the python wheels necessary to install
124+
PyMAPDL from scratch on Windows and Linux for Python 3.7 and 3.9. You can install
125+
this on an isolated system with a fresh python or on a virtual environment.
126+
127+
For example, on Linux with Python 3.7, unzip it and install it with the following:
128+
129+
.. code::
130+
131+
unzip PyMAPDL-v0.62.dev1-wheelhouse-Linux-3.7.zip wheelhouse
132+
pip install ansys-mapdl-core -f wheelhouse --no-index --upgrade --ignore-installed
133+
134+
If you're on Windows with Python 3.9, unzip to a ``wheelhouse`` directory and
135+
install using the same command as above.
136+
137+
Consider installing using a `virtual environment
138+
<https://docs.python.org/3/library/venv.html>`_.
139+
140+
116141
Dependencies
117142
------------
118-
You will need a local licenced copy of ANSYS to run MAPDL prior and
143+
You will need a local licenced copy of Ansys to run MAPDL prior and
119144
including 2021R1. If you have the latest version of 2021R1 you do
120145
not need MAPDL installed locally and can connect to a remote instance
121146
via gRPC.

doc/source/getting_started/index.rst

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -59,50 +59,40 @@ after restarting the Python kernel.
5959

6060
Offline Installation
6161
~~~~~~~~~~~~~~~~~~~~
62-
If you would like to install ``ansys-mapdl-core`` on a computer
63-
without access to the internet, you can create a ``wheelhouse`` that
64-
contains all the dependencies necessary to install a python package
65-
without downloading each package individually.
62+
If you lack an internet connection on your install machine, the recommended way
63+
of installing PyMAPDL is downloading the wheelhouse archive from the `Releases
64+
Page <https://github.com/pyansys/pymapdl/releases>`_ for your corresponding
65+
machine architecture.
6666

67-
On the host connected to the internet, run:
67+
Each wheelhouse archive contains all the python wheels necessary to install
68+
PyMAPDL from scratch on Windows and Linux for Python 3.7 and 3.9. You can install
69+
this on an isolated system with a fresh python or on a virtual environment.
6870

69-
.. code::
70-
71-
pip install wheel
72-
python -m pip wheel --wheel-dir=pyansys_wheelhouse ansys-mapdl-core
73-
74-
This creates a new directory called ``pyansys_wheelhouse`` which
75-
contains every python package necessary to install
76-
``ansys-mapdl-core``.
77-
78-
Next, zip the ``pyansys_wheelhouse`` directory and upload it to your
79-
offline computer. On the offline computer, unzip it and then install
80-
it with:
71+
For example, on Linux with Python 3.7, unzip it and install it with the following:
8172

8273
.. code::
8374
84-
python -m pip install --no-index --find-links=pyansys_wheelhouse ansys-mapdl-core
85-
86-
This tells Python to install ``ansys-mapdl-core`` by only looking
87-
within the ``pyansys_wheelhouse`` directory.
75+
unzip PyMAPDL-v0.62.dev1-wheelhouse-Linux-3.7.zip wheelhouse
76+
pip install ansys-mapdl-core -f wheelhouse --no-index --upgrade --ignore-installed
8877
89-
.. note::
78+
If you're on Windows with Python 3.9, unzip to a ``wheelhouse`` directory and
79+
install using the same command as above.
9080

91-
The OS and version of Python used to generate the wheelhouse must
92-
match the offline machine.
81+
Consider installing using a `virtual environment
82+
<https://docs.python.org/3/library/venv.html>`_.
9383

9484

95-
ANSYS Software Requirements
85+
Ansys Software Requirements
9686
~~~~~~~~~~~~~~~~~~~~~~~~~~~
97-
For the latest features, you will need a copy of ANSYS 2021R1
98-
installed locally, but PyMAPDL is compatible with ANSYS 17.0 and newer
87+
For the latest features, you will need a copy of Ansys 2021R1
88+
installed locally, but PyMAPDL is compatible with Ansys 17.0 and newer
9989
on Windows and 13.0 on Linux.
10090

10191
.. note::
10292

103-
The latest versions of ANSYS provide signifiantly better support
93+
The latest versions of Ansys provide signifiantly better support
10494
and features. Certain features will not be supported by earlier
105-
versions of ANSYS (e.g. APDL Math).
95+
versions of Ansys (e.g. APDL Math).
10696

10797

10898
Verify Your Installation

0 commit comments

Comments
 (0)