pyproject-rpm-macros/tests/tldr.spec
DistroBaker 795a9b3332 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git#26bb3cb4d123a7f57df5ec56b17ccbf3d415c505
2021-02-04 13:32:12 +00:00

47 lines
1.2 KiB
RPMSpec

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