Compare commits
No commits in common. "c8-stream-2.7" and "c9s" have entirely different histories.
c8-stream-
...
c9s
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
SOURCES/funcsigs-1.0.2.tar.gz
|
/funcsigs-0.4.tar.gz
|
||||||
|
/funcsigs-1.0.2.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
d09f1a17d4b7323f815e27c1baabfa1f4dd2d9fe SOURCES/funcsigs-1.0.2.tar.gz
|
d09f1a17d4b7323f815e27c1baabfa1f4dd2d9fe funcsigs-1.0.2.tar.gz
|
||||||
|
88
no-unittest2.patch
Normal file
88
no-unittest2.patch
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
diff -rU3 funcsigs-1.0.2.orig/setup.py funcsigs-1.0.2/setup.py
|
||||||
|
--- funcsigs-1.0.2.orig/setup.py 2016-04-26 00:01:13.000000000 +0200
|
||||||
|
+++ funcsigs-1.0.2/setup.py 2019-09-26 17:15:43.693886370 +0200
|
||||||
|
@@ -47,6 +47,5 @@
|
||||||
|
'Programming Language :: Python :: Implementation :: PyPy',
|
||||||
|
'Topic :: Software Development :: Libraries :: Python Modules'
|
||||||
|
],
|
||||||
|
- tests_require = ['unittest2'],
|
||||||
|
- test_suite = 'unittest2.collector',
|
||||||
|
+ test_suite = 'tests',
|
||||||
|
)
|
||||||
|
diff -rU3 funcsigs-1.0.2.orig/tests/test_formatannotation.py funcsigs-1.0.2/tests/test_formatannotation.py
|
||||||
|
--- funcsigs-1.0.2.orig/tests/test_formatannotation.py 2016-04-05 23:32:14.000000000 +0200
|
||||||
|
+++ funcsigs-1.0.2/tests/test_formatannotation.py 2019-09-26 16:49:30.174351893 +0200
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
import funcsigs
|
||||||
|
|
||||||
|
-import unittest2 as unittest
|
||||||
|
+import unittest
|
||||||
|
|
||||||
|
class TestFormatAnnotation(unittest.TestCase):
|
||||||
|
def test_string (self):
|
||||||
|
diff -rU3 funcsigs-1.0.2.orig/tests/test_funcsigs.py funcsigs-1.0.2/tests/test_funcsigs.py
|
||||||
|
--- funcsigs-1.0.2.orig/tests/test_funcsigs.py 2016-04-05 23:32:14.000000000 +0200
|
||||||
|
+++ funcsigs-1.0.2/tests/test_funcsigs.py 2019-09-26 16:49:26.315366071 +0200
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-import unittest2 as unittest
|
||||||
|
+import unittest
|
||||||
|
|
||||||
|
import doctest
|
||||||
|
import sys
|
||||||
|
diff -rU3 funcsigs-1.0.2.orig/tests/test_inspect.py funcsigs-1.0.2/tests/test_inspect.py
|
||||||
|
--- funcsigs-1.0.2.orig/tests/test_inspect.py 2016-04-05 23:32:14.000000000 +0200
|
||||||
|
+++ funcsigs-1.0.2/tests/test_inspect.py 2019-09-26 17:05:25.946939291 +0200
|
||||||
|
@@ -3,13 +3,24 @@
|
||||||
|
import collections
|
||||||
|
import functools
|
||||||
|
import sys
|
||||||
|
+import contextlib
|
||||||
|
|
||||||
|
-import unittest2 as unittest
|
||||||
|
+import unittest
|
||||||
|
|
||||||
|
import funcsigs as inspect
|
||||||
|
|
||||||
|
+if not hasattr(unittest.TestCase, 'assertRaisesRegex'):
|
||||||
|
+ class TestCase(unittest.TestCase):
|
||||||
|
+ @contextlib.contextmanager
|
||||||
|
+ def assertRaisesRegex(self, error, message):
|
||||||
|
+ with self.assertRaises(error) as cm:
|
||||||
|
+ yield cm
|
||||||
|
+ self.assertRegexpMatches(str(cm.exception), message)
|
||||||
|
+else:
|
||||||
|
+ TestCase = unittest.TestCase
|
||||||
|
|
||||||
|
-class TestSignatureObject(unittest.TestCase):
|
||||||
|
+
|
||||||
|
+class TestSignatureObject(TestCase):
|
||||||
|
@staticmethod
|
||||||
|
def signature(func):
|
||||||
|
sig = inspect.signature(func)
|
||||||
|
@@ -647,7 +658,7 @@
|
||||||
|
""")
|
||||||
|
|
||||||
|
|
||||||
|
-class TestParameterObject(unittest.TestCase):
|
||||||
|
+class TestParameterObject(TestCase):
|
||||||
|
|
||||||
|
def test_signature_parameter_kinds(self):
|
||||||
|
P = inspect.Parameter
|
||||||
|
@@ -761,7 +772,7 @@
|
||||||
|
p.kind = 123
|
||||||
|
|
||||||
|
|
||||||
|
-class TestSignatureBind(unittest.TestCase):
|
||||||
|
+class TestSignatureBind(TestCase):
|
||||||
|
@staticmethod
|
||||||
|
def call(func, *args, **kwargs):
|
||||||
|
sig = inspect.signature(func)
|
||||||
|
@@ -975,7 +986,7 @@
|
||||||
|
self.assertEqual((an_f, 10), partial_f(*ba.args, **ba.kwargs))
|
||||||
|
|
||||||
|
|
||||||
|
-class TestBoundArguments(unittest.TestCase):
|
||||||
|
+class TestBoundArguments(TestCase):
|
||||||
|
|
||||||
|
def test_signature_bound_arguments_unhashable(self):
|
||||||
|
def foo(a): pass
|
@ -1,21 +1,19 @@
|
|||||||
%global pypi_name funcsigs
|
%global pypi_name funcsigs
|
||||||
|
|
||||||
# funcsigs functionality is available in Python 3's inspect module
|
# when bootstrapping Python 3, funcsigs needs to be rebuilt before sphinx
|
||||||
# Nothing should use python3-funcsigs as an external library.
|
%bcond_without doc
|
||||||
%global with_python3 0
|
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 13%{?dist}
|
Release: 23%{?dist}
|
||||||
Summary: Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
|
Summary: Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://github.com/testing-cabal/funcsigs?
|
URL: https://github.com/testing-cabal/funcsigs?
|
||||||
Source0: https://pypi.io/packages/source/f/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
Source0: https://pypi.io/packages/source/f/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
Patch0: no-unittest2.patch
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
BuildArch: noarch
|
||||||
BuildRequires: python2-setuptools
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
funcsigs is a backport of the PEP 362 function signature features from
|
funcsigs is a backport of the PEP 362 function signature features from
|
||||||
@ -23,34 +21,30 @@ Python 3.3's inspect module. The backport is compatible with Python 2.6, 2.7
|
|||||||
as well as 3.2 and up.
|
as well as 3.2 and up.
|
||||||
|
|
||||||
|
|
||||||
%package -n python2-%{pypi_name}
|
|
||||||
Summary: Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
|
|
||||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
|
||||||
|
|
||||||
%description -n python2-%{pypi_name}
|
|
||||||
funcsigs is a backport of the PEP 362 function signature features from
|
|
||||||
Python 3.3's inspect module. The backport is compatible with Python 2.6, 2.7
|
|
||||||
as well as 3.2 and up.
|
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python3-%{pypi_name}
|
%package -n python3-%{pypi_name}
|
||||||
Summary: Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
|
Summary: Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
|
||||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
|
%if %{with doc}
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-unittest2
|
%endif
|
||||||
|
|
||||||
%description -n python3-%{pypi_name}
|
%description -n python3-%{pypi_name}
|
||||||
funcsigs is a backport of the PEP 362 function signature features from
|
funcsigs is a backport of the PEP 362 function signature features from
|
||||||
Python 3.3's inspect module. The backport is compatible with Python 2.6, 2.7
|
Python 3.3's inspect module. The backport is compatible with Python 2.6, 2.7
|
||||||
as well as 3.2 and up.
|
as well as 3.2 and up.
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
|
%package -n python-%{pypi_name}-doc
|
||||||
|
Summary: funcsigs documentation
|
||||||
|
%description -n python-%{pypi_name}-doc
|
||||||
|
Documentation for funcsigs
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{pypi_name}-%{version}
|
%autosetup -p1 -n %{pypi_name}-%{version}
|
||||||
# Remove bundled egg-info
|
# Remove bundled egg-info
|
||||||
rm -rf %{pypi_name}.egg-info
|
rm -rf %{pypi_name}.egg-info
|
||||||
|
|
||||||
@ -59,61 +53,85 @@ sed -i '/extras_require/,+3d' setup.py
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
|
# generate html docs
|
||||||
|
sphinx-build docs html
|
||||||
|
# remove the sphinx-build leftovers
|
||||||
|
rm -rf html/.{doctrees,buildinfo}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Must do the subpackages' install first because the scripts in /usr/bin are
|
# Must do the subpackages' install first because the scripts in /usr/bin are
|
||||||
# overwritten with every setup.py install.
|
# overwritten with every setup.py install.
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_install
|
%py3_install
|
||||||
%endif
|
|
||||||
|
|
||||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
||||||
%py2_install
|
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?with_python3}
|
%{__python3} -m unittest tests.test_formatannotation
|
||||||
%{__python3} setup.py test
|
%{__python3} -m unittest tests.test_funcsigs
|
||||||
%endif
|
%{__python3} -m unittest tests.test_inspect
|
||||||
|
|
||||||
%files -n python2-%{pypi_name}
|
|
||||||
%doc README.rst
|
|
||||||
%license LICENSE
|
|
||||||
%{python2_sitelib}/%{pypi_name}
|
|
||||||
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%files -n python3-%{pypi_name}
|
%files -n python3-%{pypi_name}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python3_sitelib}/%{pypi_name}
|
%{python3_sitelib}/%{pypi_name}/
|
||||||
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
%{python3_sitelib}/%{pypi_name}-%{version}-py?.*.egg-info/
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
|
%files -n python-%{pypi_name}-doc
|
||||||
|
%doc html
|
||||||
|
%license LICENSE
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 1.0.2-13
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-23
|
||||||
- Bumping due to problems with modular RPM upgrade path
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
- Resolves: rhbz#1695587
|
|
||||||
|
|
||||||
* Fri Jul 13 2018 Lumír Balhar <lbalhar@redhat.com> - 1.0.2-12
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-22
|
||||||
- First version for python27 module
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.2-11
|
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-21
|
||||||
- Disable the python3 subpackage
|
- Rebuilt for Python 3.9
|
||||||
Functionality of funcsigs is available in Python 3's inspect module.
|
|
||||||
|
|
||||||
* Mon Jul 02 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.2-10
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-20
|
||||||
- Skip python2 tests to allow removing python2-unittest2 from the distribution
|
- Bootstrap for Python 3.9
|
||||||
- Fix workaround for allowing Python 2 for build
|
|
||||||
|
|
||||||
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.2-9
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-19
|
||||||
- Allow Python 2 for build
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
see https://hurl.corp.redhat.com/rhel8-py2
|
|
||||||
- Switch to python3-sphinx
|
* Thu Jan 9 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.2-18
|
||||||
|
- Remove build dependency on python3-unittest2 (#1789200)
|
||||||
|
|
||||||
|
* Thu Nov 28 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-17
|
||||||
|
- Subpackage python2-funcsigs has been removed
|
||||||
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
||||||
|
|
||||||
|
* Thu Sep 26 2019 Petr Viktorin <pviktori@redhat.com> - 1.0.2-16
|
||||||
|
- Remove build dependency on python2-unittest2
|
||||||
|
|
||||||
|
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-15
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Wed Aug 14 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-14
|
||||||
|
- Bootstrap for Python 3.8
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-13
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-12
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-10
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.2-9
|
||||||
|
- Update Python 2 dependency declarations to new packaging standards
|
||||||
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-8
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-8
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
Loading…
Reference in New Issue
Block a user