#12 New bcond tests
Merged 2 months ago by churchyard. Opened 2 months ago by torsava.
rpms/ torsava/python-wheel master  into  master

file modified
+12 -4

@@ -1,7 +1,13 @@ 

- # Note that the function of bootstrap is that it disables the test suite and whl

- #   bcond_with bootstrap = tests enabled, package with whl created

+ # The function of bootstrap is that it disables the wheel subpackage

  %bcond_with bootstrap

  

+ # Default: when bootstrapping -> disable tests

+ %if %{with bootstrap}

+ %bcond_with tests

+ %else

+ %bcond_without tests

+ %endif

+ 

  %global pypi_name wheel

  %global python_wheelname %{pypi_name}-%{version}-py2.py3-none-any.whl

  %global python_wheeldir %{_datadir}/python-wheels

@@ -17,7 +23,7 @@ 

  Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz

  BuildArch:      noarch

  

- %if %{without bootstrap}

+ %if %{with tests}

  # several tests compile extensions

  # those tests are skipped if gcc is not found

  BuildRequires:  gcc

@@ -42,7 +48,7 @@ 

  # adds the dependency on python3-rpm-generators, so we require it manually

  BuildRequires:  python3-rpm-generators

  BuildRequires:  python3-setuptools

- %if %{without bootstrap}

+ %if %{with tests}

  BuildRequires:  python3-pytest

  %endif

  %{?python_provide:%python_provide python3-%{pypi_name}}

@@ -86,8 +92,10 @@ 

  %if %{without bootstrap}

  mkdir -p %{buildroot}%{python_wheeldir}

  install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}

+ %endif

  

  

+ %if %{with tests}

  %check

  rm setup.cfg

  PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build

no initial comment

Can we disable tests by default when bootstrapping?

rebased onto db76a0a

2 months ago

Great, thanks. A quick glance over the diff and all seem good. But I haven't tested the bconds and won't have time to do that today.

Thanks and there's no rush!

Metadata Update from @churchyard:
- Request assigned

2 months ago

Pull-Request has been merged by churchyard

2 months ago