commit 61d85320e788cddf352f9e054b54979c63905a1701efb75368607c615a48ccf4 Author: Matej Cepl Date: Thu Jul 14 13:29:43 2022 +0000 Accepting request 989132 from home:bnavigator:branches:devel:languages:python - Initial specfile for v0.11 - Required by setuptools 63 testsuite OBS-URL: https://build.opensuse.org/request/show/989132 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ini2toml?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ini2toml-0.11.tar.gz b/ini2toml-0.11.tar.gz new file mode 100644 index 0000000..8a32557 --- /dev/null +++ b/ini2toml-0.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b0b40473e27c04276bad0b85750f9607f0dfac329e7aaf16461b0bcd5bdd3cd +size 100035 diff --git a/python-ini2toml.changes b/python-ini2toml.changes new file mode 100644 index 0000000..f5dc5c3 --- /dev/null +++ b/python-ini2toml.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Wed Jul 13 15:04:09 UTC 2022 - Ben Greiner + +- Initial specfile for v0.11 +- Required by setuptools 63 testsuite diff --git a/python-ini2toml.spec b/python-ini2toml.spec new file mode 100644 index 0000000..6329993 --- /dev/null +++ b/python-ini2toml.spec @@ -0,0 +1,152 @@ +# +# spec file for package python-ini2toml +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%bcond_without lite +%bcond_without full +%bcond_without all +# these do not have the requirement in the distribution +%bcond_with experimental + +Name: python-ini2toml +Version: 0.11 +Release: 0 +Summary: Automatic conversion of .ini/cfg files to TOML equivalents +License: MPL-2.0 +URL: https://github.com/abravalheri/ini2toml/ +Source: https://files.pythonhosted.org/packages/source/i/ini2toml/ini2toml-0.11.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module setuptools_scm} +Requires: python-packaging >= 20.7 +Requires(post): update-alternatives +Requires(postun):update-alternatives +# SECTION test requirements +BuildRequires: %{python_module packaging >= 20.7} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module tomlkit >= 0.10 with %python-tomlkit < 2} +BuildRequires: %{python_module tomli-w >= 0.4.0 with %python-tomli-w < 2} +BuildRequires: %{python_module configupdater >= 3.0.1 with %python-configupdater < 4} +BuildRequires: %{python_module validate-pyproject >= 0.6} +%if %{with experimental} +BuildRequires: %{python_module pyproject-fmt >= 0.32} +%endif +# /SECTION +BuildRequires: fdupes +BuildArch: noarch +%python_subpackages + +%description +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. + +%if %{with lite} +%package lite +Summary: Python ini2toml[lite] extra requirement +Requires: python-ini2toml = %{version} +Requires: (python-tomli-w >= 0.4.0 with python-tomli-w < 2) + +%description lite +The ini2toml[lite] extra requirements for %{python_flavor}-ini2toml +%endif + +%if %{with full} +%package full +Summary: Python ini2toml[full] extra requirement +Requires: python-ini2toml = %{version} +Requires: (python-configupdater >= 3.0.1 with python-configupdater < 4) +Requires: (python-tomlkit >= 0.10 with python-tomlkit < 2) + +%description full +The ini2toml[full] extra requirements for %{python_flavor}-ini2toml +%endif + +%if %{with all} +%package all +Summary: Python ini2toml[all] extra requirement +Requires: python-ini2toml = %{version} +Requires: (python-configupdater >= 3.0.1 with python-configupdater < 4) +Requires: (python-tomlkit >= 0.10 with python-tomlkit < 2) + +%description all +The ini2toml[all] extra requirements for %{python_flavor}-ini2toml +%endif + +%if %{with experimental} +%package experimental +Summary: Python ini2toml[experimental] extra requirement +Requires: python-ini2toml = %{version} +Requires: python-pyproject-fmt >= 0.32 + +%description experimental +The ini2toml[experimental] extra requirements for %{python_flavor}-ini2toml +%endif + +%prep +%setup -q -n ini2toml-%{version} +sed -i 's/--cov ini2toml --cov-report term-missing//' setup.cfg + +%build +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/ini2toml +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%if ! %{with experimental} +donttest=(-k "not test_auto_formatting") +%endif +%pytest "${donttest[@]}" + +%post +%python_install_alternative ini2toml + +%postun +%python_uninstall_alternative ini2toml + +%files %{python_files} +%doc AUTHORS.rst CHANGELOG.rst README.rst +%license LICENSE.txt +%python_alternative %{_bindir}/ini2toml +%{python_sitelib}/ini2toml +%{python_sitelib}/ini2toml-%{version}*-info + +%if %{with lite} +%files %{python_files lite} +%license LICENSE.txt +%endif + +%if %{with full} +%files %{python_files full} +%license LICENSE.txt +%endif + +%if %{with all} +%files %{python_files all} +%license LICENSE.txt +%endif + +%if %{with experimental} +%files %{python_files experimental} +%license LICENSE.txt +%endif + +%changelog +