Accepting request 1202477 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1202477
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-uv?expand=0&rev=2
This commit is contained in:
Ana Guerrero 2024-09-23 13:23:01 +00:00 committed by Git OBS Bridge
commit 41f0c3f338
6 changed files with 153 additions and 19 deletions

View File

@ -2,7 +2,7 @@
<services>
<service mode="manual" name="download_files" />
<service name="cargo_vendor" mode="manual">
<param name="src">uv*.tar.gz</param>
<param name="src">python-uv*.tar.gz</param>
<param name="compression">zst</param>
<param name="update">true</param>
</service>

3
python-uv-0.4.15.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fb9d134ccac8ce4088060705ccd5678d7825a22ca9951364efd5e7474d577602
size 2650314

View File

@ -1,3 +1,101 @@
-------------------------------------------------------------------
Sat Sep 21 16:47:28 UTC 2024 - Soc Virnyl Estela <obs@uncomfyhalomacro.pl>
- Update source tarball from upstream GitHub instead of Python hosted
* i received a version lesser than the actual in python hosted.
upstream is more clearer to get.
-------------------------------------------------------------------
Sat Sep 21 16:04:19 UTC 2024 - Soc Virnyl Estela <obs@uncomfyhalomacro.pl>
- Update to version 0.4.15:
* Revert "Treat invalid platform as more compatible than invalid Python"
* Add the execution policy to powershell installs for single versions
* Move uvx shell completion to `uvx --generate-shell-completion`
* Adjust messaging for frozen hint on resolution failure during `uv add`
* Provide resolution hints in case of possible local name conflicts
* Improve Docker image release tagging order and display on `ghcr.io`
* Improve deserialization error messages
* Allow system environments during project environment validity check
* Avoid validating workspace members when `--no-sources` is provided
* Fix handling of `sys.base_prefix` collision in interpreter identity check during tool installs
* Make `uv cache prune` robust to unreadable rkyv entries
* Revert "Remove duplicate warning for settings discovery errors"
* Fix `-` to `_` in packaged applications document
* Add `socks` support
* Avoid warning about bad Python interpreter links for empty project environment directories
* Improve invalid environment warning messages
* Use more verbose spelling of "virtualenv" during creation
* Do not use a user-facing warning for "Waiting to acquire lock..." message
* Use a single buffer for hints on resolver errors
* Allow Python pre-releases to be used if they are first on the `PATH`
* Avoid deleting the project environment directory if it is not a virtual environment
* Do not error if the `CACHEDIR.TAG` file exists but cannot be written to
* Treat invalid platform as more compatible than invalid Python
* Use portable paths when serializing sources
* Compute resolver hints using the final reduced derivation tree
* Bump the wheel and sdist cache versions
* Heal cache entries with missing source distributions
* Bump minimum supported Rust version from 1.80 -> 1.81
* Add `UV_LINK_MODE` to Docker caching example
* Clarify behavior of of overrides in CLI reference
* Allow users to provide pre-defined metadata for resolution
* Invalidate existing tool environments on Python interpreter mismatch
* Avoid fatal error when searching for egg-info with missing directory
* Add note on cache growth for self-hosted GitHub runners
* Add `--no-editable` support to `uv sync` and `uv export`
* Add support for `--only-dev` to `uv sync` and `uv export`
* Add support for remaining pip-supported file extensions
* Generate shell completion for `uvx`
* Include `uv export` command in `requirements.txt` output
* Prune unzipped source distributions in `uv cache prune --ci`
* Warn when trying to `uv sync` a package without build configuration
* Support requests for pre-releases in the `--python` option
* Avoid erroneous version warning for `.dist-info` directories
* Avoid removing seed packages for `uv venv --seed` environments
* Avoid unnecessary progress bar initializations
* Error when `tool.uv.sources` contains duplicate package names
* Include `--branch` et al when resolving unnamed URLs in `uv add`
* Include `dev-dependencies` in `--no-sources` invocations
* Include the parent interpreter in Python discovery when `--system` is used
* Respect `--no-sources` in PEP 723 scripts
* Respect `pyproject.toml` credentials from user-provided requirements
* Use consistent PyPI cache bucket
* Use unambiguous relative paths in `uv export`
* Add documentation on platform-specific dependencies
* Add documentation for passing installer options on Linux
* Separate project data from configuration settings
* Hint at missing `project.name`
* Surface dedicated `project.name` error for workspaces
* Remove duplicate warning for settings discovery errors
* Allow `uv tool upgrade --all` to continue on individual upgrade failure
* Support globs as cache keys in `tool.uv.cache-keys`
* Add Python package (`__main__.py`) support to `uv run`
* Add zip application support to `uv run`
* Add `--token` option to `self update` command
* Use `globwalk` for `cache-keys` matching
* Always treat archive-like requirements as local files
* Apply `--no-install` options when constructing resolution
* Avoid clobbering existing `py.typed` files contents in `uv init`
* Avoid enforcing platform compatibility when validating lockfile
* Avoid installing transitive dev dependencies
* Avoid selecting prerelease Python installations without opt-in
* Fix PPC64 page size in binary builds.
* Include pre-release Python versions in `uv python list`
* Make version ID optional for source builds
* Support relative paths in `uv add --script`
* Fix documentation typos for `uv build --build-constraint` flag
* Fix grammatical error in CLI docs
* Add dedicated lock errors for wheel-only distributions
* Avoid treating `.whl` sources as source distributions
* Clarify Python requirement source for script incompatibilities
-------------------------------------------------------------------
Fri Sep 13 11:11:48 UTC 2024 - Soc Virnyl Estela <obs@uncomfyhalomacro.pl>
- Attempt to use clang+mold for faster and less memory intensive linking
* fallback to ld and gcc if leap.
-------------------------------------------------------------------
Fri Sep 13 07:12:55 UTC 2024 - Adrian Schröter <adrian@suse.de>

View File

@ -20,26 +20,46 @@
%global force_gcc_version 13
%endif
%if 0%{?suse_version} > 1600
%bcond_without mold
%else
%bcond_with mold
%endif
%if %{with mold}
%global build_rustflags "-C" "linker=clang" "-C" "link-arg='-fuse-ld=/usr/bin/mold -Wl,-z,relro,-z,now'" "-C" "debuginfo=2" "-C" "incremental=false" "-C" "strip=none"
%endif
%bcond_without libalternatives
%{?sle15_python_module_pythons}
Name: python-uv
Version: 0.4.9
Version: 0.4.15
Release: 0
Summary: A Python package installer and resolver, written in Rust
License: Apache-2.0 OR MIT
URL: https://github.com/astral-sh/uv
Source0: https://files.pythonhosted.org/packages/source/u/uv/uv-%{version}.tar.gz
Source0: https://github.com/astral-sh/uv/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.zst
BuildRequires: %{python_module maturin}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module tomli}
BuildRequires: alts
BuildRequires: cargo >= 1.80
BuildRequires: cargo-packaging
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc%{?force_gcc_version}-c++
%if 0%{?suse_version} > 1600
BuildRequires: c++_compiler
BuildRequires: c_compiler
BuildRequires: clang
BuildRequires: mold
%else
BuildRequires: gcc13
BuildRequires: gcc13-c++
BuildRequires: libstdc++6-devel-gcc13
%endif
BuildRequires: cargo >= 1.80
BuildRequires: python-rpm-macros
BuildRequires: rust >= 1.80
BuildRequires: zstd
Obsoletes: uv < %{version}
Provides: uv = %{version}
@ -86,6 +106,10 @@ drop-in replacement for common pip and pip-tools workflows.
%autosetup -p1 -a1 -n uv-%{version}
%build
export CARGO_AUDITABLE="auditable"
export CARGO_INCREMENTAL=0
export CARGO_FEATURE_VENDORED=1
export RUSTFLAGS="%build_rustflags"
export CARGO_NET_OFFLINE=true
%ifarch %rust_tier1_arches
export CARGO_PROFILE_RELEASE_DEBUG=full
@ -101,12 +125,24 @@ export CXX="g++-%{?force_gcc_version}"
%pyproject_wheel
%install
export PATH="%{buildroot}%{_bindir}:${PATH}"
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
mkdir -p %{buildroot}%{_datadir}/fish/vendor_completions.d
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
export CARGO_AUDITABLE="auditable"
export CARGO_INCREMENTAL=0
export CARGO_FEATURE_VENDORED=1
export RUSTFLAGS="%build_rustflags"
export CARGO_NET_OFFLINE=true
%ifarch %rust_tier1_arches
export CARGO_PROFILE_RELEASE_DEBUG=full
%else
export CARGO_PROFILE_RELEASE_DEBUG=limited
%endif
%if 0%{?force_gcc_version}
export CC="gcc-%{?force_gcc_version}"
export CXX="g++-%{?force_gcc_version}"
%endif
export CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO=off
export CARGO_PROFILE_RELEASE_STRIP=false
%pyproject_install
@ -116,15 +152,12 @@ export CARGO_PROFILE_RELEASE_STRIP=false
%python_clone -a %{buildroot}%{_bindir}/uvx
%python_group_libalternatives uvx
export PATH="%{buildroot}%{_bindir}:${PATH}"
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
mkdir -p %{buildroot}%{_datadir}/fish/vendor_completions.d
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
%{python_expand # avoid whitespace when using this macro so putting random comment for that
uv-%{$python_bin_suffix} --generate-shell-completion bash > %{buildroot}%{_datadir}/bash-completion/completions/uv-%{$python_bin_suffix}
uv-%{$python_bin_suffix} --generate-shell-completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/uv-%{$python_bin_suffix}.fish
uv-%{$python_bin_suffix} --generate-shell-completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_uv-%{$python_bin_suffix}
}
%python_expand uv-%{$python_bin_suffix} --generate-shell-completion bash > %{buildroot}%{_datadir}/bash-completion/completions/uv-%{$python_bin_suffix}
%python_expand uv-%{$python_bin_suffix} --generate-shell-completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/uv-%{$python_bin_suffix}.fish
%python_expand uv-%{$python_bin_suffix} --generate-shell-completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_uv-%{$python_bin_suffix}
%python_expand uv-%{$python_bin_suffix} tool uvx --generate-shell-completion bash > %{buildroot}%{_datadir}/bash-completion/completions/uvx-%{$python_bin_suffix}
%python_expand uv-%{$python_bin_suffix} tool uvx --generate-shell-completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/uvx-%{$python_bin_suffix}.fish
%python_expand uv-%{$python_bin_suffix} tool uvx --generate-shell-completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_uvx-%{$python_bin_suffix}
%pre
%python_libalternatives_reset_alternative uv
@ -142,15 +175,18 @@ mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/uv-%{python_bin_suffix}
%{_datadir}/bash-completion/completions/uvx-%{python_bin_suffix}
%files %{python_files fish-completion}
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/uv-%{python_bin_suffix}.fish
%{_datadir}/fish/vendor_completions.d/uvx-%{python_bin_suffix}.fish
%files %{python_files zsh-completion}
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_uv-%{python_bin_suffix}
%{_datadir}/zsh/site-functions/_uvx-%{python_bin_suffix}
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:34bce9f4892130b01a7605d27bbeb71395e9b031d793123c250b79187ee307ca
size 1885994

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:921c58e967ef86e2dd8209b102c2c9a30b6e457728f4674b7d94a19088657ab8
size 52707117
oid sha256:cadf7a69ac317e4b44bc7fb55218b529972571065617e317ab81016aa302188c
size 55325641