Skip to content

Commit

Permalink
alvistack/v0.20
Browse files Browse the repository at this point in the history
    git clean -xdf
    tar zcvf ../python-immutables_0.20.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-immutables.spec ../python-immutables_0.20-1.spec
    cp ../python*-immutables*0.20*.{gz,xz,spec,dsc} /osc/home\:alvistack/MagicStack-immutables-0.20/
    rm -rf ../python*-immutables*0.20*.*

See MagicStack#118

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
  • Loading branch information
hswong3i committed Jun 13, 2024
1 parent 4ccb970 commit 2b4e4a7
Show file tree
Hide file tree
Showing 12 changed files with 177 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ __pycache__/
/.mypy_cache
/.venv*
/wheelhouse
.pybuild
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
python3-immutables
tmp
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python-immutables (100:0.20-1) UNRELEASED; urgency=medium

* https://github.com/MagicStack/immutables/releases/tag/v0.20

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

Package: python3-immutables
Architecture: amd64
Description: Immutable Collections
An immutable mapping type for Python.
Depends:
${misc:Depends},
${shlibs:Depends},
${python3:Depends},
python3,
python3-typing-extensions (>= 3.7.4.3),
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".
1 change: 1 addition & 0 deletions debian/python3-immutables.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/lib/python*/*-packages/*
4 changes: 4 additions & 0 deletions debian/python3-immutables.lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python3-immutables: copyright-without-copyright-notice
python3-immutables: initial-upload-closes-no-bugs
python3-immutables: no-manual-page
python3-immutables: 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-immutables source: file-without-copyright-information
python-immutables source: no-debian-changes
python-immutables source: source-contains-prebuilt-windows-binary
python-immutables source: source-is-missing
python-immutables source: source-package-encodes-python-version
2 changes: 1 addition & 1 deletion immutables/_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ map_node_bitmap_dump(MapNode_Bitmap *node,
if (tmp1 == NULL) {
goto error;
}
tmp2 = _PyLong_Format(tmp1, 2);
tmp2 = PyNumber_ToBase(tmp1, 2);
Py_DECREF(tmp1);
if (tmp2 == NULL) {
goto error;
Expand Down
90 changes: 90 additions & 0 deletions python-immutables.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# 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-immutables
Epoch: 100
Version: 0.20
Release: 1%{?dist}
Summary: Immutable Collections
License: Apache-2.0
URL: https://github.com/MagicStack/immutables/tags
Source0: %{name}_%{version}.orig.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-Cython3
BuildRequires: python3-devel
BuildRequires: python3-setuptools

%description
An immutable mapping type for Python.

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

%build
%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
%package -n python%{python3_version_nodots}-immutables
Summary: Immutable Collections
Requires: python3
Requires: python3-typing-extensions >= 3.7.4.3
Provides: python3-immutables = %{epoch}:%{version}-%{release}
Provides: python3dist(immutables) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-immutables = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(immutables) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-immutables = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(immutables) = %{epoch}:%{version}-%{release}

%description -n python%{python3_version_nodots}-immutables
An immutable mapping type for Python.

%files -n python%{python3_version_nodots}-immutables
%license LICENSE
%{python3_sitearch}/*
%endif

%if !(0%{?suse_version} > 1500)
%package -n python3-immutables
Summary: Immutable Collections
Requires: python3
Requires: python3-typing-extensions >= 3.7.4.3
Provides: python3-immutables = %{epoch}:%{version}-%{release}
Provides: python3dist(immutables) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}-immutables = %{epoch}:%{version}-%{release}
Provides: python%{python3_version}dist(immutables) = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}-immutables = %{epoch}:%{version}-%{release}
Provides: python%{python3_version_nodots}dist(immutables) = %{epoch}:%{version}-%{release}

%description -n python3-immutables
An immutable mapping type for Python.

%files -n python3-immutables
%license LICENSE
%{python3_sitearch}/*
%endif

%changelog

0 comments on commit 2b4e4a7

Please sign in to comment.