2020-08-30 15:07:07 +02:00
#
2023-01-12 22:25:11 +01:00
# spec file for package python-pyqt-builder
2020-08-30 15:07:07 +02:00
#
2023-01-12 22:25:11 +01:00
# Copyright (c) 2023 SUSE LLC
2020-08-30 15:07:07 +02: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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
2020-11-24 21:14:55 +01:00
2020-10-24 00:27:32 +02:00
%define mname pyqt-builder
2023-06-11 16:58:04 +02:00
%{?sle15_python_module_pythons}
2020-10-24 00:27:32 +02:00
Name : python-%{mname}
2024-04-21 16:40:46 +02:00
Version : 1.16.1
2020-08-30 15:07:07 +02:00
Release : 0
Summary : The PEP 517 compliant PyQt build system
2024-04-09 11:58:31 +02:00
License : BSD-2-Clause
URL : https://github.com/Python-PyQt/PyQt-builder
2024-04-21 16:40:46 +02:00
#Source0: https://files.pythonhosted.org/packages/source/P/PyQt-builder/PyQt-builder-%%{version}.tar.gz
Source0 : https://www.riverbankcomputing.com/pypi/packages/snapshots/PyQt-builder/pyqt_builder-%{version} .tar.gz
2024-01-26 09:43:07 +01:00
# PATCH-FEATURE-SUSE support-python3.6.patch alarrosa@suse.com -- The PyQt5 packages have the SLE15 python module macro, but it is disable in some maintance projects
2023-01-12 19:28:38 +01:00
Patch0 : support-python3.6.patch
2023-01-12 22:20:11 +01:00
BuildRequires : %{python_module base >= 3.6}
2023-01-12 22:17:01 +01:00
BuildRequires : %{python_module pip}
2024-04-09 11:58:31 +02:00
BuildRequires : %{python_module setuptools >= 64}
BuildRequires : %{python_module setuptools_scm >= 8}
2023-01-12 22:17:01 +01:00
BuildRequires : %{python_module wheel}
2020-08-30 15:07:07 +02:00
BuildRequires : fdupes
BuildRequires : python-rpm-macros
2021-10-04 23:35:27 +02:00
Requires : python-packaging
2023-01-12 22:25:11 +01:00
Requires : python-sip-devel >= 6.7
2020-08-30 15:07:07 +02:00
Requires(post) : update-alternatives
2023-01-12 22:25:11 +01:00
Requires(postun) : update-alternatives
2021-02-26 16:11:59 +01:00
Provides : python-PyQt-builder = %{version} -%{release}
2020-08-30 15:07:07 +02:00
BuildArch : noarch
2020-10-24 00:27:32 +02:00
# SECTION Test Requirements
2021-10-04 23:35:27 +02:00
BuildRequires : %{python_module packaging}
2023-01-12 22:25:11 +01:00
BuildRequires : %{python_module sip-devel >= 6.7}
2020-10-24 00:27:32 +02:00
# /SECTION
2020-08-30 15:07:07 +02:00
%python_subpackages
%description
2021-07-05 19:54:06 +02:00
PyQt-builder is the PEP 517 compliant build system for PyQt and projects that
extend PyQt. It extends the sip build system and uses Qt’ s qmake to perform the
2020-08-30 15:07:07 +02:00
actual compilation and installation of extension modules.
2021-07-05 19:54:06 +02:00
Projects that use PyQt-builder provide an appropriate pyproject.toml file and an
optional project.py script. Any PEP 517 compliant frontend, for example
2020-08-30 15:07:07 +02:00
sip-install or pip can then be used to build and install the project.
%prep
2024-04-21 16:40:46 +02:00
%autosetup -p1 -n pyqt_builder-%{version}
2020-08-30 15:07:07 +02:00
%build
2023-01-12 22:18:19 +01:00
%pyproject_wheel
2020-08-30 15:07:07 +02:00
%install
2023-01-12 22:18:19 +01:00
%pyproject_install
2020-08-30 15:07:07 +02:00
%python_clone -a %{buildroot} %{_bindir} /pyqt-bundle
2021-02-22 12:25:29 +01:00
%python_clone -a %{buildroot} %{_bindir} /pyqt-qt-wheel
2020-08-30 15:07:07 +02:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
%check
2021-08-19 11:32:45 +02:00
export PYTHONDONTWRITEBYTECODE=1 # boo#1047218
2021-07-05 19:54:06 +02:00
%{python_expand # no real unit tests; check import and bundle entry point
2020-08-30 15:07:07 +02:00
export PYTHONPATH=%{buildroot} %{$python_sitelib}
$python -c 'import pyqtbuild'
%{buildroot} %{_bindir} /pyqt-bundle-%{$python_bin_suffix} -V
}
%post
2021-02-22 12:25:29 +01:00
%python_install_alternative pyqt-bundle pyqt-qt-wheel
2020-08-30 15:07:07 +02:00
%postun
%python_uninstall_alternative pyqt-bundle
2023-01-12 22:25:11 +01:00
%files %{python_files}
2024-04-09 11:58:31 +02:00
%doc README.md LICENSE
2020-08-30 15:07:07 +02:00
%python_alternative %{_bindir} /pyqt-bundle
2021-02-22 12:25:29 +01:00
%python_alternative %{_bindir} /pyqt-qt-wheel
2020-08-30 15:07:07 +02:00
%{python_sitelib} /pyqtbuild
2020-10-24 00:27:32 +02:00
%{python_sitelib} /PyQt_builder-%{version} *-info
2020-08-30 15:07:07 +02:00
%changelog