# # spec file # # 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/ # %global flavor %{nil} %if "%{flavor}" == "test" %define psuffix -test %bcond_without test %else %define psuffix %{nil} %bcond_with test %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_with python2 %define skip_python2 1 %define skip_python36 1 %define skip_python39 1 Name: python-pep517%{psuffix} Version: 0.12.0 Release: 3.3 Summary: Wrappers to build Python packages using PEP 517 hooks License: MIT URL: https://github.com/takluyver/pep517 Source: https://files.pythonhosted.org/packages/source/p/pep517/pep517-%{version}.tar.gz BuildRequires: %{python_module pip} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-flit-core >= 2 BuildArch: noarch %if %{with test} BuildRequires: %{python_module flit-core >= 2 if %python-base >= 3} BuildRequires: %{python_module mock if %python-base < 3.6} BuildRequires: %{python_module pep517 = %{version}} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools >= 30} BuildRequires: %{python_module testpath} BuildRequires: %{python_module wheel} %endif %if %{with python2} # for pip BuildRequires: python-xml %endif %ifpython2 Requires: python-xml %endif %if 0%{?python_version_nodots} < 36 Requires: python-toml %else Requires: python-tomli %endif %if 0%{?python_version_nodots} < 38 Requires: python-importlib-metadata Requires: python-zipp %endif %python_subpackages %description Wrappers to build Python packages using PEP 517 hooks. %prep %setup -q -n pep517-%{version} sed -i -e '/--flake8/d' -e '/--strict/d' pytest.ini # Remove what appears to be overly cautious flag # that causes tests to require internet, both here # and the test suites of any dependencies. Tracking at: # https://github.com/pypa/pep517/issues/101 sed -i "s/'--ignore-installed',//" pep517/envbuild.py %if ! %{with test} %build # only build once for all flavors using python3-flit-core as backend # even usable by python2 if necessary mkdir dist python3 -m pip wheel \ --no-deps \ --disable-pip-version-check \ --use-pep517 \ --no-build-isolation \ --progress-bar off \ --verbose \ -w . . %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif %if %{with test} %check # python2_params=("-k" "not test_meta") %pytest "${$python_params[@]}" %endif %if ! %{with test} %files %{python_files} %doc README.rst doc/*.rst %license LICENSE %{python_sitelib}/pep517 %{python_sitelib}/pep517-%{version}*-info %endif %changelog * Sun Jan 9 2022 Ben Greiner - Make it work with old python-rpm-macros * Wed Dec 1 2021 Ben Greiner - Fix SLE/Leap python2 build * Sun Nov 7 2021 Dirk Müller - update to 0.12.0: * Fix DeprecationWarning in tomli. * Sat Oct 16 2021 Ben Greiner - Update to 0.11 * Support editable hooks (PEP 660). * Use the TOML 1.0 compliant tomli parser module on Python 3.6 and above. * Ensure TOML files are always read as UTF-8. * Switch CI to Github actions. - Release 0.10 * Avoid shadowing imports such as colorlog in the backend, by moving the _in_process.py script into a separate subpackage. * Issue warnings when using the deprecated pep517.build and pep517.check modules at the command line. See the PyPA build project for a replacement. * Allow building with flit_core 3.x. * Prefer the standard library unittest.mock to mock for tests on Python 3.6 and above. - Avoid possible bootstrap build depcycles with _multibuild - Use pep517 install instead of distutils in order to produce proper dist-info * Wed Nov 25 2020 Benjamin Greiner - BuildRequire flit-core for all possible python3 flavors gh#openSUSE/python-rpm-macros#66 - remove python2 skip for test_meta in check section. The test is correctly marked for skipping with python2 in the source file. * Fri Nov 13 2020 John Vandenberg - Add Recommends pip & python-wheel >= 0.25 - Add build dependencies to activate test_meta on Python 3 - Disable pip --ignore-installed mode in runtime package - Add doc/*.rst to %%doc - Update to v0.9.1 * Silence flake8 objections about import in __init__.py - from 0.9 * Deprecated the higher level API which handles creating an environment and installing build dependencies. This was not very complete, and https://github.com/pypa/build is designed for this use case * New python_executable parameter for Pep517HookCaller to run hooks with a different Python interpreter * Fix for locating the script to run in the subprocess in some scenarios * Fix example in README to get ``build-backend`` correctly * Various minor improvements to testing * Wed Oct 7 2020 John Vandenberg - Update to v0.8.2 * Avoid compat.py, to make _in_process.py zip-safe * Thu Mar 12 2020 Marketa Calabkova - Update to version 0.8.1 * Update CI to Python 3.8 * Add trove classifiers for supported Pythons. * Fri Oct 18 2019 Marketa Calabkova - Update to version 0.7.0 * Migrate from pytoml to toml. * Include name of missing hook in HookMissing * Support back-end path in pyproject.toml * Tue Aug 27 2019 Marketa Calabkova - update to version 0.6.0 * Rely on __legacy__ for fallback behavior. * Add a runner argument to Pep517HookCaller. * Rename 'build_meta' to simply 'meta' * Use the classic syntax for __main__ detection * Move 'build' support to build module * backend-path fixes * Wed Mar 6 2019 John Vandenberg - Initial spec for v0.5.0