Accepting request 1007230 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1007230 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cairocffi?expand=0&rev=23
This commit is contained in:
commit
270c47b7fd
29
LICENSE
Normal file
29
LICENSE
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2013-2019, Simon Sapin and contributors.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:108a3a7cb09e203bdd8501d9baad91d786d204561bd71e9364e8b34897c47b91
|
|
||||||
size 88784
|
|
3
cairocffi-1.4.0.tar.gz
Normal file
3
cairocffi-1.4.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:509339b32ccd8d7b00c2204c32736cde78db53a32e6a162d312478d25626cd9a
|
||||||
|
size 69851
|
@ -1,41 +0,0 @@
|
|||||||
diff --git a/setup.cfg b/setup.cfg
|
|
||||||
index 6ab6258..5ff9032 100644
|
|
||||||
--- a/setup.cfg
|
|
||||||
+++ b/setup.cfg
|
|
||||||
@@ -36,15 +36,11 @@ project_urls =
|
|
||||||
packages = find:
|
|
||||||
setup_requires =
|
|
||||||
cffi >= 1.1.0
|
|
||||||
- pytest-runner
|
|
||||||
setuptools
|
|
||||||
install_requires =
|
|
||||||
cffi >= 1.1.0
|
|
||||||
tests_require =
|
|
||||||
- pytest-cov
|
|
||||||
- pytest-flake8
|
|
||||||
- pytest-isort
|
|
||||||
- pytest-runner
|
|
||||||
+ pytest
|
|
||||||
numpy
|
|
||||||
python_requires = >= 3.7
|
|
||||||
|
|
||||||
@@ -59,10 +55,7 @@ doc =
|
|
||||||
sphinx
|
|
||||||
sphinx_rtd_theme
|
|
||||||
test =
|
|
||||||
- pytest-runner
|
|
||||||
- pytest-cov
|
|
||||||
- pytest-flake8
|
|
||||||
- pytest-isort
|
|
||||||
+ pytest
|
|
||||||
xcb =
|
|
||||||
xcffib >= 0.3.2
|
|
||||||
|
|
||||||
@@ -74,7 +67,6 @@ build-dir = docs/_build
|
|
||||||
test = pytest
|
|
||||||
|
|
||||||
[tool:pytest]
|
|
||||||
-addopts = --flake8 --isort
|
|
||||||
norecursedirs = build dist .cache .eggs .git
|
|
||||||
|
|
||||||
[flake8]
|
|
@ -1,80 +0,0 @@
|
|||||||
diff --git a/cairocffi/test_cairo.py b/cairocffi/test_cairo.py
|
|
||||||
index 867c9cf..e086415 100644
|
|
||||||
--- a/cairocffi/test_cairo.py
|
|
||||||
+++ b/cairocffi/test_cairo.py
|
|
||||||
@@ -236,8 +236,8 @@ def test_device_scale():
|
|
||||||
assert surface.get_device_scale() == (2, 3)
|
|
||||||
|
|
||||||
|
|
||||||
-@pytest.mark.xfail(cairo_version() < 11504,
|
|
||||||
- reason='Cairo version too low')
|
|
||||||
+@pytest.mark.xfail(not (11504 <= cairo_version() < 11706),
|
|
||||||
+ reason='Cairo version too bad')
|
|
||||||
def test_metadata():
|
|
||||||
file_obj = io.BytesIO()
|
|
||||||
surface = PDFSurface(file_obj, 1, 1)
|
|
||||||
@@ -261,8 +261,8 @@ def test_metadata():
|
|
||||||
assert b'/ModDate (20130721234600Z)' in pdf_bytes
|
|
||||||
|
|
||||||
|
|
||||||
-@pytest.mark.xfail(cairo_version() < 11504,
|
|
||||||
- reason='Cairo version too low')
|
|
||||||
+@pytest.mark.xfail(not (11504 <= cairo_version() < 11706),
|
|
||||||
+ reason='Cairo version too bad')
|
|
||||||
def test_outline():
|
|
||||||
file_obj = io.BytesIO()
|
|
||||||
surface = PDFSurface(file_obj, 1, 1)
|
|
||||||
@@ -276,8 +276,8 @@ def test_outline():
|
|
||||||
assert b'/Title (title 2)' in pdf_bytes
|
|
||||||
|
|
||||||
|
|
||||||
-@pytest.mark.xfail(cairo_version() < 11504,
|
|
||||||
- reason='Cairo version too low')
|
|
||||||
+@pytest.mark.xfail(not (11504 <= cairo_version() < 11706),
|
|
||||||
+ reason='Cairo version too bad')
|
|
||||||
def test_page_label():
|
|
||||||
file_obj = io.BytesIO()
|
|
||||||
surface = PDFSurface(file_obj, 1, 1)
|
|
||||||
@@ -287,8 +287,8 @@ def test_page_label():
|
|
||||||
assert b'/P (abc)' in pdf_bytes
|
|
||||||
|
|
||||||
|
|
||||||
-@pytest.mark.xfail(cairo_version() < 11504,
|
|
||||||
- reason='Cairo version too low')
|
|
||||||
+@pytest.mark.xfail(not (11504 <= cairo_version() < 11706),
|
|
||||||
+ reason='Cairo version too bad')
|
|
||||||
def test_tag():
|
|
||||||
file_obj = io.BytesIO()
|
|
||||||
surface = PDFSurface(file_obj, 10, 10)
|
|
||||||
@@ -327,8 +327,8 @@ def test_thumbnail_size():
|
|
||||||
assert len(pdf_bytes1) < len(pdf_bytes2)
|
|
||||||
|
|
||||||
|
|
||||||
-@pytest.mark.xfail(cairo_version() < 11510,
|
|
||||||
- reason='Cairo version too low')
|
|
||||||
+@pytest.mark.xfail(not (11510 <= cairo_version() < 11706),
|
|
||||||
+ reason='Cairo version too bad')
|
|
||||||
def test_document_unit():
|
|
||||||
surface = SVGSurface(None, 1, 2)
|
|
||||||
assert surface.get_document_unit() == SVG_UNIT_PT
|
|
||||||
@@ -395,8 +395,8 @@ def test_png():
|
|
||||||
surface = ImageSurface.create_from_png(io.BytesIO(b''))
|
|
||||||
|
|
||||||
|
|
||||||
-@pytest.mark.xfail(cairo_version() < 11000,
|
|
||||||
- reason='Cairo version too low')
|
|
||||||
+@pytest.mark.xfail(not (11000 <= cairo_version() < 11706),
|
|
||||||
+ reason='Cairo version too bad')
|
|
||||||
def test_pdf_versions():
|
|
||||||
assert set(PDFSurface.get_versions()) >= set([
|
|
||||||
cairocffi.PDF_VERSION_1_4, cairocffi.PDF_VERSION_1_5])
|
|
||||||
@@ -417,6 +417,8 @@ def test_pdf_versions():
|
|
||||||
assert file_obj.getvalue().startswith(b'%PDF-1.4')
|
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.xfail(not (cairo_version() < 11706),
|
|
||||||
+ reason='Cairo version too bad')
|
|
||||||
def test_pdf_surface():
|
|
||||||
with temp_directory() as tempdir:
|
|
||||||
filename = os.path.join(tempdir, 'foo.pdf')
|
|
||||||
|
|
@ -1,3 +1,22 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 30 09:27:55 UTC 2022 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Avoid pulling in python-pikepdf in the stagings
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 29 08:06:36 UTC 2022 - Fabian Vogt <fvogt@suse.com>
|
||||||
|
|
||||||
|
- Drop outdated python36_ignore
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 27 17:04:28 UTC 2022 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.4.0
|
||||||
|
* #205: Use pikepdf to parse generated PDF
|
||||||
|
* #171: Don’t use deprecated pytest-runner anymore
|
||||||
|
- Drop no longer needed python-cairocffi-xfail.patch and
|
||||||
|
python-cairocffi-disable-linters.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 13 15:56:49 UTC 2022 - Bjørn Lie <bjorn.lie@gmail.com>
|
Tue Sep 13 15:56:49 UTC 2022 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
@ -17,20 +17,19 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-cairocffi
|
Name: python-cairocffi
|
||||||
Version: 1.3.0
|
Version: 1.4.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python cairo bindings based on cffi
|
Summary: Python cairo bindings based on cffi
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/Kozea/cairocffi
|
URL: https://github.com/Kozea/cairocffi
|
||||||
Source: https://files.pythonhosted.org/packages/source/c/cairocffi/cairocffi-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/c/cairocffi/cairocffi-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM python-cairocffi-xfail.patch -- Xfail some tests failing with cairo 1.17.6
|
# https://github.com/Kozea/cairocffi/issues/208
|
||||||
Patch: python-cairocffi-xfail.patch
|
Source1: https://raw.githubusercontent.com/Kozea/cairocffi/master/LICENSE
|
||||||
# PATCH-FIX-OPENSUSE python-cairocffi-disable-linters.patch -- Disable linters tests
|
|
||||||
Patch2: python-cairocffi-disable-linters.patch
|
|
||||||
|
|
||||||
BuildRequires: %{python_module base >= 3.7}
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
BuildRequires: %{python_module cffi >= 1.1.0}
|
BuildRequires: %{python_module cffi >= 1.1.0}
|
||||||
|
# we don't want pikepdf in Ring1 stagings
|
||||||
|
#BuildRequires: %{python_module pikepdf}
|
||||||
BuildRequires: %{python_module setuptools >= 39.2.0}
|
BuildRequires: %{python_module setuptools >= 39.2.0}
|
||||||
BuildRequires: %{python_module xcffib >= 0.3.2}
|
BuildRequires: %{python_module xcffib >= 0.3.2}
|
||||||
BuildRequires: cairo
|
BuildRequires: cairo
|
||||||
@ -71,6 +70,7 @@ This package provides the optional gdk-pixbuf image loader module.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n cairocffi-%{version} -p1
|
%autosetup -n cairocffi-%{version} -p1
|
||||||
|
cp %{SOURCE1} .
|
||||||
# disable development tools for unit tests. Remove deprecated pytest-runner
|
# disable development tools for unit tests. Remove deprecated pytest-runner
|
||||||
sed -i -e 's/pytest-runner$/pytest/' \
|
sed -i -e 's/pytest-runner$/pytest/' \
|
||||||
-e '/pytest-flake8$/ d' \
|
-e '/pytest-flake8$/ d' \
|
||||||
@ -92,10 +92,10 @@ sed -i 's/^from \./from cairocffi./' tests/*.py
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
cd tests/
|
cd tests/
|
||||||
# Don't test with NumPy in the python36 flavor, because python36-numpy is not in TW anymore
|
# test_cairo.py needs pikepdf, remove it
|
||||||
# Switch off test_xcb tests gh#Kozea/cairocffi#203
|
rm test_cairo.py
|
||||||
python36_ignore="--ignore test_numpy.py --ignore test_xcb.py"
|
# Switch off test_xcb_window (gh#Kozea/cairocffi#203)
|
||||||
%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" xvfb-run --server-args="-screen 0 1280x1024x16" $python -m pytest ${$python_ignore}
|
%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" xvfb-run --server-args="-screen 0 1280x1024x16" $python -m pytest -k "not test_xcb_window" *.py
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user