#3 Use pytest-relaxed, to avoid a transitive dependency on deprecated nose
Merged 2 years ago by mhayden. Opened 2 years ago by churchyard.
rpms/ churchyard/python-lexicon relaxed  into  rawhide

file modified
+6 -11
@@ -1,16 +1,9 @@ 

- # EPEL will not have python-spec/python-nose, so skip the spec-based tests on EPEL 9.

- # This may improve with a PR: https://github.com/bitprophet/pytest-relaxed/pull/22

- %if 0%{?el9} || 0%{?centos} >= 9

- %bcond_with    tests

- %else

  %bcond_without tests

- %endif

- 

  %global srcname lexicon

  

  Name:		python-lexicon

  Version:	2.0.1

- Release:	5%{?dist}

+ Release:	6%{?dist}

  Summary:	Powerful dict subclass(es) with aliasing and attribute access

  License:	BSD

  URL:		https://github.com/bitprophet/lexicon
@@ -22,7 +15,7 @@ 

  %if %{with tests}

  # For test suite

  BuildRequires:	python3-pytest

- BuildRequires:	python3-spec > 0.10.0

+ BuildRequires:	python3-pytest-relaxed

  %endif

  

  %description
@@ -46,8 +39,7 @@ 

  

  %if %{with tests}

  %check

- # Using spec rather than pytest-relaxed because the former is available in Fedora and the latter is not

- PYTHONPATH=%{buildroot}%{python3_sitelib} spec

+ %pytest

  %endif

  

  %files -n python3-lexicon
@@ -57,6 +49,9 @@ 

  %{python3_sitelib}/lexicon-%{version}-*.egg-info/

  

  %changelog

+ * Fri Sep 02 2022 Miro Hrončok <mhroncok@redhat.com> - 2.0.1-6

+ - Use pytest-relaxed, to avoid a transitive dependency on deprecated nose

+ 

  * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-5

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

  

no initial comment

pytest-relaxed spec:

Name:           python-pytest-relaxed
# Build from a fork for now for pytest 5+ support
# https://github.com/bitprophet/pytest-relaxed/pull/22
%global date    20220502
%global commit  000bba0e55ffc726c398485a1cefad63e28c9d2b
%global short   000bba0e
Version:        1.1.5^%{date}git%{short}
Release:        1%{?dist}
Summary:        Relaxed test discovery/organization for pytest
License:        BSD
URL:            https://github.com/bitprophet/pytest-relaxed
Source:         %{url}/archive/%{commit}/pytest-relaxed-%{short}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel

%global _description %{expand:
This package provides relaxed test discovery for pytest.

It is the spiritual successor to python3-spec, but is built for pytest instead
of nosetests, and rethinks some aspects of the design (such as increased
ability to opt-in to various behaviors).}

%description %_description


%package -n     python3-pytest-relaxed
Summary:        %{summary}

%description -n python3-pytest-relaxed %_description


%prep
%autosetup -p1 -n pytest-relaxed-%{commit}
sed -i 's/decorator>=4,<5/decorator>=4,<6/' setup.py


%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files pytest_relaxed


%check
%pyproject_check_import
%pytest


%files -n python3-pytest-relaxed -f %{pyproject_files}


%changelog
* Mon May 02 2022 Miro Hrončok <mhroncok@redhat.com> - 1.1.5^20220502git000bba0e-1
- Initial package from upstream pull request #22
  https://github.com/bitprophet/pytest-relaxed/pull/22

cc @mhayden

Should I rebase this, or close it?

Oh wow, I totally missed this PR. I haven't been a co-maintainer here for too long, but your change looks good to me. Would you rebase it when you get time?

I would, but pytest-relaxed needs to be packaged first.

rebased onto 2f46df6

2 years ago

The change here removes the EPEL conditional but python-pytest-relaxed was not branched for epel9 yet. I assume you would ask @jkucera to do that and/or become a co-maintainer there. If that's not happening, I can add the conditional back.

Pull-Request has been merged by mhayden

2 years ago
Metadata