1 Star 0 Fork 5

大漠行舟/python-libcst

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-libcst.spec 4.12 KB
一键复制 编辑 原始数据 按行查看 历史
大漠行舟 提交于 2025-05-14 14:44 +08:00 . Update to version 1.7.0
%bcond_with docs
%bcond_with tests
%global _empty_manifest_terminate_build 0
%global pypi_name libcst
%global common_description %{expand:
LibCST parses Python source code as a CST tree that keeps all formatting
details (comments, whitespaces, parentheses, etc). It's useful for building
automated refactoring (codemod) applications and linters.
LibCST creates a compromise between an Abstract Syntax Tree (AST) and a
traditional Concrete Syntax Tree (CST). By carefully reorganizing and naming
node types and fields, it creates a lossless CST that looks and feels like an
AST.}
Name: python-%{pypi_name}
Version: 1.7.0
Release: 1
Summary: A concrete syntax tree with AST-like properties for Python 3
License: MIT and (MIT and Python) and ASL 2.0
URL: https://github.com/Instagram/LibCST
Source0: %{pypi_source %{pypi_name}}
Source1: cargo-vendor-cache
Patch1: 0001-set-cargo-vendor-cache-for-local-build.patch
BuildRequires: rust-packaging
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(setuptools-scm)
BuildRequires: python3dist(setuptools-rust)
%if %{with tests}
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pyyaml) >= 5.2
BuildRequires: python3dist(hypothesis)
BuildRequires: python3dist(hypothesmith)
%endif
BuildRequires: python3dist(typing-inspect) >= 0.4
%if %{with docs}
BuildRequires: graphviz
BuildRequires: sed
BuildRequires: python3-docs
BuildRequires: python3-metakernel-python
BuildRequires: python3dist(sphinx)
BuildRequires: python3dist(nbsphinx) >= 0.4.2
BuildRequires: python3dist(sphinx-rtd-theme) >= 0.4.3
%endif
%description
%{common_description}
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name}
%{common_description}
%if %{with docs}
%package doc
Summary: %{name} documentation
Requires: python3-docs
%description doc
Documentation for %{name}
%endif
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
tar xzvf %{SOURCE1} -C ./native/
%if %{with docs}
sed -r \
-e 's|https://docs.python.org/3|%{_docdir}/python3-docs/html|' \
-i docs/source/conf.py
%endif
%build
%py3_build
%if %{with docs}
PYTHONPATH=${PWD} sphinx-build-3 docs/source html
rm -rf html/.{doctrees,buildinfo}
%endif
%install
%py3_install
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitearch}/%{pypi_name}
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%if %{with docs}
%files doc
%doc html
%license LICENSE
%endif
%changelog
* Wed May 14 2025 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.7.0-1
- Update to version 1.7.0
Add free-threaded CI
Add codemod to convert typing.Union to |
Add codemod to fix variadic callable annotations
Add codemod to rename typing aliases of builtins
Add typing classifier to pyproject.toml and badge to README
Expose TypeAlias and TypeVar related structs in rust library
Build wheels for musllinux
* Thu Oct 17 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.5.0-1
- Upgrade package with version 1.5.0
FullyQualifiedNameProvider: Optionally consider pyproject.toml files
Add validation for If node
include python 3.13 in build
Add helper functions for common ways of filtering nodes
Dump CST to .dot (graphviz) files
Implement PEP-696
* Fri Aug 02 2024 muxiaohui <muxiaohui@kylinos.cn> - 1.3.0-1
- Update package to version 1.3.0
- Removed dependencies on typing_extensions and typing_inspect
* Thu Feb 29 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.2.0-1
- Upgrade package with version 1.2.0
Support running LibCST on Python 3.12 and drop support for running it on 3.8
Allow Element::codegen to be used by external users
Fix parsing list matchers without explicit brackets
Fix filepathprovider generic type
* Thu Nov 30 2023 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.1.0-1
- Upgrade package with version 1.1.0
* Fri Jun 30 2023 Dongxing Wang <dxwangk@isoftstone.com> - 0.4.10-1
- Upgrade package to version 0.4.10
* Tue Jun 6 2023 chaozhangm <chaozhangm@isoftstone.com> - 0.3.21-1
- Initial package.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/desert-sailor/python-libcst.git
git@gitee.com:desert-sailor/python-libcst.git
desert-sailor
python-libcst
python-libcst
master

搜索帮助