| |
@@ -1,27 +1,23 @@
|
| |
- # This package buildrequires flit_core to build the wheel, but flit_core requires tomli.
|
| |
- # To bootstrap, we copy the files to appropriate locations manually and create a minimal dist-info metadata.
|
| |
- # Note that as a pure Python package, the wheel contains no pre-built binary stuff.
|
| |
- # When bootstrap is enabled, we don't run tests either, just an import check.
|
| |
- %bcond_with bootstrap
|
| |
-
|
| |
Name: python-tomli
|
| |
- Version: 1.2.2
|
| |
- Release: 2%{?dist}
|
| |
+ Version: 2.0.1
|
| |
+ Release: 5%{?dist}
|
| |
Summary: A little TOML parser for Python
|
| |
|
| |
License: MIT
|
| |
URL: https://pypi.org/project/tomli/
|
| |
- Source0: https://github.com/hukkin/tomli/archive/refs/tags/%{version}.tar.gz
|
| |
+ Source0: https://github.com/hukkin/tomli/archive/%{version}/%{name}-%{version}.tar.gz
|
| |
+
|
| |
+ # Upstream tomli uses flit, but we want to use setuptools on RHEL 9.
|
| |
+ # This a downstream-only setup.py manually created from pyproject.toml metadata.
|
| |
+ # It contains a @@VERSION@@ placeholder.
|
| |
+ Source1: tomli-setup.py
|
| |
|
| |
BuildArch: noarch
|
| |
BuildRequires: python3-devel
|
| |
|
| |
- %if %{without bootstrap}
|
| |
- # Upstream test requirements are in tests/requirements.txt,
|
| |
- # but they're mixed together with coverage ones. Tests only need:
|
| |
+ # The test suite uses the stdlib's unittest framework, but we use %%pytest
|
| |
+ # as the test runner.
|
| |
BuildRequires: python3-pytest
|
| |
- BuildRequires: python3-dateutil
|
| |
- %endif
|
| |
|
| |
%global _description %{expand:
|
| |
Tomli is a Python library for parsing TOML.
|
| |
@@ -38,71 +34,39 @@
|
| |
|
| |
%prep
|
| |
%autosetup -p1 -n tomli-%{version}
|
| |
+ sed 's/@@VERSION@@/%{version}/' %{SOURCE1} > setup.py
|
| |
+ rm pyproject.toml # force the PEP 517 fallback build backend (setuptools)
|
| |
|
| |
|
| |
- %if %{without bootstrap}
|
| |
%generate_buildrequires
|
| |
%pyproject_buildrequires -r
|
| |
- %endif
|
| |
|
| |
|
| |
%build
|
| |
- %if %{without bootstrap}
|
| |
%pyproject_wheel
|
| |
- %else
|
| |
- %global distinfo tomli-%{version}+rpmbootstrap.dist-info
|
| |
- mkdir %{distinfo}
|
| |
- cat > %{distinfo}/METADATA << EOF
|
| |
- Metadata-Version: 2.2
|
| |
- Name: tomli
|
| |
- Version: %{version}+rpmbootstrap
|
| |
- EOF
|
| |
- %endif
|
| |
|
| |
|
| |
%install
|
| |
- %if %{without bootstrap}
|
| |
%pyproject_install
|
| |
%pyproject_save_files tomli
|
| |
- %else
|
| |
- mkdir -p %{buildroot}%{python3_sitelib}
|
| |
- cp -a tomli %{distinfo} %{buildroot}%{python3_sitelib}
|
| |
- echo '%{python3_sitelib}/tomli/' > %{pyproject_files}
|
| |
- echo '%{python3_sitelib}/%{distinfo}/' >> %{pyproject_files}
|
| |
- %endif
|
| |
|
| |
|
| |
%check
|
| |
%py3_check_import tomli
|
| |
- %if %{without bootstrap}
|
| |
- # assert the properly built package has no runtime requires
|
| |
- # if it does, we need to change the bootstrap metadata
|
| |
- test -f %{buildroot}%{python3_sitelib}/tomli-%{version}.dist-info/METADATA
|
| |
- ! grep '^Requires-Dist:' %{buildroot}%{python3_sitelib}/tomli-%{version}.dist-info/METADATA
|
| |
%pytest
|
| |
- %endif
|
| |
|
| |
|
| |
%files -n python3-tomli -f %{pyproject_files}
|
| |
%doc README.md
|
| |
%doc CHANGELOG.md
|
| |
- %license LICENSE
|
| |
|
| |
|
| |
%changelog
|
| |
- * Fri Oct 29 2021 Miro Hrončok <mhroncok@redhat.com> - 1.2.2-2
|
| |
- - Allow a bootstrap build without flit_core
|
| |
-
|
| |
- * Wed Oct 27 2021 Petr Viktorin <pviktori@redhat.com> - 1.2.2-1
|
| |
- - Update to version 1.2.2
|
| |
-
|
| |
- * Wed Aug 18 2021 Petr Viktorin <pviktori@redhat.com> - 1.2.1-1
|
| |
- - Update to version 1.2.1
|
| |
- - loading text (as opposed to binary) files is deprecated
|
| |
-
|
| |
- * Thu Jul 29 2021 Petr Viktorin <pviktori@redhat.com> - 1.1.0-1
|
| |
- - Update to version 1.1.0
|
| |
- - `load` can now take a binary file object
|
| |
-
|
| |
- * Thu Jul 22 2021 Petr Viktorin <pviktori@redhat.com> - 1.0.4-1
|
| |
- - Initial package
|
| |
+ * Wed Mar 08 2023 Miro Hrončok <mhroncok@redhat.com> - 2.0.1-5
|
| |
+ - Initial package for RHEL 9
|
| |
+ - Resolves: rhbz#2175213
|
| |
+ - Fedora+EPEL contributions by:
|
| |
+ Maxwell G <gotmax@e.email>
|
| |
+ Michel Alexandre Salim <salimma@fedoraproject.org>
|
| |
+ Miro Hrončok <miro@hroncok.cz>
|
| |
+ Petr Viktorin <pviktori@redhat.com>
|
| |
Note for reviwers
There is a git conflict here because it was easier to start the work on Rawhide(ish) rather than EPEL 9.
The conflict is meaningless in RHEL context because there will be a new/distinct git history anyway.
Please consider only the Initial package for RHEL 9 commit and anything that follows for review.