Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions SPECS/python-anthropic/python-anthropic.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname anthropic

Name: python-%{srcname}
Version: 0.102.0
Release: %autorelease
Summary: Official Python library for the Anthropic API
License: MIT
URL: https://github.com/anthropics/anthropic-sdk-python
#!RemoteAsset: sha256:96f747cad11886c4ae12d4080131b94eebd68b202bd2190fe27959031bb1fa9c
Source0: https://files.pythonhosted.org/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildSystem: pyproject

BuildOption(install): -l %{srcname} -L
# anthropic.lib.tools.mcp imports the optional MCP integration, which is not a
# required runtime dependency of the core anthropic package.
BuildOption(check): -e anthropic.lib.tools.mcp

BuildRequires: pkgconfig(python3)
BuildRequires: pyproject-rpm-macros
BuildRequires: python3dist(anyio)
BuildRequires: python3dist(distro)
BuildRequires: python3dist(docstring-parser)
BuildRequires: python3dist(hatch-fancy-pypi-readme)
BuildRequires: python3dist(hatchling)
BuildRequires: python3dist(httpx)
BuildRequires: python3dist(jiter)
BuildRequires: python3dist(pip)
BuildRequires: python3dist(pydantic)
BuildRequires: python3dist(sniffio)
BuildRequires: python3dist(typing-extensions)

Provides: python3-%{srcname} = %{version}-%{release}
%python_provide python3-%{srcname}

%description
anthropic is the official Python SDK for accessing Anthropic APIs, with both
synchronous and asynchronous clients.

%prep -a
# Upstream pins the build backend to hatchling==1.26.3. The distro build uses
# the packaged hatchling, so relax this before dependencies are calculated.
sed -i 's/hatchling==1.26.3/hatchling>=1.26.3/' pyproject.toml

%files -f %{pyproject_files}
%doc README.md CHANGELOG.md
%license LICENSE

%changelog
%autochangelog
81 changes: 81 additions & 0 deletions SPECS/python-jiter/python-jiter.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname jiter

Name: python-%{srcname}
Version: 0.14.0
Release: %autorelease
Summary: Fast iterable JSON parser
License: MIT
URL: https://github.com/pydantic/jiter
#!RemoteAsset: sha256:e8a39e66dac7153cf3f964a12aad515afa8d74938ec5cc0018adcdae5367c79e
Source0: https://files.pythonhosted.org/packages/source/j/%{srcname}/%{srcname}-%{version}.tar.gz
BuildSystem: pyproject

BuildOption(install): %{srcname}

BuildRequires: cargo
BuildRequires: crate(ahash-0.8/default) >= 0.8.0
BuildRequires: crate(bitvec-1.0/default) >= 1.0.1
BuildRequires: crate(lexical-parse-float-1.0/format) >= 1.0.5
BuildRequires: crate(num-bigint-0.4/default) >= 0.4.4
BuildRequires: crate(num-traits-0.2/default) >= 0.2.16
BuildRequires: crate(pyo3-0.28/default) >= 0.28.2
BuildRequires: crate(pyo3-0.28/generate-import-lib) >= 0.28.2
BuildRequires: crate(pyo3-0.28/num-bigint) >= 0.28.2
BuildRequires: crate(pyo3-build-config-0.28/default) >= 0.28.2
BuildRequires: crate(smallvec-1.0/default) >= 1.11.0
BuildRequires: pkgconfig(python3)
BuildRequires: pyproject-rpm-macros
BuildRequires: python3dist(maturin)
BuildRequires: python3dist(pip)
BuildRequires: rust
BuildRequires: rust-rpm-macros

Provides: python3-%{srcname} = %{version}-%{release}
Provides: python3-%{srcname}%{?_isa} = %{version}-%{release}
%python_provide python3-%{srcname}

%description
jiter is a high-performance iterable JSON parser used by pydantic ecosystem
components.

%prep -a
mkdir -p ~/.cargo
cat > ~/.cargo/config.toml <<EOF
[source.crates-io]
replace-with = "system-registry"

[source.system-registry]
directory = "/usr/share/cargo/registry"
EOF

rm -f Cargo.lock
# Cargo metadata resolves dev/bench dependencies even though this package only
# builds the Python extension and runs import checks.
perl -0pi -e 's/\n\[dev-dependencies\].*?(?=\n\[\[test\]\]|\n\[\[bench\]\]|\n\[package\.metadata|\z)//s;
s/\n\[\[(?:test|bench)\]\].*?(?=\n\[\[(?:test|bench)\]\]|\n\[package\.metadata|\z)//gs' \
crates/jiter/Cargo.toml
cat >> crates/jiter/Cargo.toml <<'EOF'

[build-dependencies]
pyo3-build-config = { workspace = true, optional = true }
EOF
sed -e '/^[[:space:]]*\\(ahash\\|bitvec\\|lexical-parse-float\\|num-bigint\\|num-traits\\|smallvec\\)[[:space:]]*=/ s/version *= *"/version = ">=/' \
-e '/^[[:space:]]*\\(ahash\\|bitvec\\|lexical-parse-float\\|num-bigint\\|num-traits\\|smallvec\\)[[:space:]]*=/ s/= *"/= ">=/' \
-e '/\\bpyo3\\b/ s/version *= *"/version = ">=/' \
-i Cargo.toml crates/jiter/Cargo.toml crates/jiter-python/Cargo.toml

%generate_buildrequires
%pyproject_buildrequires

%files -f %{pyproject_files}
%doc README.md
%license LICENSE

%changelog
%autochangelog
84 changes: 84 additions & 0 deletions SPECS/python-libcst/python-libcst.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname libcst

Name: python-%{srcname}
Version: 1.8.6
Release: %autorelease
Summary: Concrete syntax tree with AST-like properties for Python
License: MIT AND PSF-2.0
URL: https://github.com/Instagram/LibCST
#!RemoteAsset: sha256:f729c37c9317126da9475bdd06a7208eb52fcbd180a6341648b45a56b4ba708b
Source0: https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz
BuildSystem: pyproject

BuildOption(install): -l %{srcname}
# libcst.tests* and libcst.codemod.tests* are upstream test modules, not runtime
# modules required by the installed library import check.
BuildOption(check): -e "libcst.tests*" -e "libcst.codemod.tests*"

BuildRequires: cargo
BuildRequires: crate(annotate-snippets-0.11/default) >= 0.11.5
BuildRequires: crate(memchr-2.0/default) >= 2.7.4
BuildRequires: crate(paste-1.0/default) >= 1.0.15
BuildRequires: crate(peg-0.8/default) >= 0.8.5
BuildRequires: crate(proc-macro2-1.0/default)
BuildRequires: crate(pyo3-0.26/default) >= 0.26.0
BuildRequires: crate(pyo3-0.26/extension-module) >= 0.26.0
BuildRequires: crate(quote-1.0/default)
BuildRequires: crate(regex-1.0/default) >= 1.11.2
BuildRequires: crate(syn-2.0/default)
BuildRequires: crate(thiserror-2.0/default) >= 2.0.12
BuildRequires: pkgconfig(python3)
BuildRequires: pyproject-rpm-macros
BuildRequires: python3dist(pip)
BuildRequires: python3dist(pyyaml-ft) >= 8
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(setuptools-rust)
BuildRequires: python3dist(setuptools-scm)
BuildRequires: python3dist(wheel)
BuildRequires: rust
BuildRequires: rust-rpm-macros

Provides: python3-%{srcname} = %{version}-%{release}
Provides: python3-%{srcname}%{?_isa} = %{version}-%{release}
%python_provide python3-%{srcname}

%description
LibCST provides a concrete syntax tree for Python source code with AST-like
properties and codemod tooling.

%prep -a
mkdir -p ~/.cargo
cat > ~/.cargo/config.toml <<EOF
[source.crates-io]
replace-with = "system-registry"

[source.system-registry]
directory = "/usr/share/cargo/registry"
EOF

rm -f native/Cargo.lock
# setuptools-rust invokes cargo metadata, which resolves dev/bench
# dependencies even though this package only builds the extension module.
perl -0pi -e 's/\n\[dev-dependencies\].*?(?=\n\[\[bench\]\]|\n\[package\.metadata|\z)//s;
s/\n\[\[bench\]\].*?(?=\n\[\[bench\]\]|\n\[package\.metadata|\z)//gs' \
native/libcst/Cargo.toml
perl -0pi -e 's/\n\[dev-dependencies\].*?\z//s' native/libcst_derive/Cargo.toml
sed -e '/^[[:space:]]*\\(annotate-snippets\\|memchr\\|paste\\|peg\\|regex\\|thiserror\\)[[:space:]]*=/ s/= *"/= ">=/' \
-e '/\\bpyo3\\b/ s/version *= *"/version = ">=/' \
-e '/^[[:space:]]*\\(quote\\|syn\\)[[:space:]]*=/ s/= *"/= ">=/' \
-i native/libcst/Cargo.toml native/libcst_derive/Cargo.toml

%generate_buildrequires
%pyproject_buildrequires

%files -f %{pyproject_files}
%doc README.rst CHANGELOG.md CODE_OF_CONDUCT.md
%license LICENSE

%changelog
%autochangelog
48 changes: 48 additions & 0 deletions SPECS/python-referencing/python-referencing.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname referencing

Name: python-%{srcname}
Version: 0.37.0
Release: %autorelease
Summary: JSON Referencing + Python
License: MIT
URL: https://github.com/python-jsonschema/referencing
#!RemoteAsset: sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8
Source0: https://files.pythonhosted.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildSystem: pyproject

BuildOption(install): -l %{srcname}
# referencing.tests* is the upstream test suite; keep the import check focused
# on the installed runtime module.
BuildOption(check): -e referencing.tests*

BuildRequires: pkgconfig(python3)
BuildRequires: pyproject-rpm-macros
BuildRequires: python3dist(attrs)
BuildRequires: python3dist(hatch-vcs)
BuildRequires: python3dist(hatchling)
BuildRequires: python3dist(pip)
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(rpds-py) >= 0.7.0
BuildRequires: python3dist(typing-extensions)

Provides: python3-%{srcname} = %{version}-%{release}
%python_provide python3-%{srcname}

%description
referencing provides Python tools for working with JSON references.

%generate_buildrequires
%pyproject_buildrequires

%files -f %{pyproject_files}
%doc README.rst CHANGELOG.rst
%license COPYING

%changelog
%autochangelog
64 changes: 64 additions & 0 deletions SPECS/python-rpds-py/python-rpds-py.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname rpds-py
%global pypi_name rpds_py

Name: python-%{srcname}
Version: 0.30.0
Release: %autorelease
Summary: Python bindings to Rust's persistent data structures
License: MIT
URL: https://github.com/crate-py/rpds
#!RemoteAsset: sha256:dd8ff7cf90014af0c0f787eea34794ebf6415242ee1d6fa91eaba725cc441e84
Source0: https://files.pythonhosted.org/packages/source/r/%{srcname}/%{pypi_name}-%{version}.tar.gz
BuildSystem: pyproject

BuildOption(install): rpds

BuildRequires: cargo
BuildRequires: crate(archery-1.0/default) >= 1.2.2
BuildRequires: crate(pyo3-0.27/default) >= 0.27.2
BuildRequires: crate(pyo3-0.27/extension-module) >= 0.27.2
BuildRequires: crate(pyo3-0.27/generate-import-lib) >= 0.27.2
BuildRequires: crate(rpds-1.0/default) >= 1.2.0
BuildRequires: pkgconfig(python3)
BuildRequires: pyproject-rpm-macros
BuildRequires: python3dist(maturin)
BuildRequires: python3dist(pip)
BuildRequires: rust
BuildRequires: rust-rpm-macros

Provides: python3-%{srcname} = %{version}-%{release}
Provides: python3-%{srcname}%{?_isa} = %{version}-%{release}
%python_provide python3-%{srcname}

%description
rpds-py provides Python bindings to Rust's persistent data structures.

%prep -a
mkdir -p ~/.cargo
cat > ~/.cargo/config.toml <<EOF
[source.crates-io]
replace-with = "system-registry"

[source.system-registry]
directory = "/usr/share/cargo/registry"
EOF

rm -f Cargo.lock
sed -e '/^[[:space:]]*\\(rpds\\|archery\\)[[:space:]]*=/ s/= *"/= ">=/' \
-e '/\\bpyo3\\b/ s/version *= *"/version = ">=/' \
-i Cargo.toml

%generate_buildrequires
%pyproject_buildrequires

%files -f %{pyproject_files}
%doc README.rst
%license LICENSE

%changelog
%autochangelog
12 changes: 6 additions & 6 deletions SPECS/rust-archery-1.0/rust-archery.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
# SPDX-License-Identifier: MulanPSL-2.0

%global crate_name archery
%global full_version 1.2.0
%global full_version 1.2.2
%global pkgname archery-1.0

Name: rust-archery-1.0
Version: 1.2.0
Version: 1.2.2
Release: %autorelease
Summary: Rust crate "archery"
License: MPL-2.0
URL: https://github.com/orium/archery
#!RemoteAsset: sha256:8967cd1cc9e9e1954f644e14fbd6042fe9a37da96c52a67e44a2ac18261f8561
#!RemoteAsset: sha256:70e0a5f99dfebb87bb342d0f53bb92c81842e100bbb915223e38349580e5441d
Source: https://crates.io/api/v1/crates/%{crate_name}/%{full_version}/download#/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildSystem: rustcrates

BuildRequires: rust-rpm-macros

Requires: crate(static-assertions-1.0/default) >= 1.1.0
Provides: crate(archery) = %{version}
Provides: crate(%{pkgname})
Provides: crate(%{pkgname}/default)
Provides: crate(%{pkgname}/fatal-warnings)
Expand All @@ -32,7 +32,7 @@ Source code for takopackized Rust crate "archery"
%package -n %{name}+serde
Summary: Abstract over the atomicity of reference-counting pointers - feature "serde"
Requires: crate(%{pkgname})
Requires: crate(serde-1.0) >= 1.0.197
Requires: crate(serde-1.0) >= 1.0.228
Provides: crate(%{pkgname}/serde)

%description -n %{name}+serde
Expand All @@ -41,7 +41,7 @@ This metapackage enables feature "serde" for the Rust archery crate, by pulling
%package -n %{name}+triomphe
Summary: Abstract over the atomicity of reference-counting pointers - feature "triomphe"
Requires: crate(%{pkgname})
Requires: crate(triomphe-0.1) >= 0.1.9
Requires: crate(triomphe-0.1) >= 0.1.15
Provides: crate(%{pkgname}/triomphe)

%description -n %{name}+triomphe
Expand Down
Loading