[Tizen-submit] 21246: New package Tizen:IVI/python-cython

noreply at tizen.org noreply at tizen.org
Thu Feb 13 08:33:16 GMT 2014


Hi,
Adding new package python-cython in project Tizen:IVI. Please review and accept ASAP.

Justification for this new package:

Submitter: Ronan Le Martret <ronan at fridu.net>
Comments: Add cython to Tizen:Generic.
Git project: platform/upstream/python-cython
Tag: submit/tizen/20140213.083236
Commit: 81337cc58f1036fa314aa1c76ef79502cf6e7f05 workaround: remove dependency on xml.sax.saxutils

Thank You,
Ronan Le Martret

[This message was auto-generated]

---

Request: #21246

  submit:       Tizen:IVI:build/python-cython(cleanup) -> Tizen:IVI


Message:
Submitter: Ronan Le Martret <ronan at fridu.net>
Comments: Add cython to Tizen:Generic.
Git project: platform/upstream/python-cython
Tag: submit/tizen/20140213.083236
Commit: 81337cc58f1036fa314aa1c76ef79502cf6e7f05 workaround: remove dependency on xml.sax.saxutils

State:   new        2014-02-13T08:31:35 tizenrobot
Comment: <no comment>
new:
----
  0001-workaround-remove-dependency-on-xml.sax.saxutils.patch
  python-cython-0.20.tar.gz
  python-cython.spec

spec files:
-----------

++++++ new spec file:
--- python-cython.spec
+++ python-cython.spec
@@ -0,0 +1,91 @@
+Name:           python-cython
+VCS:            platform/upstream/python-cython#81337cc58f1036fa314aa1c76ef79502cf6e7f05
+Version:        0.20
+Release:        0
+Url:            http://www.cython.org
+Summary:        The Cython compiler for writing C extensions for the Python language
+License:        Apache-2.0
+Group:          Development/Languages/Python
+
+Source:         %{name}-%{version}.tar.gz
+# Patches auto-generated by git-buildpackage:
+Patch0:         0001-workaround-remove-dependency-on-xml.sax.saxutils.patch
+BuildRequires:  fdupes
+BuildRequires:  python-devel
+Provides:       python-cython = %{version}
+Obsoletes:      python-cython < %{version}
+Requires:       python-xml
+Requires:       python-libxml2
+Requires:       python-lxml
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
+
+
+%description
+The Cython language makes writing C extensions for the Python language as
+easy as Python itself.  Cython is a source code translator based on the
+well-known Pyrex, but supports more cutting edge functionality and
+optimizations.
+
+The Cython language is very close to the Python language (and most Python
+code is also valid Cython code), but Cython additionally supports calling C
+functions and declaring C types on variables and class attributes. This
+allows the compiler to generate very efficient C code from Cython code.
+
+This makes Cython the ideal language for writing glue code for external C
+libraries, and for fast C modules that speed up the execution of Python
+code.
+
+%prep
+%setup -q -n Cython-%{version}
+# 0001-workaround-remove-dependency-on-xml.sax.saxutils.patch
+%patch0 -p1
+sed -i "s|^#!.*||" Cython/Debugger/{libpython,Cygdb}.py cython.py # Fix non-executable scripts
+sed -i "s|\r||" Demos/callback/{README.txt,cheesefinder.h} Demos/embed/Makefile.{unix,msc.static} Doc/primes.c # Fix EOL encoding
+mv bin/cython bin/cython-%{py_ver}
+mv bin/cygdb bin/cygdb-%{py_ver}
+sed -i "s|bin/cython|bin/cython-%{py_ver}|" setup.py
+sed -i "s|bin/cygdb|bin/cygdb-%{py_ver}|" setup.py
+
+%build
+CFLAGS="%{optflags}" python setup.py build
+
+%install
+python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+ln -s  %{_bindir}/cython-%{py_ver} %{buildroot}%{_bindir}/cython
+ln -s  %{_bindir}/cygdb-%{py_ver} %{buildroot}%{_bindir}/cygdb
+%fdupes -s %{buildroot}%{python_sitearch} %{buildroot}%{_docdir}
+
+%pre
+# Since /usr/bin/cython and /usr/bin/cygdb became ghosted to be used with update-alternatives, we have to get rid
+# of the old binary resulting from the non-update-alternativies-ified package:
+[[ ! -L %{_bindir}/cygdb ]] && rm -f %{_bindir}/cygdb
+[[ ! -L %{_bindir}/cython ]] && rm -f %{_bindir}/cython
+exit 0
+
+%post
+update-alternatives \
+   --install %{_bindir}/cython cython %{_bindir}/cython-%{py_ver} 30 \
+   --slave %{_bindir}/cygdb cygdb %{_bindir}/cygdb-%{py_ver}
+
+%preun
+if [ $1 -eq 0 ] ; then
+    update-alternatives --remove cython %{_bindir}/cython-%{py_ver}

Please refer to OBS webUI for more details about this SR.


More information about the Tizen-submit mailing list