2018-08-03 10:39:55 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-enaml
|
|
|
|
|
#
|
2021-04-29 20:46:06 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2018-08-03 10:39:55 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2020-02-05 18:44:00 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
2018-08-03 10:39:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-04-16 21:06:30 +00:00
|
|
|
# python-cppy, python-bytecode is python3 only (at least)
|
|
|
|
|
%define skip_python2 1
|
2021-12-06 17:24:49 +00:00
|
|
|
%define skip_python36 1
|
2018-08-03 10:39:55 +00:00
|
|
|
Name: python-enaml
|
2021-12-06 17:24:49 +00:00
|
|
|
Version: 0.14.0
|
2018-08-03 10:39:55 +00:00
|
|
|
Release: 0
|
|
|
|
|
# Source code is under BSD but images are under different licenses
|
|
|
|
|
# and details are inside image_LICENSE.txt
|
|
|
|
|
Summary: Declarative DSL for building rich user interfaces in Python
|
2020-02-05 18:44:00 +00:00
|
|
|
License: BSD-3-Clause AND LGPL-2.1-only
|
|
|
|
|
URL: https://github.com/nucleic/enaml
|
2021-12-06 17:24:49 +00:00
|
|
|
Source: https://github.com/nucleic/enaml/archive/%{version}.tar.gz#/enaml-%{version}.tar.gz
|
2018-08-03 10:39:55 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: fdupes
|
2020-02-05 18:44:00 +00:00
|
|
|
BuildRequires: gcc-c++
|
2018-08-03 10:39:55 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-02-05 18:44:00 +00:00
|
|
|
Requires: python-QtPy >= 1.3
|
2021-12-06 17:24:49 +00:00
|
|
|
Requires: python-atom >= 0.7.0
|
2020-04-16 21:06:30 +00:00
|
|
|
Requires: python-bytecode >= 0.11.0
|
2021-04-29 20:46:06 +00:00
|
|
|
Requires: python-kiwisolver >= 1.2.0
|
2020-02-05 18:44:00 +00:00
|
|
|
Requires: python-ply >= 3.4
|
2021-04-29 20:46:06 +00:00
|
|
|
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
|
|
|
|
# pyside is python3 only
|
|
|
|
|
Requires: (%python_flavor-qt5 or python3-pyside2)
|
|
|
|
|
%else
|
2020-02-05 18:44:00 +00:00
|
|
|
Requires: python-qt5
|
2021-04-29 20:46:06 +00:00
|
|
|
%endif
|
2020-02-05 18:44:00 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-04-29 20:46:06 +00:00
|
|
|
Requires(postun):update-alternatives
|
2018-08-03 10:39:55 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module QtPy >= 1.3}
|
2021-12-06 17:24:49 +00:00
|
|
|
BuildRequires: %{python_module atom >= 0.7.0}
|
2020-04-16 21:06:30 +00:00
|
|
|
BuildRequires: %{python_module bytecode}
|
|
|
|
|
BuildRequires: %{python_module cppy >= 1.1.0}
|
2021-04-29 20:46:06 +00:00
|
|
|
BuildRequires: %{python_module kiwisolver >= 1.2.0}
|
2018-08-03 10:39:55 +00:00
|
|
|
BuildRequires: %{python_module ply >= 3.4}
|
|
|
|
|
BuildRequires: %{python_module pytest-qt}
|
2020-02-05 18:44:00 +00:00
|
|
|
BuildRequires: %{python_module pytest-xvfb}
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
BuildRequires: %{python_module qt5}
|
2018-08-03 10:39:55 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2020-02-05 18:44:00 +00:00
|
|
|
BuildRequires: xauth
|
|
|
|
|
BuildRequires: xorg-x11-fonts
|
2018-08-03 10:39:55 +00:00
|
|
|
# /SECTION
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Enaml is a programming language and framework for creating
|
|
|
|
|
professional quality user interfaces with minimal effort.
|
|
|
|
|
Enaml combines a domain specific declarative language with
|
|
|
|
|
a constraints based layout system to allow users to easily
|
|
|
|
|
define rich UIs with complex and flexible layouts. Enaml
|
|
|
|
|
applications can be run on any platform which supports
|
|
|
|
|
Python and Qt.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n enaml-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2020-02-05 18:44:00 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/enaml-compileall
|
2018-08-03 10:39:55 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/enaml-run
|
|
|
|
|
|
|
|
|
|
%check
|
2021-04-29 20:46:06 +00:00
|
|
|
# use the builddir instead of buildroot in order to avoid
|
|
|
|
|
# packaging of unreproducible files generated during tests
|
|
|
|
|
# https://github.com/nucleic/enaml/issues/397
|
|
|
|
|
%python_expand cp -r %{buildroot}%{$python_sitearch} build/testlib
|
|
|
|
|
export PYTHONPATH=$PWD/build/testlib
|
2020-04-16 21:06:30 +00:00
|
|
|
# not sure why these two are failing
|
2021-04-29 20:46:06 +00:00
|
|
|
donttest="test_focus_tracking or test_focus_traversal"
|
2021-08-12 07:01:36 +00:00
|
|
|
# Switching off temporarily the tests gh#nucleic/enaml#449
|
2021-04-29 20:46:06 +00:00
|
|
|
%pytest_arch tests -k "not ($donttest)"
|
2018-08-03 10:39:55 +00:00
|
|
|
|
|
|
|
|
%post
|
2020-02-05 18:44:00 +00:00
|
|
|
%{python_install_alternative enaml-compileall enaml-run}
|
2018-08-03 10:39:55 +00:00
|
|
|
|
|
|
|
|
%postun
|
2020-02-05 18:44:00 +00:00
|
|
|
%python_uninstall_alternative enaml-compileall
|
2018-08-03 10:39:55 +00:00
|
|
|
|
|
|
|
|
%files %{python_files}
|
2020-02-05 18:44:00 +00:00
|
|
|
%doc README.rst releasenotes.rst
|
2020-04-16 21:06:30 +00:00
|
|
|
%license LICENSE
|
2020-02-05 18:44:00 +00:00
|
|
|
%python_alternative %{_bindir}/enaml-compileall
|
2018-08-03 10:39:55 +00:00
|
|
|
%python_alternative %{_bindir}/enaml-run
|
2021-04-29 20:46:06 +00:00
|
|
|
%{python_sitearch}/enaml
|
2021-08-12 07:01:36 +00:00
|
|
|
%{python_sitearch}/enaml-*-info
|
2018-08-03 10:39:55 +00:00
|
|
|
|
|
|
|
|
%changelog
|