2020-11-13 19:26:00 +01:00
|
|
|
#
|
2024-06-29 14:50:18 +02:00
|
|
|
# spec file for package python-build
|
2020-11-13 19:26:00 +01:00
|
|
|
#
|
2024-06-29 14:50:18 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2020-11-13 19:26:00 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-10-16 17:04:24 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2023-03-21 21:20:23 +01:00
|
|
|
# wheeldir of name build does not work well with this packagename gh#openSUSE/python-rpm-macros#157
|
2023-03-21 21:11:44 +01:00
|
|
|
%define _pyproject_wheeldir distwheel
|
2023-01-02 08:23:44 +01:00
|
|
|
|
2023-04-21 16:51:15 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2021-10-16 17:04:24 +02:00
|
|
|
Name: python-build%{psuffix}
|
2024-06-29 14:50:18 +02:00
|
|
|
Version: 1.2.1
|
2020-11-13 19:26:00 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Simple PEP517 package builder
|
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/pypa/build
|
2021-10-16 17:04:24 +02:00
|
|
|
Source0: https://github.com/pypa/build/archive/%{version}.tar.gz#/build-%{version}.tar.gz
|
- Update to 1.0.3:
* Avoid CPython 3.8.17, 3.9.17, 3.10.12, and 3.11.4 tarfile symlink bug
triggered by adding data_filter in 1.0.0.
* Removed the toml library fallback; toml can no longer be used as a
substitute for tomli
* Added runner parameter to util.project_wheel_metadata
* Modified ProjectBuilder constructor signature, added alternative
ProjectBuilder.from_env constructor, redefined env.IsolatedEnv interface,
and exposed env.DefaultIsolatedEnv, replacing env.IsolatedEnvBuilder.
* virtualenv is no longer imported when using -n, for faster builds
* The SDist now contains the repository contents, including tests.
Flit-core 3.8+ required.
* The minimum version of importlib-metadata has been increased to 4.6 and
Python 3.10 due to a bug in the standard library version with URL
requirements in extras.
* Tests now contain a network marker
* Config-settings are now passed to get_requires* hooks, fixing a long
standing bug.
* Test on Python 3.12 betas/RCs
* Filter out malicious files when extracting tar archives when Python
supports it
* Specify encoding, fixing issues when PYTHONWARNDEFAULTENCODING is set.
- Drop patches 589-colorized-pip23.patch, 609-filter-out-malicious.patch:
* Included upstream.
- Add runtests.py which chdirs before running tests, but after the macros
have polluted the current working directory, avoiding test failures.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-build?expand=0&rev=26
2023-09-20 09:51:39 +02:00
|
|
|
# Needs the wheels for wheel, flit-core, and tomli for testing
|
2022-07-13 17:43:08 +02:00
|
|
|
Source10: https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-0.37.1-py2.py3-none-any.whl
|
2023-03-21 21:11:44 +01:00
|
|
|
Source11: https://files.pythonhosted.org/packages/py3/f/flit-core/flit_core-3.8.0-py3-none-any.whl
|
|
|
|
Source12: https://files.pythonhosted.org/packages/py3/t/tomli/tomli-2.0.1-py3-none-any.whl
|
- Update to 1.0.3:
* Avoid CPython 3.8.17, 3.9.17, 3.10.12, and 3.11.4 tarfile symlink bug
triggered by adding data_filter in 1.0.0.
* Removed the toml library fallback; toml can no longer be used as a
substitute for tomli
* Added runner parameter to util.project_wheel_metadata
* Modified ProjectBuilder constructor signature, added alternative
ProjectBuilder.from_env constructor, redefined env.IsolatedEnv interface,
and exposed env.DefaultIsolatedEnv, replacing env.IsolatedEnvBuilder.
* virtualenv is no longer imported when using -n, for faster builds
* The SDist now contains the repository contents, including tests.
Flit-core 3.8+ required.
* The minimum version of importlib-metadata has been increased to 4.6 and
Python 3.10 due to a bug in the standard library version with URL
requirements in extras.
* Tests now contain a network marker
* Config-settings are now passed to get_requires* hooks, fixing a long
standing bug.
* Test on Python 3.12 betas/RCs
* Filter out malicious files when extracting tar archives when Python
supports it
* Specify encoding, fixing issues when PYTHONWARNDEFAULTENCODING is set.
- Drop patches 589-colorized-pip23.patch, 609-filter-out-malicious.patch:
* Included upstream.
- Add runtests.py which chdirs before running tests, but after the macros
have polluted the current working directory, avoiding test failures.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-build?expand=0&rev=26
2023-09-20 09:51:39 +02:00
|
|
|
Source14: runtests.py
|
2023-03-21 21:11:44 +01:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
- Update to 1.0.3:
* Avoid CPython 3.8.17, 3.9.17, 3.10.12, and 3.11.4 tarfile symlink bug
triggered by adding data_filter in 1.0.0.
* Removed the toml library fallback; toml can no longer be used as a
substitute for tomli
* Added runner parameter to util.project_wheel_metadata
* Modified ProjectBuilder constructor signature, added alternative
ProjectBuilder.from_env constructor, redefined env.IsolatedEnv interface,
and exposed env.DefaultIsolatedEnv, replacing env.IsolatedEnvBuilder.
* virtualenv is no longer imported when using -n, for faster builds
* The SDist now contains the repository contents, including tests.
Flit-core 3.8+ required.
* The minimum version of importlib-metadata has been increased to 4.6 and
Python 3.10 due to a bug in the standard library version with URL
requirements in extras.
* Tests now contain a network marker
* Config-settings are now passed to get_requires* hooks, fixing a long
standing bug.
* Test on Python 3.12 betas/RCs
* Filter out malicious files when extracting tar archives when Python
supports it
* Specify encoding, fixing issues when PYTHONWARNDEFAULTENCODING is set.
- Drop patches 589-colorized-pip23.patch, 609-filter-out-malicious.patch:
* Included upstream.
- Add runtests.py which chdirs before running tests, but after the macros
have polluted the current working directory, avoiding test failures.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-build?expand=0&rev=26
2023-09-20 09:51:39 +02:00
|
|
|
BuildRequires: %{python_module flit-core >= 3.8}
|
2023-03-21 21:11:44 +01:00
|
|
|
BuildRequires: %{python_module pip}
|
2020-11-13 19:26:00 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2021-10-16 17:04:24 +02:00
|
|
|
Requires: python-packaging >= 0.19.0
|
2023-03-21 21:11:44 +01:00
|
|
|
Requires: python-pyproject-hooks
|
2021-10-16 17:04:24 +02:00
|
|
|
Requires: (python-importlib-metadata >= 0.22 if python-base < 3.8)
|
2023-03-21 21:11:44 +01:00
|
|
|
Requires: (python-tomli >= 1.1.0 if python-base < 3.11)
|
2021-10-16 17:04:24 +02:00
|
|
|
Recommends: python-virtualenv >= 20.0.35
|
2020-11-13 19:26:00 +01:00
|
|
|
Requires(post): update-alternatives
|
2024-06-29 14:50:18 +02:00
|
|
|
Requires(postun): update-alternatives
|
2020-11-13 19:26:00 +01:00
|
|
|
BuildArch: noarch
|
2021-10-16 17:04:24 +02:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module build = %{version}}
|
|
|
|
BuildRequires: %{python_module filelock >= 3}
|
2022-07-13 17:43:08 +02:00
|
|
|
BuildRequires: %{python_module pytest >= 6}
|
2021-10-16 17:04:24 +02:00
|
|
|
BuildRequires: %{python_module pytest-mock >= 2}
|
|
|
|
BuildRequires: %{python_module pytest-rerunfailures >= 9.1}
|
|
|
|
BuildRequires: %{python_module pytest-xdist >= 1.34}
|
2023-03-21 21:11:44 +01:00
|
|
|
BuildRequires: %{python_module setuptools >= 42 if %python-base < 3.10}
|
|
|
|
BuildRequires: %{python_module setuptools >= 56 if %python-base >= 3.11}
|
2021-10-16 17:04:24 +02:00
|
|
|
BuildRequires: %{python_module wheel >= 0.36}
|
2022-07-13 17:43:08 +02:00
|
|
|
BuildRequires: python3-setuptools-wheel
|
2021-10-16 17:04:24 +02:00
|
|
|
%endif
|
2020-11-13 19:26:00 +01:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2021-10-16 17:04:24 +02:00
|
|
|
Build will invoke the PEP 517 hooks to build a distribution package.
|
|
|
|
It is a simple build tool and does not perform any dependency management.
|
2020-11-13 19:26:00 +01:00
|
|
|
|
|
|
|
%prep
|
2020-12-17 23:07:37 +01:00
|
|
|
%autosetup -p1 -n build-%{version}
|
2020-11-13 19:26:00 +01:00
|
|
|
|
2022-07-13 17:43:08 +02:00
|
|
|
%if !%{with test}
|
2020-11-13 19:26:00 +01:00
|
|
|
%build
|
2023-03-21 21:11:44 +01:00
|
|
|
%pyproject_wheel
|
2020-11-13 19:26:00 +01:00
|
|
|
|
|
|
|
%install
|
2023-03-21 21:11:44 +01:00
|
|
|
%pyproject_install
|
2020-11-13 19:26:00 +01:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyproject-build
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2021-10-16 17:04:24 +02:00
|
|
|
%endif
|
2020-11-13 19:26:00 +01:00
|
|
|
|
2021-10-16 17:04:24 +02:00
|
|
|
%if %{with test}
|
2020-11-13 19:26:00 +01:00
|
|
|
%check
|
- Update to 1.0.3:
* Avoid CPython 3.8.17, 3.9.17, 3.10.12, and 3.11.4 tarfile symlink bug
triggered by adding data_filter in 1.0.0.
* Removed the toml library fallback; toml can no longer be used as a
substitute for tomli
* Added runner parameter to util.project_wheel_metadata
* Modified ProjectBuilder constructor signature, added alternative
ProjectBuilder.from_env constructor, redefined env.IsolatedEnv interface,
and exposed env.DefaultIsolatedEnv, replacing env.IsolatedEnvBuilder.
* virtualenv is no longer imported when using -n, for faster builds
* The SDist now contains the repository contents, including tests.
Flit-core 3.8+ required.
* The minimum version of importlib-metadata has been increased to 4.6 and
Python 3.10 due to a bug in the standard library version with URL
requirements in extras.
* Tests now contain a network marker
* Config-settings are now passed to get_requires* hooks, fixing a long
standing bug.
* Test on Python 3.12 betas/RCs
* Filter out malicious files when extracting tar archives when Python
supports it
* Specify encoding, fixing issues when PYTHONWARNDEFAULTENCODING is set.
- Drop patches 589-colorized-pip23.patch, 609-filter-out-malicious.patch:
* Included upstream.
- Add runtests.py which chdirs before running tests, but after the macros
have polluted the current working directory, avoiding test failures.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-build?expand=0&rev=26
2023-09-20 09:51:39 +02:00
|
|
|
cp %{SOURCE14} .
|
2022-07-13 17:43:08 +02:00
|
|
|
mkdir -p wheels
|
2023-03-21 21:11:44 +01:00
|
|
|
cp %{SOURCE10} %{SOURCE11} %{SOURCE12} wheels/
|
2022-07-13 17:43:08 +02:00
|
|
|
export PIP_FIND_LINKS="%{python3_sitelib}/../wheels $PWD/wheels"
|
- Update to 1.0.3:
* Avoid CPython 3.8.17, 3.9.17, 3.10.12, and 3.11.4 tarfile symlink bug
triggered by adding data_filter in 1.0.0.
* Removed the toml library fallback; toml can no longer be used as a
substitute for tomli
* Added runner parameter to util.project_wheel_metadata
* Modified ProjectBuilder constructor signature, added alternative
ProjectBuilder.from_env constructor, redefined env.IsolatedEnv interface,
and exposed env.DefaultIsolatedEnv, replacing env.IsolatedEnvBuilder.
* virtualenv is no longer imported when using -n, for faster builds
* The SDist now contains the repository contents, including tests.
Flit-core 3.8+ required.
* The minimum version of importlib-metadata has been increased to 4.6 and
Python 3.10 due to a bug in the standard library version with URL
requirements in extras.
* Tests now contain a network marker
* Config-settings are now passed to get_requires* hooks, fixing a long
standing bug.
* Test on Python 3.12 betas/RCs
* Filter out malicious files when extracting tar archives when Python
supports it
* Specify encoding, fixing issues when PYTHONWARNDEFAULTENCODING is set.
- Drop patches 589-colorized-pip23.patch, 609-filter-out-malicious.patch:
* Included upstream.
- Add runtests.py which chdirs before running tests, but after the macros
have polluted the current working directory, avoiding test failures.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-build?expand=0&rev=26
2023-09-20 09:51:39 +02:00
|
|
|
%python_exec runtests.py
|
2021-10-16 17:04:24 +02:00
|
|
|
%endif
|
2020-11-13 19:26:00 +01:00
|
|
|
|
2021-10-16 17:04:24 +02:00
|
|
|
%if !%{with test}
|
2020-11-13 19:26:00 +01:00
|
|
|
%post
|
|
|
|
%python_install_alternative pyproject-build
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative pyproject-build
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%python_alternative %{_bindir}/pyproject-build
|
2021-10-16 17:04:24 +02:00
|
|
|
%{python_sitelib}/build
|
2023-05-02 12:58:17 +02:00
|
|
|
%{python_sitelib}/build-%{version}.dist-info
|
2021-10-16 17:04:24 +02:00
|
|
|
%endif
|
2020-11-13 19:26:00 +01:00
|
|
|
|
|
|
|
%changelog
|