fix issue:src-openEuler/python-libcst目录为空,需要引入该包
This commit is contained in:
parent
d6c4012244
commit
5cb7fa5253
BIN
libcst-0.3.21.tar.gz
Normal file
BIN
libcst-0.3.21.tar.gz
Normal file
Binary file not shown.
96
python-libcst.spec
Normal file
96
python-libcst.spec
Normal file
@ -0,0 +1,96 @@
|
||||
%bcond_with docs
|
||||
%bcond_with tests
|
||||
|
||||
%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: 0.3.21
|
||||
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}}
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3dist(setuptools)
|
||||
BuildRequires: python3dist(setuptools-scm)
|
||||
%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 -n %{pypi_name}-%{version}
|
||||
|
||||
%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_sitelib}/%{pypi_name}
|
||||
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
||||
|
||||
%if %{with docs}
|
||||
%files doc
|
||||
%doc html
|
||||
%license LICENSE
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jun 6 2023 chaozhangm <chaozhangm@isoftstone.com> - 0.3.21-1
|
||||
- Initial package.
|
||||
Loading…
x
Reference in New Issue
Block a user