From b934dd9aa45a3280dc61fd0c371911503695946a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sep 23 2019 09:15:04 +0000 Subject: Update to latest version. --- diff --git a/.gitignore b/.gitignore index 2b4bde2..d0eda91 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /mplcairo-0.1.tar.gz +/mplcairo-0.2.tar.gz diff --git a/0001-Don-t-hardcode-march-native.patch b/0001-Don-t-hardcode-march-native.patch deleted file mode 100644 index b6aba11..0000000 --- a/0001-Don-t-hardcode-march-native.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 925a50e692de3df5837cb6f6767b08eba9039681 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Sun, 22 Jul 2018 23:22:31 -0400 -Subject: [PATCH 1/3] Don't hardcode -march=native. - -It's not available on all arches and we pass the relevant optimization -flags ourselves anyway. - -Signed-off-by: Elliott Sales de Andrade ---- - setup.py | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/setup.py b/setup.py -index 8b1ffac..e7ed33b 100644 ---- a/setup.py -+++ b/setup.py -@@ -108,9 +108,6 @@ class build_ext(build_ext): - if os.environ.get("MANYLINUX"): - ext.extra_link_args += ( - ["-static-libgcc", "-static-libstdc++"]) -- else: -- ext.extra_compile_args += ( -- ["-march=native"]) - - elif sys.platform == "darwin": - import cairo --- -2.17.1 - diff --git a/0002-Remove-extra-requirements.patch b/0002-Remove-extra-requirements.patch deleted file mode 100644 index f5b5a91..0000000 --- a/0002-Remove-extra-requirements.patch +++ /dev/null @@ -1,27 +0,0 @@ -From f60c1df1ac542d590ec9b41d85a31bda44070d84 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Sun, 22 Jul 2018 23:23:46 -0400 -Subject: [PATCH 2/3] Remove extra requirements. - -pybind11 is only needed at build time. - -Signed-off-by: Elliott Sales de Andrade ---- - setup.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/setup.py b/setup.py -index e7ed33b..5c4a331 100644 ---- a/setup.py -+++ b/setup.py -@@ -216,7 +216,6 @@ setup( - }, - install_requires=[ - "matplotlib>=2.2", -- "pybind11>=2.2.3", - "pycairo>=1.16.0; os_name == 'posix'", - ], - ) --- -2.17.1 - diff --git a/0003-Try-to-fix-bool-snap-lifetimes.patch b/0003-Try-to-fix-bool-snap-lifetimes.patch deleted file mode 100644 index 836fb03..0000000 --- a/0003-Try-to-fix-bool-snap-lifetimes.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 8386824b825351b200df88e7a71f57d1652f08ea Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Sun, 29 Jul 2018 17:34:45 -0400 -Subject: [PATCH 3/3] Try to fix bool snap lifetimes. - -Signed-off-by: Elliott Sales de Andrade ---- - src/_mplcairo.cpp | 4 ++-- - src/_mplcairo.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/_mplcairo.cpp b/src/_mplcairo.cpp -index 5bb34e7..15897f6 100644 ---- a/src/_mplcairo.cpp -+++ b/src/_mplcairo.cpp -@@ -542,12 +542,12 @@ void GraphicsContextRenderer::set_linewidth(double lw) - cairo_set_miter_limit(cr_, cairo_get_line_width(cr_)); - } - --void GraphicsContextRenderer::set_snap(std::optional snap) -+void GraphicsContextRenderer::set_snap(py::object snap) - { - // NOTE: We treat None (snap if only vertical or horizontal lines) as True. - // NOTE: It appears that even when rcParams["path.snap"] is False, this is - // sometimes set to True. -- get_additional_state().snap = snap.value_or(true); -+ get_additional_state().snap = snap.is(py::none{}) ? true : snap.cast(); - } - - void GraphicsContextRenderer::set_url(std::optional url) -diff --git a/src/_mplcairo.h b/src/_mplcairo.h -index 934fd9a..1693a22 100644 ---- a/src/_mplcairo.h -+++ b/src/_mplcairo.h -@@ -75,7 +75,7 @@ class GraphicsContextRenderer { - void set_hatch_color(py::object hatch); - void set_joinstyle(std::string js); - void set_linewidth(double lw); -- void set_snap(std::optional snap); -+ void set_snap(py::object snap); - void set_url(std::optional url); - - AdditionalState const& get_additional_state() const; --- -2.17.1 - diff --git a/python-mplcairo.spec b/python-mplcairo.spec index 3e3cd32..e34133c 100644 --- a/python-mplcairo.spec +++ b/python-mplcairo.spec @@ -1,17 +1,13 @@ %global srcname mplcairo Name: python-%{srcname} -Version: 0.1 -Release: 4%{?dist} +Version: 0.2 +Release: 1%{?dist} Summary: A (new) cairo backend for Matplotlib License: MIT -URL: https://github.com/anntzer/mplcairo -Source0: https://files.pythonhosted.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz -# Fedora-specific patches. -Patch0001: 0001-Don-t-hardcode-march-native.patch -Patch0002: 0002-Remove-extra-requirements.patch -Patch0003: 0003-Try-to-fix-bool-snap-lifetimes.patch +URL: https://github.com/matplotlib/mplcairo +Source0: %pypi_source BuildRequires: gcc-c++ @@ -45,6 +41,7 @@ BuildRequires: python3-matplotlib-test-data >= 2.2 BuildRequires: python3dist(pybind11) >= 2.2.3 BuildRequires: python3dist(pycairo) >= 1.16 BuildRequires: python3dist(pytest) >= 3.2.2 +BuildRequires: python3dist(pytest-xdist) BuildRequires: python3dist(setuptools) BuildRequires: python3dist(setuptools-scm) BuildRequires: python3dist(sphinx) @@ -80,10 +77,12 @@ rm -rf %{srcname}.egg-info vendor %build -MPLCAIRO_USE_LIBRAQM=true %py3_build +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} +MPLCAIRO_USE_LIBRAQM=true MPLCAIRO_BUILD_TYPE=package %py3_build %install +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %py3_install @@ -100,7 +99,7 @@ fig.savefig("/dev/null", format="png") EOF # 50 is upstream recommended tolerance since results won't match MPL exactly. -%{__python3} run-mpl-test-suite.py --tolerance=50 -m 'not network' -v +%{__python3} run-mpl-test-suite.py --tolerance=50 -m 'not network' -v -n auto %files -n python3-%{srcname} @@ -112,6 +111,9 @@ EOF %changelog +* Mon Sep 23 2019 Elliott Sales de Andrade - 0.2-1 +- Update to latest version + * Mon Aug 19 2019 Miro HronĨok - 0.1-4 - Rebuilt for Python 3.8 diff --git a/sources b/sources index 4dd91dc..731b64d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mplcairo-0.1.tar.gz) = 8e0439446d98216dec5e4c20cc67a7db1a78010cf657a0ac45bf24df79069a4e93a6c3297a539725c9c5daf8403ebfdead96e808edb90245c66e259c44691739 +SHA512 (mplcairo-0.2.tar.gz) = 08512ff30026d145ffff8f5591bb1624f245a03c2e265802208c8a6cad0f586379b333c6fc2834e8f67647bee6ca81447ebb103a55f1ae2647c9c44439897f8f