14
0

Accepting request 942271 from home:darix:apps

- port to the pyproject build to get the commandline for weasyprint
  back (boo#1194029)

OBS-URL: https://build.opensuse.org/request/show/942271
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-weasyprint?expand=0&rev=9
This commit is contained in:
2021-12-26 20:27:22 +00:00
committed by Git OBS Bridge
parent a5b757d6dd
commit e34554a966
2 changed files with 21 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Dec 22 23:52:20 UTC 2021 - Marcus Rueckert <mrueckert@suse.de>
- port to the pyproject build to get the commandline for weasyprint
back (boo#1194029)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Dec 16 11:37:31 UTC 2021 - Ben Greiner <code@bnavigator.de> Thu Dec 16 11:37:31 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@@ -29,9 +29,13 @@ Group: Development/Languages/Python
URL: https://github.com/Kozea/WeasyPrint URL: https://github.com/Kozea/WeasyPrint
Source: https://files.pythonhosted.org/packages/source/w/weasyprint/weasyprint-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/w/weasyprint/weasyprint-%{version}.tar.gz
Source100: python-weasyprint-rpmlintrc Source100: python-weasyprint-rpmlintrc
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 39.2.0} BuildRequires: %{python_module setuptools >= 39.2.0}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires: libgobject-2_0-0 Requires: libgobject-2_0-0
Requires: pango Requires: pango
Requires: python-Pillow >= 4.0.0 Requires: python-Pillow >= 4.0.0
@@ -82,19 +86,28 @@ designed for pagination, and meant to be easy to hack on.
sed -i '/addopts/d' pyproject.toml sed -i '/addopts/d' pyproject.toml
%build %build
%python_build export PYTHONPATH=$PWD
%pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/weasyprint
%check %check
# gh#Kozea/WeasyPrint#1503 # gh#Kozea/WeasyPrint#1503
%pytest -k 'not (test_relative_links_missing_base_link or test_links)' tests %pytest -k 'not (test_relative_links_missing_base_link or test_links)' tests
%post
%python_install_alternative weasyprint
%postun
%python_uninstall_alternative weasyprint
%files %{python_files} %files %{python_files}
%doc README.rst %doc README.rst
%license LICENSE %license LICENSE
%python_alternative %{_bindir}/weasyprint
%{python_sitelib}/weasyprint %{python_sitelib}/weasyprint
%{python_sitelib}/weasyprint-%{version}*-info %{python_sitelib}/weasyprint-%{version}*-info