diff --git a/.gitignore b/.gitignore index 9cd413e..f1239c8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /python-wand-0.4.4.tar.gz /python-wand-0.5.1.tar.gz /python-wand-0.5.2.tar.gz +/python-wand-0.5.5.tar.gz diff --git a/load-library.patch b/load-library.patch new file mode 100644 index 0000000..7fc6604 --- /dev/null +++ b/load-library.patch @@ -0,0 +1,35 @@ +--- a/wand/api.py 2019-07-08 21:19:35.000000000 -0400 ++++ b/wand/api.py 2019-07-30 10:51:03.821374690 -0400 +@@ -136,31 +136,9 @@ + try: + libraries = load_library() + except (OSError, IOError): +- msg = 'http://docs.wand-py.org/en/latest/guide/install.html' +- if sys.platform.startswith(('dragonfly', 'freebsd')): +- msg = 'pkg install' +- elif sys.platform == 'win32': +- msg += '#install-imagemagick-on-windows' +- elif sys.platform == 'darwin': +- mac_pkgmgrs = {'brew': 'brew install freetype imagemagick', +- 'port': 'port install imagemagick'} +- for pkgmgr in mac_pkgmgrs: +- with os.popen('which ' + pkgmgr) as f: +- if f.read().strip(): +- msg = mac_pkgmgrs[pkgmgr] +- break +- else: +- msg += '#install-imagemagick-on-mac' +- else: +- distname, _, __ = platform.linux_distribution() +- distname = (distname or '').lower() +- if distname in ('debian', 'ubuntu'): +- msg = 'apt-get install libmagickwand-dev' +- elif distname in ('fedora', 'centos', 'redhat'): +- msg = 'yum install ImageMagick-devel' + raise ImportError('MagickWand shared library not found.\n' + 'You probably had not installed ImageMagick library.\n' +- 'Try to install:\n ' + msg) ++ 'Try to install:\n dnf install ImageMagick-devel') + + #: (:class:`ctypes.CDLL`) The MagickWand library. + library = libraries[0] diff --git a/python-wand.spec b/python-wand.spec index 14825bb..b928582 100644 --- a/python-wand.spec +++ b/python-wand.spec @@ -2,8 +2,8 @@ %global sum Ctypes-based simple MagickWand API binding for Python Name: python-%{srcname} -Version: 0.5.2 -Release: 2%{?dist} +Version: 0.5.5 +Release: 1%{?dist} Summary: %{sum} License: MIT @@ -14,6 +14,8 @@ BuildArch: noarch BuildRequires: python3-devel Requires: ImageMagick +Patch0: load-library.patch + %description Wand is a ctypes-based simple ImageMagick binding for Python. It doesn't cover all functionalities of MagickWand API currently. @@ -28,7 +30,7 @@ all functionalities of MagickWand API currently. %prep -%autosetup -n %{srcname}-%{version} +%autosetup -n %{srcname}-%{version} -p1 %build %py3_build @@ -45,6 +47,9 @@ rm $RPM_BUILD_ROOT/usr/README.rst %changelog +* Tue Jul 30 2019 Dennis Chen - 0.5.5-1 +- Update to Wand Version 0.5.5 + * Fri Jul 26 2019 Fedora Release Engineering - 0.5.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index a848f3e..2a162e6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-wand-0.5.2.tar.gz) = a4a81f25ed77ab5d96073cec9ec07d53c942e2e302dcd6a4b957ab8406f321095976d57ecd2569cc51203ce99608684fcf9036de512fa7e533357ae6023ab25b +SHA512 (python-wand-0.5.5.tar.gz) = b9f51e506cd6256a9b9ec8d52c1ef5cf1428e500f5c28740c07b4188fce2f5164ca7ae23341e40ec51ee93c11afd6655a7f01d361b911984810b242e4b66324d