Init package python-pytype of version 2023.9.19.

This commit is contained in:
mengzhaoa 2023-09-20 10:54:33 +08:00
parent a4b879b897
commit 5ca1c9f278
3 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,20 @@
From 84630b9f714207add20484d50804e830d68760dc Mon Sep 17 00:00:00 2001
From: mengzhaoa <mengzhaoa@isoftstone.com>
Date: Fri, 22 Sep 2023 09:48:14 +0800
Subject: [PATCH] fix parse.py
---
pytype/tools/merge_pyi/test_data/parse_error.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pytype/tools/merge_pyi/test_data/parse_error.py b/pytype/tools/merge_pyi/test_data/parse_error.py
index 5853871..98f1b66 100644
--- a/pytype/tools/merge_pyi/test_data/parse_error.py
+++ b/pytype/tools/merge_pyi/test_data/parse_error.py
@@ -1,2 +1,2 @@
# This will raise a MergeError
-def f(*): pass
+def f(*args): pass
--
1.8.3.1

52
python-pytype.spec Normal file
View File

@ -0,0 +1,52 @@
%global pypi_name pytype
Name: python-%{pypi_name}
Version: 2023.9.19
Release: 1
Summary: Python type inferencer
License: Apache 2.0
URL: https://github.com/google/pytype
Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
Patch1: 0001-fix-parse-error-py.patch
%description
Pytype checks and infers types for your Python code - without requiring type annotations.
%package -n python3-%{pypi_name}
Summary: Python type inferencer
Provides: python-%{pypi_name}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-pybind11
BuildRequires: gcc-c++
Requires: ninja-build
%description -n python3-%{pypi_name}
Pytype checks and infers types for your Python code - without requiring type annotations.
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%build
%pyproject_build
%install
%pyproject_install
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{python3_sitearch}/pytype*.dist-info/
%{python3_sitearch}/pytype/
%{python3_sitearch}/pytype_extensions/
%{python3_sitearch}/third_party/
%{_bindir}
%changelog
* Wed Sep 20 2023 mengzhaoa <mengzhaoa@isoftstone.com> - 2023.9.19-1
- Init package.

BIN
pytype-2023.9.19.tar.gz Normal file

Binary file not shown.