17
0
Files
python-FontTools/python-FontTools.spec
OBS User mrdocs d9a8be9130 Accepting request 595994 from home:tiwai:branches:M17N
- add fonttools-disable_failing_tests_bigendian.patch
  disable two tests currently failing on bigendian archs

OBS-URL: https://build.opensuse.org/request/show/595994
OBS-URL: https://build.opensuse.org/package/show/M17N/python-FontTools?expand=0&rev=5
2018-04-12 18:13:34 +00:00

117 lines
3.5 KiB
RPMSpec

#
# spec file for package python-FontTools
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-FontTools
Version: 3.24.1
Release: 0
Summary: Suite of Tools and Libraries for Manipulating Fonts
License: MIT AND OFL-1.1
Group: Development/Languages/Python
Url: http://github.com/fonttools/fonttools
Source: https://files.pythonhosted.org/packages/source/F/FontTools/fonttools-%{version}.zip
Patch0: fonttools-disable_failing_tests_bigendian.patch
BuildRequires: %{python_module devel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
%if %{with test}
BuildRequires: %{python_module brotlipy}
BuildRequires: %{python_module munkres}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest >= 3.0}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module reportlab}
BuildRequires: %{python_module scipy}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tox}
%endif
Recommends: python-brotlipy
Recommends: python-munkres
Recommends: python-numpy
Recommends: python-reportlab
Recommends: python-scipy
Recommends: python-sympy
BuildArch: noarch
%ifpython3
Conflicts: fonttools < %{version}
Recommends: fonttools = %{version}
%endif
%python_subpackages
%description
FontTools is a suite of tools and libraries for manipulating fonts
written in Python.
It currently reads and writes TrueType font files, reads PostScript
Type 1 fonts, and more. It contains two command line programs to
convert TrueType fonts to an XML based format (called TTX) and back.
%package -n fonttools
Summary: Suite of Tools and Libraries for Manipulating Fonts
Group: Productivity/Graphics/Vector Editors
Requires: python3-FontTools
%description -n fonttools
FontTools is a suite of tools and libraries for manipulating fonts
written in Python.
It currently reads and writes TrueType font files, reads PostScript
Type 1 fonts, and more. It contains two command line programs to
convert TrueType fonts to an XML based format (called TTX) and back.
%prep
%setup -q -n fonttools-%{version}
case `uname -m` in
ppc|ppc64|s390|s390x)
%patch0 -p1
;;
esac
# Remove shebang
sed -i -e '/^#!\//, 1d' Lib/fontTools/mtiLib/__init__.py
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
export LANG=en_US.UTF-8
%python_exec setup.py test
%endif
%files %{python_files}
%doc LICENSE LICENSE.external README.rst NEWS.rst
%{python_sitelib}/*
%files -n fonttools
%doc LICENSE LICENSE.external README.rst NEWS.rst
%{_bindir}/fonttools
%{_bindir}/pyftinspect
%{_bindir}/pyftmerge
%{_bindir}/pyftsubset
%{_bindir}/ttx
%{_mandir}/man1/ttx.1%{ext_man}
%changelog