Skip to content

Commit

Permalink
move GitHub release install to CONTRIBUTING
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlancaster committed Feb 19, 2024
1 parent c9abd0e commit 7f280c8
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 51 deletions.
57 changes: 57 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,63 @@ from scratch, run the ``clean`` command:
./setup clean --all
Install package from GitHub Releases
====================================
Packages that are released to PyPI, are also available via the
releases on the GitHub release page:
https://github.com/alexlancaster/pypop/releases
.. warning::
We recommend installing binary packages using the main PyPI
repository, **not** via the GitHub release packages. However from
time to time, we also sometimes make binary packages that are not
necessarily also released via PyPI. In addition, if PyPI is
unavailable, you may want to install directly from the GitHub
release. These instructions will help you do that.
Installing these packages is similar to installing via PyPI above,
except that you need to explicitly provide a URL to the release page.
1. First, visit the release page, and choose the release version you
wish to install (usually the most recent), and note the release tag
(e.g. ``v1.0.0``).
.. admonition:: Release version numbers
Note that version of the release is slightly different to the
``git`` tag. This is because the ``git`` tag follows `Semantic
Versioning <https://semver.org/>`__, which Python internally
normalizes and abbreviates. So the release with the ``git`` tag
``v1.0.0`` is actually version ``1.0.0`` of the |pkgname|
package, and the version that ``pip`` "sees" (the difference is
more notable with prereleases which might have a ``git`` tag of
``v1.0.0-rc2`` but the PyPI version will be ``1.0.0rc2``).
2. Next, use ``pip`` to install the package by running a command of
the form (this will select and install the correct wheel for your
Python version and operating system automatically):
.. code-block:: shell
pip install pypop-genomics -f https://github.com/alexlancaster/pypop/releases/expanded_assets/<TAG_NAME>
where *<TAG_NAME>* is replaced with a specific tag, e.g. for the example given above, you would run:
.. code-block:: shell
pip install pypop-genomics -f https://github.com/alexlancaster/pypop/releases/expanded_assets/v1.0.0
You can also manually download the specific wheel from the github
release webpage and install directly, e.g.:
.. code-block:: shell
pip install pypop_genomics-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Making a documentation or website contribution
==============================================
Expand Down
55 changes: 4 additions & 51 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ used, by appending the following:
--extra-index-url https://test.pypi.org/simple/
to the above ``pip`` commands.


**Issues with installation permission**

Expand Down Expand Up @@ -279,53 +278,6 @@ install into the expected user directory.
then you should **not** add the ``--user`` because it will install
it in ``~/.local/lib/`` rather than under the user-specific conda
virtual environment in ``~/.conda/envs/``.

Install package from GitHub Releases (advanced)
-----------------------------------------------

We also sometimes make binary packages also available from the GitHub
release page:

https://github.com/alexlancaster/pypop/releases

To install these is similar to installing via PyPI above, except that
you need to explicitly provide a URL to the release page.

1. First, visit the release page, and choose the release version you
wish to install (usually the most recent), and note the release tag
(e.g. ``v1.0.0``).

.. admonition:: Release version numbers

Note that version of the release is slightly different to the
``git`` tag. This is because the ``git`` tag follows `Semantic
Versioning <https://semver.org/>`__, which Python internally
normalizes and abbreviates. So the release with the ``git`` tag
``v1.0.0`` is actually version ``1.0.0`` of the |pkgname|
package, and the version that ``pip`` "sees" (the difference is
more notable with prereleases which might have a ``git`` tag of
``v1.0.0-rc2`` but the PyPI version will be ``1.0.0rc2``).

2. Next, use ``pip`` to install the package by running a command of
the form (this will select and install the correct wheel for your
Python version and operating system automatically):

.. code-block:: shell
pip install pypop-genomics -f https://github.com/alexlancaster/pypop/releases/expanded_assets/<TAG_NAME>
where *<TAG_NAME>* is replaced with a specific tag, e.g. for the example given above, you would run:

.. code-block:: shell
pip install pypop-genomics -f https://github.com/alexlancaster/pypop/releases/expanded_assets/v1.0.0
You can also manually download the specific wheel from the github
release webpage and install directly, e.g.:

.. code-block:: shell
pip install pypop_genomics-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Post-install ``PATH`` adjustments
---------------------------------
Expand Down Expand Up @@ -384,9 +336,10 @@ For a detailed description on bug reporting as well as how to
contribute to PyPop, please consult our `CONTRIBUTING.rst
<https://github.com/alexlancaster/pypop/blob/main/CONTRIBUTING.rst>`_
guide. For reporting security vulnerabilities visit `SECURITY.md
<https://github.com/alexlancaster/pypop/blob/main/SECURITY.md>`__ We
also have additional notes and background relevant for developers in
`DEV_NOTES.md
<https://github.com/alexlancaster/pypop/blob/main/SECURITY.md>`__.

We also have additional notes and background relevant for developers
in `DEV_NOTES.md
<https://github.com/alexlancaster/pypop/blob/main/DEV_NOTES.md>`__. Source
for the website and the documentation is located in the `website
<https://github.com/alexlancaster/pypop/blob/main/website>`__
Expand Down

0 comments on commit 7f280c8

Please sign in to comment.