## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a substitute. %bcond_without doc_pdf # The tests are stored in a separate repository, which is normally accessed # as a git submodule. %global tests_commit e407c1592df0f8e91664835324dea85146f20189 Name: python-editorconfig Version: 0.12.3 Release: %autorelease Summary: EditorConfig File Locator and Interpreter for Python # See COPYING: the overall license is BSD, but the following files are derived # from the Python standard library under the Python license: # - editorconfig/fnmatch.py # - editorconfig/ini.py License: Python and BSD URL: https://github.com/editorconfig/editorconfig-core-py Source0: %{url}/archive/v%{version}/editorconfig-core-py-%{version}.tar.gz %global tests_url https://github.com/editorconfig/editorconfig-core-test Source1: %{tests_url}/archive/%{tests_commit}/editorconfig-core-test-%{tests_commit}.tar.gz BuildArch: noarch BuildRequires: python3-devel # For tests: BuildRequires: cmake BuildRequires: make BuildRequires: python3dist(sphinx) %if %{with doc_pdf} BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif %global common_description %{expand: \ EditorConfig Python Core provides the same functionality as the EditorConfig C Core.} %description %{common_description} %package -n python3-editorconfig Summary: %{summary} %description -n python3-editorconfig %{common_description} %package doc Summary: Documentation for python-editorconfig %description doc %{common_description} %prep %setup -q -n editorconfig-core-py-%{version} rm -vrf tests %setup -q -n editorconfig-core-py-%{version} -T -D -b 1 mv ../editorconfig-core-test-%{tests_commit}/ tests/ %generate_buildrequires %pyproject_buildrequires -r %build %pyproject_wheel %make_build -C docs text SPHINXOPTS='%{?_smp_mflags}' %if %{with doc_pdf} %make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}' %make_build -C docs/_build/latex LATEXMKOPTS='-quiet' %endif %cmake -DPYTHON_EXECUTABLE='%{python3}' %install %pyproject_install %pyproject_save_files editorconfig # The command-line tool would conflict with the one from the C version of # EditorConfig. It could be installed under a different name, if anyone ever # reports a need for it. rm -vf '%{buildroot}%{_bindir}/editorconfig' %check export PYTHONPATH='%{buildroot}%{python3_sitelib}' %ctest %files -n python3-editorconfig -f %{pyproject_files} # pyproject_files handles COPYING and LICENSE.*; verify with “rpm -qL -p …” %doc README.rst %files doc %license COPYING LICENSE.BSD LICENSE.PSF %doc README.rst %doc docs/_build/text %if %{with doc_pdf} %doc docs/_build/latex/EditorConfigPythonCore.pdf %endif %changelog * Wed Jan 12 2022 Benjamin A. Beasley 0.12.3-4 - Port to pyproject-rpm-macros * Wed Jan 12 2022 Benjamin A. Beasley 0.12.3-3 - Fix building with doc_pdf disabled * Wed Jan 12 2022 Benjamin A. Beasley - 0.12.3-1 - Update to 0.12.3 (close RHBZ#1876235) - Modernize spec file (still under “old guidelines” for now) - Add a -doc subpackage and build PDF - Add more license files - Run the tests * Tue Jul 27 2021 Fedora Release Engineering - 0.12.0-22 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.12.0-21 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.12.0-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 0.12.0-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.12.0-18 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 0.12.0-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 0.12.0-16 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 0.12.0-15 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 0.12.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 0.12.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Wed Oct 31 2018 Miro Hrončok - 0.12.0-12 - Subpackage python2-editorconfig has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal * Sat Jul 14 2018 Fedora Release Engineering - 0.12.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 0.12.0-10 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 0.12.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Tue Jan 16 2018 Iryna Shcherbina - 0.12.0-8 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Thu Jul 27 2017 Fedora Release Engineering - 0.12.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.12.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 0.12.0-5 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 0.12.0-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Tue Feb 23 2016 Dennis Chen - 0.12.0-2 - Simplify python package. * Thu Jan 21 2016 Dennis Chen - 0.12.0-2 - Remove misleading comments and macros. * Sun Jan 17 2016 Dennis Chen - 0.12.0-1 - First Fedora Packaging.