Blob Blame History Raw
%global srcname ufoLib
%global pkgname ufolib

Name:           python-%{pkgname}
Version:        2.1.0
Release:        1%{?dist}
Summary:        A low-level UFO reader and writer

License:        BSD
URL:            https://pypi.python.org/pypi/%{srcname}
Source0:        https://github.com/unified-font-object/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz

BuildArch:      noarch

%description
ufoLib reads and writes Unified Font Object (UFO) files. UFO is a file format
that stores fonts source files.

%package -n python2-%{pkgname}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pkgname}}

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python2-pytest
BuildRequires:  python2-pytest-runner
BuildRequires:  python2-fonttools
Requires: python2-fonttools

%description -n python2-%{pkgname}
ufoLib reads and writes Unified Font Object (UFO) files. UFO is a file format
that stores fonts source files.


%package -n python3-%{pkgname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pkgname}}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pytest
BuildRequires:  python3-pytest-runner
BuildRequires:  python3-fonttools
Requires: python3-fonttools

%description -n python3-%{pkgname}
ufoLib reads and writes Unified Font Object (UFO) files. UFO is a file format
that stores fonts source files.


%prep
%autosetup -n %{srcname}-%{version}

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%check
%{__python2} setup.py test
%{__python3} setup.py test

%files -n python2-%{pkgname}
%license LICENSE.txt
%doc README.md
%dir %{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-*.egg-info
%{python2_sitelib}/%{srcname}/*.py*
%{python2_sitelib}/%{srcname}/test

%files -n python3-%{pkgname}
%license LICENSE.txt
%doc README.md
%dir %{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-*.egg-info
%{python3_sitelib}/%{srcname}/*.py
%{python3_sitelib}/%{srcname}/__pycache__
%{python3_sitelib}/%{srcname}/test

%changelog
* Thu May 25 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 2.1.0-1
- New version
- Change link in source, since upstream used a 'v' for the new tag

* Sun Mar 19 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 2.0.0-4
- Rename the package to lowercase
- Use summary tag for subpackages instead of defining one

* Sat Mar 18 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 2.0.0-3
- Own directory under sitelib

* Sat Mar 18 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 2.0.0-2
- Reintroduce testdata

* Sat Mar 18 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 2.0.0-1
- Initial package