Blob Blame History Raw
%global         srcname     yfinance

Name:           python-%{srcname}
Version:        0.1.63
Release:        %autorelease
Summary:        Yahoo! Finance market data downloader
License:        ASL 2.0
URL:  {srcname}/
Source0:        %pypi_source

BuildArch:      noarch

BuildRequires:  pyproject-rpm-macros
BuildRequires:  python3-devel

%global _description %{expand:
Ever since Yahoo! finance decommissioned their historical data API, many
programs that relied on it to stop working.

yfinance aims to solve this problem by offering a reliable, threaded,
and Pythonic way to download historical market data from Yahoo! finance.}

%description %{_description}

%package -n python3-%{srcname}
Summary:        %{summary}

%description -n python3-%{srcname} %{_description}

%autosetup -n %{srcname}-%{version}

# Remove the python shebang from non-executable files.
sed -i '1{\@^#!/usr/bin/env python@d}' yfinance/*.py

%pyproject_buildrequires -r



# A sample executable is included but it does not seem to work. It's not needed
# for the package since this is a python library meant to be used by other
# python executables.
rm -vf %{buildroot}%{_bindir}/sample

%pyproject_save_files yfinance

%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE.txt
%doc README.rst