Blob Blame History Raw
%global forgeurl https://github.com/googlefonts/ots-python/

Name:           python-ots
# Upstream version is kept in sync with opentype-sanitizer
# (https://github.com/khaledhosny/ots), which is normally built and bundled as
# part of the Python wheel build. Similarly, we should update this package
# together with the opentype-sanitizer package in the distribution, ideally as
# a multi-build update.
#
# See https://github.com/googlefonts/ots-python/issues/3 for the process to
# update the source for a new opentype-sanitizer release; send upstream a PR if
# they are lagging.
Version:        8.1.4
%forgemeta
Release:        %autorelease
Summary:        Python wrapper for the OpenType Sanitizer

License:        BSD
URL:            %{forgeurl}
Source0:        %{forgesource}

BuildArch:      noarch

Patch0:         python-ots-8.1.4-no-bundled-executable.patch

BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(wheel)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(pytest)
BuildRequires:  opentype-sanitizer = %{version}

Requires:       opentype-sanitizer = %{version}

%global common_description %{expand:
%{summary}.}

%description %{common_description}


%package -n     python3-ots
Summary:        %{summary}

%description -n python3-ots %{common_description}


%prep
%forgeautosetup -p1


%build
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
%py3_build


%install
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
export BINDIR=%{_bindir}
%py3_install


%check
%pytest


%files -n python3-ots
%license LICENSE
%doc README.md
%{python3_sitelib}/ots
%{python3_sitelib}/opentype_sanitizer-%{version}-py%{python3_version}.egg-info


%changelog
%autochangelog