Blob Blame Raw
# These are unreliable and often hang
%bcond_with xvfb_tests

%global srcname fsleyes-props

%global desc %{expand: \
fsleyes-props is a library which is used by used by FSLeyes , and which allows
you to:

- Listen for change to attributes on a python object,
- Automatically generate wxpython widgets which are bound to attributes of
  a python object
- Automatically generate a command line interface to set values of the
  attributes of a python object.}

Name:           python-%{srcname}
Version:        1.6.7
Release:        1%{?dist}
Summary:        [wx]Python event programming framework

License:        ASL 2.0
URL:  {srcname}
Source0:        %pypi_source

BuildArch:      noarch


%package -n python3-%{srcname}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  %{py3_dist six}
BuildRequires:  %{py3_dist matplotlib}
BuildRequires:  %{py3_dist wxPython}
BuildRequires:  %{py3_dist deprecation}
BuildRequires:  %{py3_dist fsleyes-widgets}
BuildRequires:  %{py3_dist fslpy}
BuildRequires:  %{py3_dist sphinx}
BuildRequires:  %{py3_dist sphinx_rtd_theme}
BuildRequires:  %{py3_dist mock}
BuildRequires:  %{py3_dist pytest pytest-cov}
BuildRequires:  xorg-x11-server-Xvfb

Requires:  %{py3_dist six}
Requires:  %{py3_dist matplotlib}
Requires:  %{py3_dist wxPython}
Requires:  %{py3_dist deprecation}
Requires:  %{py3_dist fsleyes-widgets}
Requires:  %{py3_dist fslpy}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}

%package doc
Summary:        %{summary}

%description doc
This package contains documentation for %{name}.

%autosetup -n %{srcname}-%{version}
rm -rfv fsleyes_props.egg-info

find . -name "*py" -exec sed -i '/#!\/usr\/bin\/env python/ d' '{}' \;


# Build documentation
PYTHONPATH=.  sphinx-build-3 doc html
# Remove artefacts
rm -frv html/.buildinfo
rm -frv html/.doctrees


%if %{with xvfb_tests}
# These tests fail. Upstream says tests are not reliable, but work on his Ubuntu setup
xvfb-run pytest-3 tests --ignore=tests/ --ignore=tests/ --ignore=tests/

%files -n python3-%{srcname}
%doc README.rst

%files doc
%doc html

* Mon Oct 28 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.6.7-1
- Update to 1.6.7
- use conditional for unreliable tests

* Mon Oct 28 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.6.6-2
- Remove python2 code from spec

* Mon Sep 23 2019 Aniket Pradhan <major AT fedoraproject DOT org> - 1.6.6-1
- Update to 1.6.6

* Mon Aug 19 2019 Miro HronĨok <> - 1.6.5-3
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <> - 1.6.5-2
- Rebuilt for

* Sat Feb 16 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.6.5-1
- Update to new release

* Sat Feb 02 2019 Fedora Release Engineering <> - 1.6.4-2
- Rebuilt for

* Thu Nov 08 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 1.6.4-1
- Initial build