Blob Blame History Raw
%global srcname environs

%global _description %{expand: \
Environs is a Python library for parsing environment variables.
It allows you to store configuration separate from your code, as per
The Twelve-Factor App (https://12factor.net/config) methodology.}

Name:       python-%{srcname}
Version:    9.3.3
Release:    1%{?dist}
Summary:    Python library for parsing environment variables
License:    MIT
URL:        https://github.com/sloria/%{srcname}
Source0:    %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz

BuildArch:  noarch

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

%description %{_description}

%generate_buildrequires
%pyproject_buildrequires -x tests

%package -n python3-%{srcname}
Summary:    Python library for parsing environment variables

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

%pyproject_extras_subpkg -n python3-%{srcname} django

%package -n python3-%{srcname}-examples
Summary:    Example files for Environs
BuildArch:  noarch
%description -n python3-%{srcname}-examples
%{_description}

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

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files %{srcname}

%check
%pytest

%files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE
%doc README.md CHANGELOG.md CONTRIBUTING.md

%files -n python3-%{srcname}-examples
%license LICENSE
%doc README.md CHANGELOG.md CONTRIBUTING.md examples


%changelog
* Sat Aug 14 2021 Antonio Trande <sagitter@fedoraproject.org> - 9.3.3-1
- Release 9.3.3

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 9.3.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Wed Jun 23 2021 Antonio Trande <sagitter@fedoraproject.org> - 9.3.2-3
- Include the sub-package for example files

* Tue Jun 22 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 9.3.2-2
- Switch to pyproject-rpm-macros and add metapackage for django extra

* Sun Jun 20 2021 Antonio Trande <sagitter@fedoraproject.org> - 9.3.2-1
- Release 9.3.2