Blob Blame History Raw
Name:           ini2toml
Version:        0.10
Release:        5%{?dist}
Summary:        Automatic conversion of .ini/.cfg files to TOML equivalents

License:        MPLv2.0
Source0:        %{pypi_source ini2toml}

BuildArch:      noarch
BuildRequires:  python3-devel

# Provide the python3-* namespace as the package
# can also be used as a library.
%py_provides python3-ini2toml

%global _description %{expand:
The original purpose of this project is to help migrating setup.cfg files to PEP 621, but by extension it can also be used to convert any compatible .ini/.cfg file to TOML.

Please notice, the provided .ini/.cfg files should follow the same syntax supported by Python’s ConfigParser library (here referred to as INI syntax) and more specifically abide by ConfigUpdater restrictions (e.g., no interpolation or repeated fields).}

%description %_description

%pyproject_extras_subpkg -n ini2toml full lite

%autosetup -p1 -n ini2toml-%{version}

# Remove the coverage cmd arguments from pytest
sed -Ei '/(-|pytest)-cov(-report)?/d' setup.cfg

# Remove test dependency on validate-pyproject, not yet packaged
# Tests requiring it are excluded in %%check
sed -i '/validate-pyproject/d' setup.cfg

%pyproject_buildrequires -x full,lite,testing


%pyproject_save_files ini2toml


# the requires the validate-pyproject package which is not packaged yet
# tests/ requires python-fmt which is not packaged yet
%pytest -vv --ignore tests/ --deselect tests/

%files -f %{pyproject_files}
%doc README.rst

* Thu Jan 19 2023 Fedora Release Engineering <> - 0.10-5
- Rebuilt for

* Sun Dec 18 2022 Miro Hrončok <> - 0.10-4
- Handle test dependencies automatically and hence BuildRequire python3-tomli

* Thu Jul 21 2022 Fedora Release Engineering <> - 0.10-3
- Rebuilt for

* Tue Jun 14 2022 Python Maint <> - 0.10-2
- Rebuilt for Python 3.11

* Tue May 03 2022 Charalampos Stratakis <> - 0.10-1
- Initial package