15
0

- Rewrite the check section completly, making use of upstream's Makefile.

- Also copy in a missing utils with a constant when we require it.
- Switch to pyproject macros.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pgmagick?expand=0&rev=12
This commit is contained in:
2024-03-21 05:55:54 +00:00
committed by Git OBS Bridge
parent cb5af77b41
commit dff38ceff0
4 changed files with 51 additions and 12 deletions

27
Makefile Normal file
View File

@@ -0,0 +1,27 @@
all: cookbook blob color image geometry montage api
PYTHON?=python
cookbook:
@${PYTHON} test_cookbook.py ${TEST_OPTIONS}
blob:
@${PYTHON} test_pgmagick_blob.py ${TEST_OPTIONS}
color:
@${PYTHON} test_pgmagick_color.py ${TEST_OPTIONS}
image:
@${PYTHON} test_pgmagick_image.py ${TEST_OPTIONS}
geometry:
@${PYTHON} test_pgmagick_geometry.py ${TEST_OPTIONS}
montage:
@${PYTHON} test_pgmagick_montage.py ${TEST_OPTIONS}
api:
@${PYTHON} test_pgmagick_api.py ${TEST_OPTIONS}
clean:
rm *.png *.jpg

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Mar 21 05:54:25 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Rewrite the check section completly, making use of upstream's Makefile.
- Also copy in a missing utils with a constant when we require it.
- Switch to pyproject macros.
-------------------------------------------------------------------
Wed Dec 27 14:29:09 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pgmagick
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,11 +22,14 @@ Version: 0.7.6
Release: 0
Summary: Yet Another Python wrapper for GraphicsMagick
License: MIT
Group: Development/Languages/Python
URL: https://github.com/hhatto/pgmagick/
Source: https://files.pythonhosted.org/packages/source/p/pgmagick/pgmagick-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/hhatto/pgmagick/master/test/Makefile
Source2: https://raw.githubusercontent.com/hhatto/pgmagick/master/test/utils.py
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: ghostscript-fonts-std
BuildRequires: pkgconfig
@@ -48,27 +51,28 @@ wrapper for GraphicsMagick.
%prep
%autosetup -p1 -n pgmagick-%{version}
cp %{SOURCE1} test
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
mkdir tester
pushd tester
cp -r ../test .
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m unittest discover -v
popd
rm -r tester
export PYTHONDONTWRITEBYTECODE=1
%python_expand cp -v %{SOURCE2} %{buildroot}%{$python_sitearch}
mv pgmagick do-not-use-pgmagick
%python_expand PYTHON=$python PYTHONPATH=%{buildroot}%{$python_sitearch} make -C test all clean
mv do-not-use-pgmagick pgmagick
%python_expand rm -v %{buildroot}%{$python_sitearch}/utils.py
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitearch}/pgmagick/
%{python_sitearch}/pgmagick-%{version}-py*.egg-info/
%{python_sitearch}/pgmagick
%{python_sitearch}/pgmagick-%{version}.dist-info
%changelog

1
utils.py Normal file
View File

@@ -0,0 +1 @@
MACOSX_FONT = "/System/Library/Fonts/Keyboard.ttf"