1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
Installing semver
=================
Release Policy
--------------
As semver uses `Semantic Versioning`_, breaking changes are only introduced in major
releases (incremented ``X`` in "X.Y.Z").
Refer to section :ref:`version-policy` for a general overview.
For users who want or need to stay with major 3 releases only, add the
following version restriction (:file:`setup.py`, :file:`requirements.txt`,
or :file:`pyproject.toml`)::
semver>=3,<4
This line avoids surprises. You will get any updates within the major 3 release like 3.1.x and above. However, you will never get an update for semver 4.0.0.
For users who have to stay with major 2 releases only, use the following line::
semver>=2,<3
Pip
---
.. code-block:: bash
pip3 install semver
If you want to install this specific version (for example, 3.0.0), use the command :command:`pip`
with an URL and its version:
.. parsed-literal::
pip3 install git+https://github.com/python-semver/python-semver.git@3.0.0
Linux Distributions
-------------------
.. note::
Some Linux distributions can have outdated packages.
These outdated packages does not contain the latest bug fixes or new features.
If you need a newer package, you have these option:
* Ask the maintainer to update the package.
* Update the package for your favorite distribution and submit it.
* Use a Python virtual environment and :command:`pip install`.
Arch Linux
^^^^^^^^^^
1. Enable the community repositories first:
.. code-block:: ini
[community]
Include = /etc/pacman.d/mirrorlist
2. Install the package::
$ pacman -Sy python-semver
Debian
^^^^^^
1. Update the package index::
$ sudo apt-get update
2. Install the package::
$ sudo apt-get install python3-semver
Fedora
^^^^^^
.. code-block:: bash
$ dnf install python3-semver
FreeBSD
^^^^^^^
.. code-block:: bash
$ pkg install py36-semver
openSUSE
^^^^^^^^
1. Enable the ``devel:languages:python`` repository of the Open Build Service::
$ sudo zypper addrepo --refresh obs://devel:languages:python devel_languages_python
2. Install the package::
$ sudo zypper install --repo devel_languages_python python3-semver
Ubuntu
^^^^^^
1. Update the package index::
$ sudo apt-get update
2. Install the package::
$ sudo apt-get install python3-semver
.. _semantic versioning: https://semver.org/
|