78ff4d0
Name:           python-stripe
981b483
Version:        8.3.0
8471b3d
Release:        %autorelease
78ff4d0
Summary:        Python library for the Stripe API
78ff4d0
78ff4d0
License:        MIT
78ff4d0
URL:            https://github.com/stripe/stripe-python
78ff4d0
Source0:        %{url}/archive/v%{version}/stripe-python-%{version}.tar.gz
78ff4d0
78ff4d0
BuildArch:      noarch
78ff4d0
BuildRequires:  python3-devel
78ff4d0
78ff4d0
%global _description %{expand:
78ff4d0
The Stripe Python library provides convenient access to the Stripe API from
78ff4d0
applications written in the Python language. It includes a pre-defined set of
78ff4d0
classes for API resources that initialize themselves dynamically from API
78ff4d0
responses which makes it compatible with a wide range of versions of the
78ff4d0
Stripe API.}
78ff4d0
78ff4d0
%description %_description
78ff4d0
78ff4d0
%package -n python3-stripe
78ff4d0
Summary:        %{summary}
78ff4d0
78ff4d0
%description -n python3-stripe %_description
78ff4d0
78ff4d0
78ff4d0
%prep
78ff4d0
%autosetup -p1 -n stripe-python-%{version}
78ff4d0
78ff4d0
78ff4d0
%generate_buildrequires
78ff4d0
%pyproject_buildrequires -r
78ff4d0
78ff4d0
78ff4d0
%build
78ff4d0
%pyproject_wheel
78ff4d0
78ff4d0
78ff4d0
%install
78ff4d0
%pyproject_install
78ff4d0
%pyproject_save_files stripe
78ff4d0
78ff4d0
78ff4d0
%check
93ec691
%pyproject_check_import
93ec691
78ff4d0
# Testing suite depends on outdated unpackaged go libraries, hence no test
78ff4d0
# here.
6080002
#
6080002
# To run tests manually, install:
6080002
# 1. The package
f4ceceb
# 2. go
f4ceceb
# 3. python3-pytest
f4ceceb
# 4. python3-pytest-mock
6080002
#
6080002
# Then execute:
78ff4d0
# In first shell:
6080002
# $ go install github.com/stripe/stripe-mock@latest
78ff4d0
# $ stripe-mock
f4ceceb
# In second shell (replace `~/stripe-python` with actual path with sources):
f4ceceb
# $ cd /  # So that pytest use installed stripe version, not sources
f4ceceb
# $ pytest --ignore ~/stripe-python/stripe/ ~/stripe-python/
78ff4d0
78ff4d0
78ff4d0
%files -n python3-stripe -f %{pyproject_files}
78ff4d0
%doc README.md CHANGELOG.md
78ff4d0
78ff4d0
78ff4d0
%changelog
4d773cf
%autochangelog