Skip to content

Commit b8e6a4c

Browse files
committed
alvistack/1.7.4
git clean -xdf tar zcvf ../python-passlib_1.7.4.orig.tar.gz --exclude=.git . debuild -uc -us cp python-passlib.spec ../python-passlib_1.7.4-1.spec cp ../python*-passlib*1.7.4*.{gz,xz,spec,dsc} /osc/home\:alvistack/python-libs-passlib-1.7.4/ rm -rf ../python*-passlib*1.7.4*.* See https://foss.heptapod.net/python-libs/passlib/-/issues/190 See pyca/bcrypt#684 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
1 parent fab9623 commit b8e6a4c

File tree

14 files changed

+224
-2
lines changed

14 files changed

+224
-2
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.egg-info
2+
*.orig
3+
*.rej
4+
.pybuild/
5+
__pycache__

debian/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.substvars
2+
*debhelper*
3+
.debhelper
4+
files
5+
python3-passlib
6+
tmp

debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
python-passlib (100:1.7.4-1) UNRELEASED; urgency=medium
2+
3+
* https://github.com/python-libs/passlib/releases/tag/1.7.4
4+
5+
-- Wong Hoi Sing Edison <[email protected]> Sun, 07 Jan 2024 12:24:45 +0800

debian/control

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Source: python-passlib
2+
Section: python
3+
Priority: optional
4+
Standards-Version: 4.5.0
5+
Maintainer: Wong Hoi Sing Edison <[email protected]>
6+
Homepage: https://foss.heptapod.net/python-libs/passlib/-/tags
7+
Vcs-Browser: https://github.com/alvistack/python-libs-passlib
8+
Vcs-Git: https://github.com/alvistack/python-libs-passlib.git
9+
Build-Depends:
10+
debhelper,
11+
debhelper-compat (= 10),
12+
dh-python,
13+
fdupes,
14+
python3-dev,
15+
python3-setuptools,
16+
17+
Package: python3-passlib
18+
Architecture: all
19+
Description: Comprehensive password hashing framework
20+
Passlib is a password hashing library for Python 3, which provides
21+
cross-platform implementations of over 30 password hashing algorithms,
22+
as well as a framework for managing existing password hashes. It's
23+
designed to be useful for a wide range of tasks, from verifying a hash
24+
found in /etc/shadow, to providing full-strength password hashing for
25+
multi-user application.
26+
Depends:
27+
${misc:Depends},
28+
${shlibs:Depends},
29+
${python3:Depends},
30+
python3,

debian/copyright

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
3+
Files: debian/*
4+
Copyright: 2024 Wong Hoi Sing Edison <[email protected]>
5+
License: Apache-2.0
6+
7+
License: Apache-2.0
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
.
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
.
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
.
20+
The complete text of the Apache version 2.0 license
21+
can be found in "/usr/share/common-licenses/Apache-2.0".

debian/python3-passlib.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/lib/python*/*-packages/*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
python3-passlib: copyright-without-copyright-notice
2+
python3-passlib: initial-upload-closes-no-bugs
3+
python3-passlib: no-manual-page
4+
python3-passlib: zero-byte-file-in-doc-directory

debian/rules

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/make -f
2+
3+
SHELL := /bin/bash
4+
5+
override_dh_auto_install:
6+
dh_auto_install --destdir=debian/tmp
7+
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.pyc' -exec rm -rf {} \;
8+
fdupes -qnrps debian/tmp/usr/lib/python*/*-packages
9+
10+
override_dh_auto_test:
11+
12+
override_dh_auto_clean:
13+
14+
%:
15+
dh $@ --buildsystem=pybuild --with python3

debian/source/format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (quilt)

debian/source/lintian-overrides

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
python-passlib source: file-without-copyright-information
2+
python-passlib source: no-debian-changes
3+
python-passlib source: source-contains-prebuilt-windows-binary
4+
python-passlib source: source-is-missing
5+
python-passlib source: source-package-encodes-python-version

passlib/handlers/bcrypt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def _load_backend_mixin(mixin_cls, name, dryrun):
617617
except ImportError: # pragma: no cover
618618
return False
619619
try:
620-
version = _bcrypt.__about__.__version__
620+
version = getattr(getattr(_bcrypt, '__about__', _bcrypt), '__version__', '<unknown>')
621621
except:
622622
log.warning("(trapped) error reading bcrypt version", exc_info=True)
623623
version = '<unknown>'

python-passlib.spec

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Copyright 2024 Wong Hoi Sing Edison <[email protected]>
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
%global debug_package %{nil}
16+
17+
Name: python-passlib
18+
Epoch: 100
19+
Version: 1.7.4
20+
Release: 1%{?dist}
21+
BuildArch: noarch
22+
Summary: Comprehensive password hashing framework
23+
License: BSD-3-Clause
24+
URL: https://foss.heptapod.net/python-libs/passlib/-/tags
25+
Source0: %{name}_%{version}.orig.tar.gz
26+
BuildRequires: fdupes
27+
BuildRequires: python-rpm-macros
28+
BuildRequires: python3-devel
29+
BuildRequires: python3-setuptools
30+
31+
%description
32+
Passlib is a password hashing library for Python 3, which provides
33+
cross-platform implementations of over 30 password hashing algorithms,
34+
as well as a framework for managing existing password hashes. It's
35+
designed to be useful for a wide range of tasks, from verifying a hash
36+
found in /etc/shadow, to providing full-strength password hashing for
37+
multi-user application.
38+
39+
%prep
40+
%autosetup -T -c -n %{name}_%{version}-%{release}
41+
tar -zx -f %{S:0} --strip-components=1 -C .
42+
43+
%build
44+
%py3_build
45+
46+
%install
47+
%py3_install
48+
find %{buildroot}%{python3_sitelib} -type f -name '*.pyc' -exec rm -rf {} \;
49+
fdupes -qnrps %{buildroot}%{python3_sitelib}
50+
51+
%check
52+
53+
%if 0%{?suse_version} > 1500
54+
%package -n python%{python3_version_nodots}-passlib
55+
Summary: Comprehensive password hashing framework
56+
Requires: python3
57+
Provides: python3-passlib = %{epoch}:%{version}-%{release}
58+
Provides: python3dist(passlib) = %{epoch}:%{version}-%{release}
59+
Provides: python%{python3_version}-passlib = %{epoch}:%{version}-%{release}
60+
Provides: python%{python3_version}dist(passlib) = %{epoch}:%{version}-%{release}
61+
Provides: python%{python3_version_nodots}-passlib = %{epoch}:%{version}-%{release}
62+
Provides: python%{python3_version_nodots}dist(passlib) = %{epoch}:%{version}-%{release}
63+
64+
%description -n python%{python3_version_nodots}-passlib
65+
Passlib is a password hashing library for Python 3, which provides
66+
cross-platform implementations of over 30 password hashing algorithms,
67+
as well as a framework for managing existing password hashes. It's
68+
designed to be useful for a wide range of tasks, from verifying a hash
69+
found in /etc/shadow, to providing full-strength password hashing for
70+
multi-user application.
71+
72+
%files -n python%{python3_version_nodots}-passlib
73+
%license LICENSE
74+
%{python3_sitelib}/*
75+
%endif
76+
77+
%if 0%{?sle_version} > 150000
78+
%package -n python3-passlib
79+
Summary: Comprehensive password hashing framework
80+
Requires: python3
81+
Provides: python3-passlib = %{epoch}:%{version}-%{release}
82+
Provides: python3dist(passlib) = %{epoch}:%{version}-%{release}
83+
Provides: python%{python3_version}-passlib = %{epoch}:%{version}-%{release}
84+
Provides: python%{python3_version}dist(passlib) = %{epoch}:%{version}-%{release}
85+
Provides: python%{python3_version_nodots}-passlib = %{epoch}:%{version}-%{release}
86+
Provides: python%{python3_version_nodots}dist(passlib) = %{epoch}:%{version}-%{release}
87+
88+
%description -n python3-passlib
89+
Passlib is a password hashing library for Python 3, which provides
90+
cross-platform implementations of over 30 password hashing algorithms,
91+
as well as a framework for managing existing password hashes. It's
92+
designed to be useful for a wide range of tasks, from verifying a hash
93+
found in /etc/shadow, to providing full-strength password hashing for
94+
multi-user application.
95+
96+
%files -n python3-passlib
97+
%license LICENSE
98+
%{python3_sitelib}/*
99+
%endif
100+
101+
%if !(0%{?suse_version} > 1500) && !(0%{?sle_version} > 150000)
102+
%package -n python3-passlib
103+
Summary: Comprehensive password hashing framework
104+
Requires: python3
105+
Provides: python3-passlib = %{epoch}:%{version}-%{release}
106+
Provides: python3dist(passlib) = %{epoch}:%{version}-%{release}
107+
Provides: python%{python3_version}-passlib = %{epoch}:%{version}-%{release}
108+
Provides: python%{python3_version}dist(passlib) = %{epoch}:%{version}-%{release}
109+
Provides: python%{python3_version_nodots}-passlib = %{epoch}:%{version}-%{release}
110+
Provides: python%{python3_version_nodots}dist(passlib) = %{epoch}:%{version}-%{release}
111+
112+
%description -n python3-passlib
113+
Passlib is a password hashing library for Python 3, which provides
114+
cross-platform implementations of over 30 password hashing algorithms,
115+
as well as a framework for managing existing password hashes. It's
116+
designed to be useful for a wide range of tasks, from verifying a hash
117+
found in /etc/shadow, to providing full-strength password hashing for
118+
multi-user application.
119+
120+
%files -n python3-passlib
121+
%license LICENSE
122+
%{python3_sitelib}/*
123+
%endif
124+
125+
%changelog

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ upload_dir = build/sphinx/html
77
[bdist_wheel]
88
universal = 1
99

10+
[egg_info]
11+
tag_build =
12+
tag_date = 0
13+

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
from passlib import __version__ as version
146146

147147
# append hg revision to builds
148-
stamp_build = True # NOTE: modified by stamp_distutils_output()
148+
stamp_build = False
149149
if stamp_build:
150150
from passlib._setup.stamp import (
151151
as_bool, append_hg_revision, stamp_distutils_output,

0 commit comments

Comments
 (0)