14
0
forked from pool/python-libcst

Accepting request 1153705 from home:uncomfyhalomacro:branches:devel:languages:python

- Update to version 1.2.0
  * Upgrade pyo3 to 0.20
  * Remove reference to distutil
  * Add roundtrip tests from Python
  * Fix parsing list matchers without explicit brackets
  * Make readme example use python syntax highlighting
  * Upgrade rust to version 1.70 in readthedocs config
  * Update maturin requirement from <0.16,>=0.8.3 to >=0.8.3,<1.5
  * Allow `Element::codegen` to be used by external users
  * installing rustc/cargo for mybinder demo
  * Update test_fix_pyre_directives.py
  * remove 3.8 support
  * Update syn to v2
  * Set repository metadata entry for Rust crates
  * upgrade flake8
  * Update pyproject.toml for Python 3.12 support
  * fix filepathprovider generic type
  * Update README.rst
  * Fix link in type_inference_provider.py
  * Parse multiline expressions in f-strings
  * Upgrade pyre
  * eliminate relative paths from Cargo.toml
  * Parse arbitrarily nested f-strings
  * ScopeProvider: Record Access for Attributes and Decorators
  * AddImportsVisitor: add imports before the first non-import statement
  * Scope provider changes for type annotations
  * add upper bound to pyo3 dependency
  * scope_provider: Simplify parent resolution
  * parser: remove Regexes from whitespace parser
  * Add crate metadata

OBS-URL: https://build.opensuse.org/request/show/1153705
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libcst?expand=0&rev=25
This commit is contained in:
2024-03-01 20:28:12 +00:00
committed by Git OBS Bridge
parent c6021cccd5
commit e696634f39
10 changed files with 99 additions and 92 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file
# spec file for package python-libcst
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -29,19 +29,13 @@
%define modname libcst
%{?sle15_python_module_pythons}
Name: python-libcst%{psuffix}
Version: 0.4.9
Version: 1.2.0
Release: 0
Summary: Python 3.5+ concrete syntax tree with AST-like properties
License: MIT
URL: https://github.com/Instagram/LibCST
Source0: https://files.pythonhosted.org/packages/source/l/%{modname}/%{modname}-%{version}.tar.gz
Source1: vendor.tar.xz
Source2: cargo_config
# PATCH-FIX-OPENSUSE remove-ufmt-dep.patch python-ufmt package doesn't exists in Tumbleweed
Patch0: remove-ufmt-dep.patch
# PATCH-FIX-OPENSUSE replace-python-call.patch
# wrong executable call when outside of venv (gh#Instagram/LibCST#468)
Patch1: replace-python-call.patch
Source1: vendor.tar.zst
BuildRequires: %{python_module setuptools-rust}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
@@ -50,7 +44,7 @@ BuildRequires: cargo
BuildRequires: cargo-packaging
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: rust
BuildRequires: zstd
Requires: python-PyYAML >= 5.2
Requires: python-typing-inspect >= 0.4.0
Requires: python-typing_extensions >= 3.7.4.2
@@ -71,17 +65,7 @@ BuildRequires: %{python_module typing_extensions >= 3.7.4.2}
A concrete syntax tree with AST-like properties for Python 3.5+ programs.
%prep
%setup -q -n libcst-%{version}
tar x -C native/ -f %{SOURCE1}
cp -rf native/vendor vendor
mkdir -p .cargo && echo "" >> .cargo/config.toml && cat %{SOURCE2} >>.cargo/config.toml
pushd native
mkdir -p .cargo
cat %{SOURCE2} >>.cargo/config.toml
popd
%autopatch -p1
%autosetup -a1 -n libcst-%{version} -p1
# Depends on optional pyre
rm \