Blob Blame History Raw
%global pypi_name freetype-py

Name:           python-freetype
Version:        2.4.0
Release:        %autorelease
Summary:        Python binding for the freetype library

License:        BSD-3-Clause
Source0:        %{pypi_source %{pypi_name} %{version} zip}

BuildArch:      noarch
BuildRequires:  python3-devel
# tests use tox
BuildRequires:  python3dist(tox-current-env)
BuildRequires:  python3dist(pytest)

BuildRequires:  freetype

Freetype Python provides bindings for the FreeType library. Only the high-level
API is bound.

%package -n     python3-freetype
Summary:        %{summary}
%py_provides python3-freetype

%description -n python3-freetype

%autosetup -n %{pypi_name}-%{version}

%py3_shebang_fix freetype/*.py
%py3_shebang_fix examples/*.py

rm -r freetype_py.egg-info

sed -i 's/"setuptools_scm\[toml\]>=3.4",//' pyproject.toml
sed -i 's/"certifi",//' pyproject.toml
sed -i 's/"cmake"//' pyproject.toml



%pyproject_save_files freetype


%files -n python3-freetype -f %{pyproject_files}
%doc examples README.rst