Version 3.0.9 (rhbz#2016781)
Use pytest -v because this gives nice readable output.
This commit is contained in:
parent
59f4a818c2
commit
3333be1dc3
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ clog
|
||||
/pyparsing-2.4.5.tar.gz
|
||||
/pyparsing-2.4.6.tar.gz
|
||||
/pyparsing-2.4.7.tar.gz
|
||||
/pyparsing-3.0.9.tar.gz
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 9da4012a025294413fc1f956e081ee003df2411e Mon Sep 17 00:00:00 2001
|
||||
From: Serhiy Storchaka <storchaka@gmail.com>
|
||||
Date: Thu, 28 Apr 2022 12:04:55 +0200
|
||||
Subject: [PATCH] No longer use undocumented module 'sre_constants'
|
||||
|
||||
---
|
||||
pyparsing.py | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/pyparsing.py b/pyparsing.py
|
||||
index 581d5bb..774222b 100644
|
||||
--- a/pyparsing.py
|
||||
+++ b/pyparsing.py
|
||||
@@ -105,7 +105,6 @@ import copy
|
||||
import sys
|
||||
import warnings
|
||||
import re
|
||||
-import sre_constants
|
||||
import collections
|
||||
import pprint
|
||||
import traceback
|
||||
@@ -3310,7 +3309,7 @@ class Regex(Token):
|
||||
try:
|
||||
self.re = re.compile(self.pattern, self.flags)
|
||||
self.reString = self.pattern
|
||||
- except sre_constants.error:
|
||||
+ except re.error:
|
||||
warnings.warn("invalid pattern (%s) passed to Regex" % pattern,
|
||||
SyntaxWarning, stacklevel=2)
|
||||
raise
|
||||
@@ -3501,7 +3500,7 @@ class QuotedString(Token):
|
||||
self.re = re.compile(self.pattern, self.flags)
|
||||
self.reString = self.pattern
|
||||
self.re_match = self.re.match
|
||||
- except sre_constants.error:
|
||||
+ except re.error:
|
||||
warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern,
|
||||
SyntaxWarning, stacklevel=2)
|
||||
raise
|
||||
--
|
||||
2.33.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
%global srcname pyparsing
|
||||
|
||||
# when bootstrapping Python 3, pyparsing needs to be rebuilt before depndency generator is available
|
||||
# when bootstrapping Python 3, pyparsing needs to be rebuilt before dependency generator is available
|
||||
%bcond_with bootstrap
|
||||
%if %{without bootstrap}
|
||||
%global build_wheel 1
|
||||
@ -10,18 +10,13 @@
|
||||
|
||||
Summary: Python package with an object-oriented approach to text processing
|
||||
Name: pyparsing
|
||||
Version: 2.4.7
|
||||
Version: 3.0.9
|
||||
Release: %autorelease
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/pyparsing/pyparsing
|
||||
Source0: https://github.com/%{name}/%{name}/archive/%{name}_%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# sre_constants module is deprecated in Python 3.11, this patch replaces it with the re module
|
||||
# Merged upstream in https://github.com/pyparsing/pyparsing/pull/379
|
||||
# Included in 3.0.8+
|
||||
Patch: 0001-No-longer-use-undocumented-module-sre_constants.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
@ -36,6 +31,8 @@ BuildRequires: python%{python3_pkgversion}-pip
|
||||
BuildRequires: python%{python3_pkgversion}-wheel
|
||||
%endif
|
||||
|
||||
BuildRequires: python%{python3_pkgversion}-pytest
|
||||
|
||||
%description
|
||||
pyparsing is a module that can be used to easily and directly configure syntax
|
||||
definitions for any number of text parsing applications.
|
||||
@ -76,12 +73,17 @@ The package contains documentation for pyparsing.
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{name}_%{version}
|
||||
|
||||
dos2unix -k CHANGES LICENSE
|
||||
dos2unix -k examples/*
|
||||
|
||||
|
||||
%if 0%{?build_wheel}
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -t
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if 0%{?build_wheel}
|
||||
%py3_build_wheel
|
||||
%pyproject_wheel
|
||||
%else
|
||||
%py3_build
|
||||
%endif
|
||||
@ -97,23 +99,21 @@ popd
|
||||
|
||||
%install
|
||||
%if 0%{?build_wheel}
|
||||
%py3_install_wheel %{python_wheelname}
|
||||
%pyproject_install
|
||||
%else
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
|
||||
%check
|
||||
%{__python3} unitTests.py
|
||||
%{__python3} simple_unit_tests.py
|
||||
%pytest -v
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-pyparsing
|
||||
%license LICENSE
|
||||
%doc CHANGES README.rst
|
||||
%{python3_sitelib}/pyparsing.py
|
||||
%{python3_sitelib}/__pycache__/*
|
||||
%{python3_sitelib}/pyparsing-*-info/
|
||||
%{python3_sitelib}/pyparsing/
|
||||
%{python3_sitelib}/pyparsing-%{version}.dist-info/
|
||||
|
||||
%if %{without bootstrap}
|
||||
%files doc
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (pyparsing-2.4.7.tar.gz) = c7a546729f86a2b5176e2482b566b9fd715b03e495aaef4d720b21307bb03f385dbc849247f8d266cb3d92be0a83c34ce4995b655ce85318355d5a0d42d6991e
|
||||
SHA512 (pyparsing-3.0.9.tar.gz) = 1158f27e31f8eced540217b7234b09005eac416fad74faf59678fdae93fe2f76e0e3b5f4adfd3ceb42c8aef19150950293e989c9a5189741175073eb7a03cd6d
|
||||
|
Loading…
Reference in New Issue
Block a user