Blame tests/tldr.spec

f2dfb52
Name:           tldr
f2dfb52
Version:        0.4.4
f50ab5f
Release:        1%{?dist}
f2dfb52
Summary:        Simplified and community-driven man pages
f2dfb52
f2dfb52
License:        MIT
f2dfb52
URL:            https://github.com/tldr-pages/tldr-python-client
f50ab5f
Source0:        %{pypi_source}
f2dfb52
f50ab5f
BuildArch:      noarch
f2dfb52
BuildRequires:  pyproject-rpm-macros
f2dfb52
f2dfb52
%description
2800b49
A Python package containing executables.
2800b49
Building this tests:
2800b49
- there are no bytecompiled files in %%{_bindir}
2800b49
- the executable's shebang is adjusted properly
19f84b1
- file direct_url.json isn't created
f2dfb52
f2dfb52
%prep
f2dfb52
%autosetup -n %{name}-%{version}
f2dfb52
f2dfb52
%generate_buildrequires
f2dfb52
%pyproject_buildrequires
f2dfb52
f2dfb52
%build
f2dfb52
%pyproject_wheel
f2dfb52
f2dfb52
%install
f2dfb52
%pyproject_install
5809bbc
%pyproject_save_files tldr +auto
f2dfb52
f2dfb52
%check
2800b49
# Internal check for our macros: tests we don't ship __pycache__ in bindir
f50ab5f
test ! -d %{buildroot}%{_bindir}/__pycache__
f2dfb52
2800b49
# Internal check for our macros: tests we have a proper shebang line
2800b49
head -n1 %{buildroot}%{_bindir}/%{name}.py | grep -E '#!\s*%{python3}\s+%{py3_shbang_opts}\s*$'
2800b49
19f84b1
# Internal check for our macros: tests that direct_url.json file wasn't created
19f84b1
test ! -e %{buildroot}%{python3_sitelib}/*.dist-info/direct_url.json
19f84b1
2800b49
%files -f %pyproject_files
f2dfb52
%license LICENSE
f2dfb52
%doc README.md