#5 Disable tests in RHEL builds
Merged 5 months ago by pnemade. Opened 5 months ago by yselkowitz.
rpms/ yselkowitz/python-fs rawhide  into  rawhide

file modified
+11 -1
@@ -1,8 +1,11 @@ 

  %global srcname fs

  

+ # RHEL does not include the test dependencies

+ %bcond tests %{undefined rhel}

+ 

  Name:           python-%{srcname}

  Version:        2.4.16

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Python's Filesystem abstraction layer

  

  License:        MIT
@@ -15,10 +18,12 @@ 

  

  BuildRequires:  python3dist(appdirs)

  BuildRequires:  python3dist(six)

+ %if %{with tests}

  # Required for running tests

  BuildRequires:  python3dist(pytest)

  BuildRequires:  python3dist(pytest-randomly)

  BuildRequires:  python3dist(parameterized)

+ %endif

  

  %global _description %{expand:

  Think of PyFilesystem's FS objects as the next logical step to Python's file
@@ -41,9 +46,11 @@ 

  %install

  %py3_install

  

+ %if %{with tests}

  %check

  # tests/test_ftpfs.py needs pyftpdlib (not packaged yet)

  %{python3} -m pytest --ignore tests/test_ftpfs.py

+ %endif

  

  %files -n python3-%{srcname}

  %license LICENSE
@@ -52,6 +59,9 @@ 

  %{python3_sitelib}/%{srcname}/

  

  %changelog

+ * Thu May 25 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 2.4.16-2

+ - Disable tests in RHEL builds

+ 

  * Thu Mar 16 2023 Parag Nemade <pnemade AT redhat DOT com> - 2.4.16-1

  - Update to 2.4.16 version

  

python-pytest-randomly and python-parameterized are both unwanted in RHEL, and without which the tests will not run.

Pull-Request has been merged by pnemade

5 months ago

Thanks for this PR

just for my reference, tests need to be fixed.

error: line 4: Unknown tag: %bcond tests 0
error: query of specfile /var/ARTIFACTS/git-7ab95354h13sfph/tests/../python-fs.spec failed, can't parse

Thanks for this PR

just for my reference, tests need to be fixed.

This is https://pagure.io/fedora-ci/general/issue/381

Metadata