Blob Blame History Raw
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
%global with_python3 1
%endif

Name:           python-ly
Version:        0.9.5
Release:        3%{?dist}
Summary:        Tool and library for manipulating LilyPond files

License:        GPLv2+
URL:            https://pypi.python.org/pypi/python-ly
Source0:        https://pypi.python.org/packages/source/p/python-ly/python-ly-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-sphinx
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
BuildRequires: python-setuptools
Requires:       python-setuptools
Requires:       tkinter

%description
This package provides a Python library ly containing various Python modules
to parse, manipulate or create documents in LilyPond format. A command line
program ly is also provided that can be used to do various manipulations
with LilyPond files.

%if 0%{?with_python3}
%package -n python3-ly
Summary:        Tool and library for manipulating LilyPond files
Group:          Development/Languages
Requires:       python3-setuptools
Requires:       python3-tkinter

%description -n python3-ly
This package provides a Python library ly containing various Python modules
to parse, manipulate or create documents in LilyPond format. A command line
program ly is also provided that can be used to do various manipulations
with LilyPond files.

This package allows for use of python-ly with Python 3.
%endif # with_python3

%prep
%setup -q

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3

%build
%{__python2} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3

pushd doc
make html
popd

%install
# Must do the python3 install first because the scripts in /usr/bin are
# overwritten with every setup.py install (and we want the python2 version
# to be the default for now).
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif # with_python3

%{__python2} setup.py install --skip-build --root %{buildroot} \
           --install-data=%{_datadir}


%files
%doc ChangeLog README.rst doc/build/html/
%{python2_sitelib}/*

%if 0%{?with_python3}
%files -n python3-ly
%doc ChangeLog README.rst doc/build/html/
%{_bindir}/ly
%{_bindir}/ly-server
%{python3_sitelib}/*
%endif

%changelog
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon Jun 19 2017 Gwyn Ciesla <limburgher@gmail.com> - 0.9.5-2
- Ship binaries in python3, not python2, BZ 1437182.

* Tue Feb 21 2017 Jon Ciesla <limburgher@gmail.com> - 0.9.5-1
- 0.9.5

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.9.4-4
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Fri Apr 22 2016 Jon Ciesla <limburgher@gmail.com> - 0.9.4-2
- Fix requires, BZ 1329556.

* Wed Apr 20 2016 Jon Ciesla <limburgher@gmail.com> - 0.9.4-1
- 0.9.4, BZ 1328650.

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 08 2016 Jon Ciesla <limburgher@gmail.com> - 0.9.3-1
- 0.9.3, BZ 1296741.

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri May 15 2015 Jon Ciesla <limburgher@gmail.com> - 0.9.2-1
- 0.9.2, BZ 1221840.
- Shebangs patch upstreamed.

* Mon Mar 16 2015 Jon Ciesla <limburgher@gmail.com> - 0.9.1-2
- Spec cleanup from review, macro usage and docs building.

* Mon Mar 09 2015 Jon Ciesla <limburgher@gmail.com> - 0.9.1-1
- Initial RPM release