[python-ly] Initial import.

Jon Ciesla limb at fedoraproject.org
Tue Mar 17 13:11:24 UTC 2015


commit 7934885fd91f2702dd753f6be9153a6e3d3da02a
Author: Jon Ciesla <limburgher at gmail.com>
Date:   Tue Mar 17 08:08:55 2015 -0500

    Initial import.

 .gitignore               |   1 +
 python-ly-shebangs.patch |  16 +++++++
 python-ly.spec           | 106 +++++++++++++++++++++++++++++++++++++++++++++++
 sources                  |   1 +
 4 files changed, 124 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2dbc8c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/python-ly-0.9.1.tar.gz
diff --git a/python-ly-shebangs.patch b/python-ly-shebangs.patch
new file mode 100644
index 0000000..1db96ae
--- /dev/null
+++ b/python-ly-shebangs.patch
@@ -0,0 +1,16 @@
+diff -r -U3 python-ly-0.9.1.orig/ly/data/_lilypond_data.py python-ly-0.9.1/ly/data/_lilypond_data.py
+--- python-ly-0.9.1.orig/ly/data/_lilypond_data.py	2015-03-08 00:35:44.000000000 -0600
++++ python-ly-0.9.1/ly/data/_lilypond_data.py	2015-03-09 08:33:37.600476577 -0500
+@@ -1,4 +1,3 @@
+-#! python
+ # generated by LilyPond 2.18.2
+ 
+ version = "2.18.2"
+diff -r -U3 python-ly-0.9.1.orig/ly/data/_scheme_data.py python-ly-0.9.1/ly/data/_scheme_data.py
+--- python-ly-0.9.1.orig/ly/data/_scheme_data.py	2015-01-24 14:37:43.000000000 -0600
++++ python-ly-0.9.1/ly/data/_scheme_data.py	2015-03-09 08:33:44.803476775 -0500
+@@ -1,4 +1,3 @@
+-#! python
+ #generated by makeschemedata.py
+ 
+ version="2.17"
diff --git a/python-ly.spec b/python-ly.spec
new file mode 100644
index 0000000..d87991f
--- /dev/null
+++ b/python-ly.spec
@@ -0,0 +1,106 @@
+%{!?python3_version: %global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")}
+
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%endif
+
+Name:           python-ly
+Version:        0.9.1
+Release:        2%{?dist}
+Summary:        Tool and library for manipulating LilyPond files
+
+Group:          Development/Languages
+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
+Patch0:         python-ly-shebangs.patch
+
+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
+
+%patch0 -p1
+
+%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}
+
+sed -i s/python3/python2/g %{buildroot}%{_bindir}/ly
+
+
+%files
+%doc ChangeLog README.rst doc/build/html/
+%{_bindir}/ly
+%{python2_sitelib}/*
+
+%if 0%{?with_python3}
+%files -n python3-ly
+%doc ChangeLog README.rst doc/build/html/
+%{python3_sitelib}/*
+%endif
+
+%changelog
+* Mon Mar 16 2015 Jon Ciesla <limburgher at gmail.com> - 0.9.1-2
+- Spec cleanup from review, macro usage and docs building.
+
+* Mon Mar 09 2015 Jon Ciesla <limburgher at gmail.com> - 0.9.1-1
+- Initial RPM release
diff --git a/sources b/sources
index e69de29..9e5cd04 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a412a8037db6895b94ae9489c8b6cf12  python-ly-0.9.1.tar.gz


More information about the scm-commits mailing list