diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..578b369 --- /dev/null +++ b/Makefile @@ -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 diff --git a/python-pgmagick.changes b/python-pgmagick.changes index 1ff7288..aa6e46a 100644 --- a/python-pgmagick.changes +++ b/python-pgmagick.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 21 05:54:25 UTC 2024 - Steve Kowalik + +- 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 diff --git a/python-pgmagick.spec b/python-pgmagick.spec index 04b919a..116504b 100644 --- a/python-pgmagick.spec +++ b/python-pgmagick.spec @@ -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 diff --git a/utils.py b/utils.py new file mode 100644 index 0000000..9f6633e --- /dev/null +++ b/utils.py @@ -0,0 +1 @@ +MACOSX_FONT = "/System/Library/Fonts/Keyboard.ttf"