Skip to content

Commit

Permalink
alvistack/3.0.8
Browse files Browse the repository at this point in the history
    git clean -xdf
    tar zcvf ../python-cython_3.0.8.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-cython.spec ../python-cython_3.0.8-1.spec
    cp ../python*-cython*3.0.8*.{gz,xz,spec,dsc} /osc/home\:alvistack/cython-cython-3.0.8/
    rm -rf ../python*-cython*3.0.8*.* ../cython3*3.0.8*.*

See cython#6039

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
  • Loading branch information
hswong3i committed Feb 28, 2024
1 parent a1b79a6 commit 7d01be4
Show file tree
Hide file tree
Showing 12 changed files with 243 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ MANIFEST

# Visual Studio Code files
.vscode

.pybuild/
6 changes: 6 additions & 0 deletions Cython/Compiler/ExprNodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6512,7 +6512,13 @@ def generate_result_code(self, code):
goto_error = code.error_goto_if(" && ".join(exc_checks), self.pos)
else:
goto_error = ""
if self.function.is_attribute and self.function.entry and self.function.entry.final_func_cname:
# Hack around https://github.com/cython/cython/issues/2747
# Disable GCC warnings/errors for wrong self casts.
code.putln('#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"')
code.putln("%s%s; %s" % (lhs, rhs, goto_error))
if self.function.is_attribute and self.function.entry and self.function.entry.final_func_cname:
code.putln("#pragma GCC diagnostic pop")
if self.type.is_pyobject and self.result():
self.generate_gotref(code)
if self.has_optional_args:
Expand Down
6 changes: 6 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.substvars
*debhelper*
.debhelper
files
cython3
tmp
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python-cython (100:3.0.8-1) UNRELEASED; urgency=medium

* https://github.com/cython/cython/releases/tag/3.0.8

-- Wong Hoi Sing Edison <hswong3i@pantarei-design.com> Wed, 10 Jan 2024 16:35:35 +0800
33 changes: 33 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Source: python-cython
Section: python
Priority: optional
Standards-Version: 4.5.0
Maintainer: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Homepage: https://github.com/cython/cython/tags
Vcs-Browser: https://github.com/alvistack/cython-cython
Vcs-Git: https://github.com/alvistack/cython-cython.git
Build-Depends:
debhelper,
debhelper-compat (= 10),
dh-python,
fdupes,
python3-dev,
python3-setuptools,

Package: cython3
Architecture: amd64
Description: Cython compiler for writing C extensions for the Python language
The Cython language allows for writing C extensions for the Python
language. Cython is a source code translator based on Pyrex, but
supports more cutting edge functionality and optimizations.
Depends:
${misc:Depends},
${shlibs:Depends},
${python3:Depends},
python3,
Provides:
python3-cython3
Breaks:
cython0,
Replaces:
cython0,
21 changes: 21 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Files: debian/*
Copyright: 2024 Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
License: Apache-2.0

License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
The complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".
2 changes: 2 additions & 0 deletions debian/cython3.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/bin/*
usr/lib/python*/*-packages/*
4 changes: 4 additions & 0 deletions debian/cython3.lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cython3: copyright-without-copyright-notice
cython3: initial-upload-closes-no-bugs
cython3: no-manual-page
cython3: zero-byte-file-in-doc-directory
15 changes: 15 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/make -f

SHELL := /bin/bash

override_dh_auto_install:
dh_auto_install --destdir=debian/tmp
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.pyc' -exec rm -rf {} \;
fdupes -qnrps debian/tmp/usr/lib/python*/*-packages

override_dh_auto_test:

override_dh_auto_clean:

%:
dh $@ --buildsystem=pybuild --with python3
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
5 changes: 5 additions & 0 deletions debian/source/lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python-cython source: file-without-copyright-information
python-cython source: no-debian-changes
python-cython source: source-contains-prebuilt-windows-binary
python-cython source: source-is-missing
python-cython source: source-package-encodes-python-version
143 changes: 143 additions & 0 deletions python-cython.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Copyright 2024 Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

%global debug_package %{nil}

%global source_date_epoch_from_changelog 0

Name: python-cython
Epoch: 100
Version: 3.0.8
Release: 1%{?dist}
Summary: Cython compiler for writing C extensions for the Python language
License: Apache-2.0
URL: https://github.com/cython/cython/tags
Source0: %{name}_%{version}.orig.tar.gz
%if 0%{?rhel} == 7
BuildRequires: devtoolset-11
BuildRequires: devtoolset-11-gcc
BuildRequires: devtoolset-11-gcc-c++
BuildRequires: devtoolset-11-libatomic-devel
%endif
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: python-rpm-macros
BuildRequires: python3-devel
BuildRequires: python3-setuptools

%description
The Cython language allows for writing C extensions for the Python
language. Cython is a source code translator based on Pyrex, but
supports more cutting edge functionality and optimizations.

%prep
%autosetup -T -c -n %{name}_%{version}-%{release}
tar -zx -f %{S:0} --strip-components=1 -C .

%build
%if 0%{?rhel} == 7
. /opt/rh/devtoolset-11/enable
%endif
%py3_build

%install
%py3_install
find %{buildroot}%{python3_sitearch} -type f -name '*.pyc' -exec rm -rf {} \;
fdupes -qnrps %{buildroot}%{python3_sitearch}

%check

%if 0%{?suse_version} > 1500 || 0%{?rhel} == 7
%package -n python%{python3_version_nodots}-Cython
Summary: Cython compiler for writing C extensions for the Python language
Requires: python3
Provides: python3-Cython = %{epoch}:%{version}-%{release}
Provides: python3dist(Cython) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-Cython = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(Cython) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-Cython = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(Cython) = %{epoch}:%{version}-%{release}
Provides: python3-Cython3 = %{epoch}:%{version}-%{release}
Provides: python3dist(Cython3) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-Cython3 = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(Cython3) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-Cython3 = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(Cython3) = %{epoch}:%{version}-%{release}
Provides: python3-Cython-devel = %{epoch}:%{version}-%{release}
Provides: python3dist(Cython-devel) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-Cython-devel = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(Cython-devel) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-Cython-devel = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(Cython-devel) = %{epoch}:%{version}-%{release}
Provides: python3-Cython3-devel = %{epoch}:%{version}-%{release}
Provides: python3dist(Cython3-devel) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-Cython3-devel = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(Cython3-devel) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-Cython3-devel = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(Cython3-devel) = %{epoch}:%{version}-%{release}
Obsoletes: python%{python3_version_nodots}-Cython0

%description -n python%{python3_version_nodots}-Cython
The Cython language allows for writing C extensions for the Python
language. Cython is a source code translator based on Pyrex, but
supports more cutting edge functionality and optimizations.

%files -n python%{python3_version_nodots}-Cython
%license LICENSE.txt
%{_bindir}/*
%{python3_sitearch}/*
%endif

%if !(0%{?suse_version} > 1500) && !(0%{?rhel} == 7)
%package -n python3-Cython
Summary: Cython compiler for writing C extensions for the Python language
Requires: python3
Provides: python3-Cython = %{epoch}:%{version}-%{release}
Provides: python3dist(Cython) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-Cython = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(Cython) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-Cython = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(Cython) = %{epoch}:%{version}-%{release}
Provides: python3-Cython3 = %{epoch}:%{version}-%{release}
Provides: python3dist(Cython3) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-Cython3 = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(Cython3) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-Cython3 = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(Cython3) = %{epoch}:%{version}-%{release}
Provides: python3-Cython-devel = %{epoch}:%{version}-%{release}
Provides: python3dist(Cython-devel) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-Cython-devel = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(Cython-devel) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-Cython-devel = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(Cython-devel) = %{epoch}:%{version}-%{release}
Provides: python3-Cython3-devel = %{epoch}:%{version}-%{release}
Provides: python3dist(Cython3-devel) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-Cython3-devel = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(Cython3-devel) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-Cython3-devel = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(Cython3-devel) = %{epoch}:%{version}-%{release}
Obsoletes: python3-Cython0

%description -n python3-Cython
The Cython language allows for writing C extensions for the Python
language. Cython is a source code translator based on Pyrex, but
supports more cutting edge functionality and optimizations.

%files -n python3-Cython
%license LICENSE.txt
%{_bindir}/*
%{python3_sitearch}/*
%endif

%changelog

0 comments on commit 7d01be4

Please sign in to comment.