%bcond_without tests
%global pypi_name amply
%global _description %{expand:
Amply allows you to load and manipulate AMPL data as Python data
structures.
Amply only supports a specific subset of the AMPL syntax:
> set declarations
> set data statements
> parameter declarations
> parameter data statements}
Name: python-%{pypi_name}
Version: 0.1.5
Release: 1%{?dist}
Summary: A Python package for AMPL/GMPL datafile parsing
License: EPL-1.0
URL: https://github.com/willu47/amply
Source0: %{pypi_source amply}
BuildArch: noarch
%description %_description
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: %{py3_dist setuptools}
BuildRequires: %{py3_dist wheel}
BuildRequires: %{py3_dist setuptools_scm}
%if %{with tests}
BuildRequires: %{py3_dist pytest}
%endif
%py_provides python3-%{pypi_name}
%description -n python3-%{pypi_name} %_description
%prep
%autosetup -n %{pypi_name}-%{version}
find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
%build
%py3_build
%install
%py3_install
%check
%if %{with tests}
export PYTHONPATH=%{buildroot}%{python3_sitelib}
pytest-%{python3_version}
%endif
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
%changelog
* Tue May 10 2022 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.1.5-1
- Update to the latest upstream's release
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.1.4-2
- Rebuilt for Python 3.10
* Tue Feb 16 2021 Aniket Pradhan <major AT fedoraproject DOT org> - 0.1.4-1
- Initial build