Blame python-gelidum.spec

David Bold 7c417d3
Name:           python-gelidum
David Bold 12376f7
Version:        0.7.0
David Bold 7c417d3
Release:        %autorelease
David Bold 7c417d3
Summary:        Freeze your objects in python
David Bold 7c417d3
David Bold 7c417d3
# The entire source is MIT except resources/gelidum.jpg, which is CC0 (and is
David Bold 7c417d3
# not installed)
David Bold 7c417d3
License:        MIT
David Bold 7c417d3
URL:            https://github.com/diegojromerolopez/gelidum
David Bold 7c417d3
Source0:        %{url}/archive/v%{version}/gelidum-%{version}.tar.gz
David Bold 7c417d3
David Bold 7c417d3
BuildArch:      noarch
David Bold 7c417d3
BuildRequires:  python3-devel
David Bold 7c417d3
David Bold 7c417d3
David Bold 7c417d3
%global _description %{expand:
David Bold 7c417d3
Inspired by the method freeze found in other languages like
David Bold 7c417d3
Javascript, this package tries to make immutable objects to make it
David Bold 7c417d3
easier avoiding accidental modifications in your code.}
David Bold 7c417d3
David Bold 7c417d3
%description %_description
David Bold 7c417d3
David Bold 7c417d3
%package -n python3-gelidum
David Bold 7c417d3
Summary:        %{summary}
David Bold 7c417d3
David Bold 7c417d3
%description -n python3-gelidum %_description
David Bold 7c417d3
David Bold 7c417d3
David Bold 7c417d3
%prep
David Bold 7c417d3
%autosetup -p1 -n gelidum-%{version}
David Bold 7c417d3
David Bold 7c417d3
David Bold 7c417d3
%generate_buildrequires
David Bold 7c417d3
# The build/test/runtime BuildRequires are generated from upstream metadata
David Bold 7c417d3
%pyproject_buildrequires -r
David Bold 7c417d3
David Bold 7c417d3
David Bold 7c417d3
%build
David Bold 7c417d3
# The macro supports setup.py-based and pyproject.toml-based build
David Bold 7c417d3
%pyproject_wheel
David Bold 7c417d3
David Bold 7c417d3
David Bold 7c417d3
%install
David Bold 7c417d3
# The macro supports setup.py-based and pyproject.toml-based build
David Bold 7c417d3
%pyproject_install
David Bold 7c417d3
David Bold 7c417d3
# Library and metadata files can be saved automatically
David Bold 7c417d3
%pyproject_save_files gelidum
David Bold 7c417d3
David Bold 7c417d3
David Bold 7c417d3
%check
David Bold 7c417d3
# %%tox
David Bold 7c417d3
# for projects without tox, %%pytest is preferred
David Bold 7c417d3
python3 -m unittest discover -s ./gelidum/tests
David Bold 7c417d3
David Bold 7c417d3
David Bold 7c417d3
# %%{pyproject_files} handles code files, but executables,
David Bold 7c417d3
# documentation and license must be listed in the spec file:
David Bold 7c417d3
%files -n python3-gelidum -f %{pyproject_files}
David Bold 7c417d3
%doc README.md
David Bold 7c417d3
%license LICENSE
David Bold 7c417d3
%exclude %{python3_sitelib}/gelidum/tests
David Bold 7c417d3
David Bold 7c417d3
%changelog
David Bold 7c417d3
%autochangelog