764d5aa
%global modname bcrypt
764d5aa
%global sum     Modern password hashing for your software and your servers
764d5aa
764d5aa
Name:               python-bcrypt
c4ef33c
Version:            4.1.2
b1fcc5f
Release:            %autorelease
764d5aa
Summary:            %{sum}
764d5aa
097e134
#crypt_blowfish code is in Public domain and all other code in ASL 2.0
d170fd9
License:            Apache-2.0 AND LicenseRef-Fedora-Public-Domain
764d5aa
URL:                http://pypi.python.org/pypi/bcrypt
adaf6e5
Source0:            %pypi_source bcrypt
764d5aa
764d5aa
%description
2cdd5f7
%{sum}.
764d5aa
764d5aa
d170fd9
%package -n python3-%{modname}
2cdd5f7
Summary:            %{sum}
d170fd9
# LICENSE.dependencies contains a full license breakdown
38c4980
License:            Apache-2.0 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause AND MIT AND (Apache-2.0 OR MIT) AND (Unlicense OR MIT)
d170fd9
BuildRequires:      python3-devel
d170fd9
BuildRequires:      rust-packaging
764d5aa
d170fd9
%description -n python3-%{modname}
2cdd5f7
%{sum}.
764d5aa
764d5aa
764d5aa
%prep
d170fd9
%autosetup -n %{modname}-%{version} -p1
d170fd9
%cargo_prep
d170fd9
rm src/_bcrypt/Cargo.lock
d170fd9
d170fd9
%generate_buildrequires
d170fd9
%pyproject_buildrequires -t
d170fd9
(cd src/_bcrypt
d170fd9
%cargo_generate_buildrequires
d170fd9
)
d170fd9
764d5aa
764d5aa
%build
d170fd9
export RUSTFLAGS="%build_rustflags"
d170fd9
%pyproject_wheel
d170fd9
d170fd9
(cd src/_bcrypt
d170fd9
%cargo_license_summary
d170fd9
%{cargo_license} > ../../LICENSE.dependencies
d170fd9
)
d170fd9
764d5aa
764d5aa
%install
d170fd9
%pyproject_install
d170fd9
%pyproject_save_files bcrypt
1e20a3a
764d5aa
3ec4679
%check
d170fd9
%tox
1e20a3a
764d5aa
d170fd9
%files -n python%{python3_pkgversion}-%{modname} -f %{pyproject_files}
764d5aa
%doc README.rst
d170fd9
%license LICENSE LICENSE.dependencies
764d5aa
764d5aa
764d5aa
%changelog
9f05377
%autochangelog