diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 965bfa2f84ef..984eaad41f36 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -29,18 +29,11 @@ jobs: - run: brew upgrade - run: brew list --versions - run: brew deps --tree --installed - - name: Fix Python - # Workaround for https://github.com/actions/setup-python/issues/577 - run: | - brew uninstall --ignore-dependencies python@3.11 - brew uninstall --ignore-dependencies python@3.13 - brew unlink python@3.12 - rm -f /usr/local/bin/{2to3,idle3,pydoc3,python3,python3-config} - brew link --overwrite python@3.12 - name: Install brew dependencies run: | - brew install pango cairo gobject-introspection glib libyaml pkg-config zstd xxhash libxmlsec1 + brew install pango cairo gobject-introspection glib libyaml pkg-config zstd xxhash libxmlsec1 uv - name: Install Weblate run: | - python3 -m venv .venv - .venv/bin/pip3 install -e .[all,test] + uv venv --python python3.12 .venv + . .venv/bin/activate + uv pip install -e .[all,test] diff --git a/docs/admin/auth.rst b/docs/admin/auth.rst index 5a2f89b82f0d..6b0d41afae53 100644 --- a/docs/admin/auth.rst +++ b/docs/admin/auth.rst @@ -570,7 +570,7 @@ can install it via usual means: .. code-block:: sh # Using PyPI - pip install 'django-auth-ldap>=1.3.0' + uv pip install 'django-auth-ldap>=1.3.0' # Using apt-get apt-get install python-django-auth-ldap @@ -704,7 +704,7 @@ To install `django-cas-ng`: .. code-block:: sh - pip install django-cas-ng + uv pip install django-cas-ng Once you have the package installed you can hook it up to the Django authentication system by modifying the :file:`settings.py` file: diff --git a/docs/admin/install.rst b/docs/admin/install.rst index 741ae3a8c973..87284409f74c 100644 --- a/docs/admin/install.rst +++ b/docs/admin/install.rst @@ -268,19 +268,19 @@ When installing using pip, you can directly specify desired features when instal .. code-block:: sh - pip install "Weblate[Postgres,Amazon,SAML]" + uv pip install "Weblate[Postgres,Amazon,SAML]" Or you can install Weblate with all optional features: .. code-block:: sh - pip install "Weblate[all]" + uv pip install "Weblate[all]" Or you can install Weblate without any optional features: .. code-block:: sh - pip install Weblate + uv pip install Weblate Other system requirements +++++++++++++++++++++++++ diff --git a/docs/admin/install/source.rst b/docs/admin/install/source.rst index 69e2ac128500..80ace1d0523d 100644 --- a/docs/admin/install/source.rst +++ b/docs/admin/install/source.rst @@ -23,9 +23,9 @@ Installing from sources .. code-block:: sh . ~/weblate-env/bin/activate - pip install -e 'weblate-src[all]' + uv pip install -e 'weblate-src[all]' # In case you intentd to run testsuite, install test deps as well: - pip install -e 'weblate-src[all,test]' + uv pip install -e 'weblate-src[all,test]' #. Copy :file:`weblate/settings_example.py` to :file:`weblate/settings.py`. diff --git a/docs/admin/install/steps/install-python.rst b/docs/admin/install/steps/install-python.rst index 8c86037f7b0d..1af3722917c3 100644 --- a/docs/admin/install/steps/install-python.rst +++ b/docs/admin/install/steps/install-python.rst @@ -11,7 +11,7 @@ Python modules .. code-block:: sh - virtualenv ~/weblate-env + uv venv ~/weblate-env #. Activate the virtualenv for Weblate: @@ -24,7 +24,7 @@ Python modules .. code-block:: sh # Install Weblate with all optional dependencies - pip install "Weblate[all]" + uv pip install "Weblate[all]" Please check :ref:`python-deps` for fine-tuning of optional dependencies. @@ -42,4 +42,4 @@ Python modules .. code-block:: sh - pip install --force-reinstall --no-binary :all: cffi + uv pip install --force-reinstall --no-binary :all: cffi diff --git a/docs/admin/install/steps/install-uv.rst b/docs/admin/install/steps/install-uv.rst new file mode 100644 index 000000000000..83909c82ee7a --- /dev/null +++ b/docs/admin/install/steps/install-uv.rst @@ -0,0 +1,15 @@ +uv package manager +++++++++++++++++++ + +.. hint:: + + We're using uv package manager to install Weblate. + + +.. code-block:: sh + + curl -LsSf https://astral.sh/uv/install.sh | sh + +.. seealso:: + + `Installing uv `_ diff --git a/docs/admin/install/venv-debian.rst b/docs/admin/install/venv-debian.rst index f805354ef4f8..5c14292ca9bb 100644 --- a/docs/admin/install/venv-debian.rst +++ b/docs/admin/install/venv-debian.rst @@ -11,7 +11,7 @@ Installing on Debian and Ubuntu libxml2-dev libxslt-dev libfreetype6-dev libjpeg-dev libz-dev libyaml-dev \ libffi-dev libcairo-dev gir1.2-pango-1.0 gir1.2-rsvg-2.0 libgirepository1.0-dev \ libacl1-dev liblz4-dev libzstd-dev libxxhash-dev libssl-dev libpq-dev libjpeg-dev build-essential \ - python3-gdbm python3-dev python3-pip python3-virtualenv virtualenv git + python3-gdbm python3-dev git .. include:: steps/install-system-optional.rst @@ -43,6 +43,7 @@ Installing on Debian and Ubuntu # Gettext for the msgmerge add-on apt install -y gettext +.. include:: steps/install-uv.rst .. include:: steps/install-python.rst diff --git a/docs/admin/install/venv-macos.rst b/docs/admin/install/venv-macos.rst index 5fa9f8dc660c..0667e4c130ea 100644 --- a/docs/admin/install/venv-macos.rst +++ b/docs/admin/install/venv-macos.rst @@ -7,8 +7,7 @@ Installing on macOS .. code-block:: sh - brew install python pango cairo gobject-introspection glib libyaml pkg-config zstd lz4 xxhash libxmlsec1 - pip install virtualenv + brew install python pango cairo gobject-introspection glib libyaml pkg-config zstd lz4 xxhash libxmlsec1 uv .. include:: steps/install-system-server.rst diff --git a/docs/admin/install/venv-redhat.rst b/docs/admin/install/venv-redhat.rst index 84768f8ddbea..bad03b2d2e5a 100644 --- a/docs/admin/install/venv-redhat.rst +++ b/docs/admin/install/venv-redhat.rst @@ -10,7 +10,7 @@ Installing on RedHat, Fedora and CentOS dnf install \ libxslt-devel libxml2-devel freetype-devel libjpeg-devel zlib-devel \ libyaml-devel libffi-devel cairo-devel cairo-gobject-devel pango-devel \ - gobject-introspection-devel libacl-devel lz4-devel libzstd-devel xxhash-devel python3-pip python3-virtualenv \ + gobject-introspection-devel libacl-devel lz4-devel libzstd-devel xxhash-devel \ libtool-ltdl-devel python3-devel git .. include:: steps/install-system-optional.rst @@ -43,6 +43,8 @@ Installing on RedHat, Fedora and CentOS # Gettext for the msgmerge add-on dnf install gettext +.. include:: steps/install-uv.rst + .. include:: steps/install-python.rst .. include:: steps/install-configure.rst diff --git a/docs/admin/install/venv-suse.rst b/docs/admin/install/venv-suse.rst index 3a632b896a0b..4b6b7433ee57 100644 --- a/docs/admin/install/venv-suse.rst +++ b/docs/admin/install/venv-suse.rst @@ -10,7 +10,7 @@ Installing on SUSE and openSUSE zypper install \ libxslt-devel libxml2-devel freetype-devel libjpeg-devel zlib-devel \ libyaml-devel libffi-devel cairo-devel pango-devel \ - gobject-introspection-devel libacl-devel liblz4-devel libzstd-devel libxxhash-devel python3-pip python3-virtualenv \ + gobject-introspection-devel libacl-devel liblz4-devel libzstd-devel libxxhash-devel \ python3-devel git .. include:: steps/install-system-optional.rst @@ -42,6 +42,8 @@ Installing on SUSE and openSUSE # Gettext for the msgmerge add-on zypper install gettext +.. include:: steps/install-uv.rst + .. include:: steps/install-python.rst .. include:: steps/install-configure.rst diff --git a/docs/admin/upgrade.rst b/docs/admin/upgrade.rst index 45fc95f013ad..7fafb6d60506 100644 --- a/docs/admin/upgrade.rst +++ b/docs/admin/upgrade.rst @@ -42,19 +42,19 @@ releases should work, but is not as well tested as single version upgrades! .. code-block:: sh - pip install -U "Weblate[all]==version" + uv pip install -U "Weblate[all]==version" Or, if you just want to get the latest released version: .. code-block:: sh - pip install -U "Weblate[all]" + uv pip install -U "Weblate[all]" If you don't want to install all of the optional dependencies do: .. code-block:: sh - pip install -U Weblate + uv pip install -U Weblate Using Git checkout, you need to fetch new source code and update your installation: @@ -63,11 +63,11 @@ releases should work, but is not as well tested as single version upgrades! cd weblate-src git pull # Update Weblate inside your virtualenv - . ~/weblate-env/bin/pip install -e '.[all]' + . ~/weblate-env/bin/uv pip install -e '.[all]' # Install dependencies directly when not using virtualenv - pip install --upgrade -e . + uv pip install --upgrade -e . # Install optional dependencies directly when not using virtualenv - pip install --upgrade -e '.[all]' + uv pip install --upgrade -e '.[all]' #. New Weblate releases might have new :ref:`python-deps`, check if they cover the features you want. diff --git a/docs/contributing/modules.rst b/docs/contributing/modules.rst index 981f134182bf..42489a74d5c8 100644 --- a/docs/contributing/modules.rst +++ b/docs/contributing/modules.rst @@ -21,7 +21,7 @@ The tests are executed using :program:`py.test`. First you need to install test .. code-block:: sh - pip install -e '.[test,lint]' + uv pip install -e '.[dev]' You can then execute the testsuite in the repository checkout: diff --git a/docs/contributing/start.rst b/docs/contributing/start.rst index 1b1b868a91dd..fbfe9b9f3600 100644 --- a/docs/contributing/start.rst +++ b/docs/contributing/start.rst @@ -38,7 +38,7 @@ sources. .. code-block:: sh - pip install -e '.[all,dev,ci,test,mypy,lint]' + uv pip install -e '.[dev]' 3. Start a development server: