Accepting request 122248 from devel:languages:python
Fix .py/.pyc issues OBS-URL: https://build.opensuse.org/request/show/122248 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Cython?expand=0&rev=7
This commit is contained in:
commit
8ff621abd2
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:248123f2f02f2701a28d9452132ac835533b396a273cda9d361cb65c26067edc
|
|
||||||
size 1796536
|
|
3
Cython-0.16.tar.gz
Normal file
3
Cython-0.16.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:971651fc5d3c943b0ecf7bc4df86a977bf62623d94542bf2aaa5f7223697e6fb
|
||||||
|
size 1240372
|
1
python-Cython-rpmlintrc
Normal file
1
python-Cython-rpmlintrc
Normal file
@ -0,0 +1 @@
|
|||||||
|
addFilter('devel-file-in-non-devel-package .*/Cython/Debugger/Tests/cfuncs.c')
|
@ -1,3 +1,26 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 25 07:47:16 UTC 2012 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Fix .py/.pyc issues
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 18 10:52:46 UTC 2012 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Add python 3 package
|
||||||
|
- Clean up spec file formatting
|
||||||
|
- Remove setbadness from rplintrc files
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 23 11:09:29 UTC 2012 - vdziewiecki@suse.com
|
||||||
|
|
||||||
|
-Update to 0.16:
|
||||||
|
http://wiki.cython.org/ReleaseNotes-0.16
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 29 19:07:57 UTC 2012 - pascal.bleser@opensuse.org
|
||||||
|
|
||||||
|
- add rpmlintrc to mask false positives
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 21 12:34:19 UTC 2011 - saschpe@suse.de
|
Wed Sep 21 12:34:19 UTC 2011 - saschpe@suse.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-Cython
|
# spec file for package python-Cython
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -15,24 +15,28 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
%define modname Cython
|
||||||
|
%define binname cython
|
||||||
Name: python-Cython
|
Name: python-%{modname}
|
||||||
Version: 0.15.1
|
Version: 0.16
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://www.cython.org
|
Url: http://www.cython.org
|
||||||
Summary: The Cython compiler for writing C extensions for the Python language
|
Summary: The Cython compiler for writing C extensions for the Python language
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Source: http://pypi.python.org/packages/source/C/Cython/Cython-%{version}.tar.gz
|
Source: http://pypi.python.org/packages/source/C/%{modname}/%{modname}-%{version}.tar.gz
|
||||||
|
Source99: python-Cython-rpmlintrc
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%py_requires
|
%py_requires
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?suse_version} <= 1110
|
||||||
|
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||||
|
%endif
|
||||||
Provides: python-cython = %{version}
|
Provides: python-cython = %{version}
|
||||||
Obsoletes: python-cython < %{version}
|
Obsoletes: python-cython < %{version}
|
||||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Cython language makes writing C extensions for the Python language as
|
The Cython language makes writing C extensions for the Python language as
|
||||||
@ -50,15 +54,19 @@ libraries, and for fast C modules that speed up the execution of Python
|
|||||||
code.
|
code.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n Cython-%{version}
|
%setup -q -n %{modname}-%{version}
|
||||||
sed -i "s/\r//" Demos/{callback/README.txt,callback/cheesefinder.h,embed/Makefile.unix,embed/Makefile.msc.static} Doc/primes.c # Fix EOL encoding
|
sed -i "1d" {Cython/Debugger/libpython,Cython/Debugger/Cygdb,cython}.py # Fix non-executable scripts
|
||||||
sed -i "1d" {Cython/Debugger/libpython,Cython/Debugger/Cygdb,cython}.py # Fix non-excutable scripts
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
|
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
%fdupes -s %{buildroot}
|
||||||
|
# fix EOL encoding
|
||||||
|
sed -i 's/\r$//' Demos/callback/{README.txt,cheesefinder.h}
|
||||||
|
sed -i 's/\r$//' Demos/embed/{Makefile.unix,Makefile.msc.static}
|
||||||
|
sed -i 's/\r$//' Doc/primes.c
|
||||||
|
|
||||||
# Disabled testsuite as it takes a long time:
|
# Disabled testsuite as it takes a long time:
|
||||||
#%%check
|
#%%check
|
||||||
@ -67,7 +75,11 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
|
%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
|
||||||
%{_bindir}/cy*
|
%{_bindir}/cygdb
|
||||||
%{python_sitearch}/*
|
%{_bindir}/%{binname}
|
||||||
|
%{python_sitearch}/%{modname}/
|
||||||
|
%{python_sitearch}/%{modname}-%{version}-py%{py_ver}.egg-info
|
||||||
|
%{python_sitearch}/%{binname}.py*
|
||||||
|
%{python_sitearch}/pyximport/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
1
python3-Cython-rpmlintrc
Normal file
1
python3-Cython-rpmlintrc
Normal file
@ -0,0 +1 @@
|
|||||||
|
addFilter('devel-file-in-non-devel-package .*/Cython/Debugger/Tests/cfuncs.c')
|
12
python3-Cython.changes
Normal file
12
python3-Cython.changes
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 25 07:47:16 UTC 2012 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Fix .py/.pyc issues
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 18 10:52:46 UTC 2012 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Add python 3 package
|
||||||
|
- Clean up spec file formatting
|
||||||
|
- Remove setbadness from rplintrc files
|
||||||
|
|
92
python3-Cython.spec
Normal file
92
python3-Cython.spec
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python3-Cython
|
||||||
|
#
|
||||||
|
# Copyright (c) 2012 SUSE LINUX Products 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/
|
||||||
|
#
|
||||||
|
|
||||||
|
%define modname Cython
|
||||||
|
%define binname cython
|
||||||
|
Name: python3-%{modname}
|
||||||
|
Version: 0.16
|
||||||
|
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: http://pypi.python.org/packages/source/C/%{modname}/%{modname}-%{version}.tar.gz
|
||||||
|
Source99: python-Cython-rpmlintrc
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python3
|
||||||
|
BuildRequires: python3-2to3
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
Requires: python3 >= %{py3_ver}
|
||||||
|
%if 0%{?suse_version} <= 1140
|
||||||
|
%{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||||
|
%{!?py3_ver: %global py3_ver %(python3 -c "import sys; version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]); print(version)" 2>/dev/null || echo PYTHON-NOT-FOUND)}
|
||||||
|
%endif
|
||||||
|
Provides: python3-cython = %{version}
|
||||||
|
Obsoletes: python3-cython < %{version}
|
||||||
|
|
||||||
|
%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 %{modname}-%{version}
|
||||||
|
sed -i "1d" {Cython/Debugger/libpython,Cython/Debugger/Cygdb,cython}.py # Fix non-executable scripts
|
||||||
|
|
||||||
|
%build
|
||||||
|
CFLAGS="%{optflags} -fno-strict-aliasing" python3 setup.py build
|
||||||
|
|
||||||
|
%install
|
||||||
|
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
%if 0%{?suse_version} >= 1210
|
||||||
|
rm -r %{buildroot}%{python3_sitearch}/__pycache__/
|
||||||
|
%endif
|
||||||
|
%fdupes -s %{buildroot}
|
||||||
|
# avoid conflicts with python 2 version
|
||||||
|
mv %{buildroot}%{_bindir}/cygdb %{buildroot}%{_bindir}/cygdb-python3
|
||||||
|
mv %{buildroot}%{_bindir}/%{binname} %{buildroot}%{_bindir}/%{binname}-python3
|
||||||
|
# fix EOL encoding
|
||||||
|
sed -i 's/\r$//' Demos/callback/{README.txt,cheesefinder.h}
|
||||||
|
sed -i 's/\r$//' Demos/embed/{Makefile.unix,Makefile.msc.static}
|
||||||
|
sed -i 's/\r$//' Doc/primes.c
|
||||||
|
|
||||||
|
# Disabled testsuite as it takes a long time:
|
||||||
|
#%%check
|
||||||
|
#python runtests.py
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc COPYING.txt LICENSE.txt README.txt ToDo.txt USAGE.txt Doc Demos
|
||||||
|
%{_bindir}/cygdb-python3
|
||||||
|
%{_bindir}/%{binname}-python3
|
||||||
|
%{python3_sitearch}/%{modname}/
|
||||||
|
%{python3_sitearch}/%{modname}-%{version}-py%{py3_ver}.egg-info
|
||||||
|
%{python3_sitearch}/pyximport/
|
||||||
|
%{python3_sitearch}/%{binname}.py*
|
||||||
|
|
||||||
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user