forked from pool/python-flit-core
Compare commits
1 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 1d31805878 |
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,4 +1,4 @@
|
||||
## Default LFS
|
||||
*.changes merge=merge-changes
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -12,6 +12,7 @@
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar 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
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1 +1,4 @@
|
||||
.osc
|
||||
*.obscpio
|
||||
*.osc
|
||||
_build.*
|
||||
.pbuild
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 9 11:04:15 UTC 2026 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add pythons_for_pypi macro. This macro will help to build the python
|
||||
minimal stack for different python versions.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 29 09:13:15 UTC 2026 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Use %bcond_with macro for test flavor
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 2 14:17:24 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-flit-core
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2026 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,7 +19,7 @@
|
||||
%define modname flit-core
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%define plainpython python
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%if 0%{?suse_version} >= 1600
|
||||
# The primary python flavor is built in Factory Ring0
|
||||
%if "%{flavor}" == "primary"
|
||||
%define pprefix %{primary_python}
|
||||
@@ -29,12 +29,6 @@
|
||||
%if "%{flavor}" == ""
|
||||
%define pprefix python
|
||||
%{expand:%%define skip_%{primary_python} 1}
|
||||
%if "%{shrink:%{pythons}}" == ""
|
||||
# Exclude for local osc build: unresolvable
|
||||
%define python_module() empty-python-buildset
|
||||
# Exclude for obs server
|
||||
ExclusiveArch: do-not-build
|
||||
%endif
|
||||
%endif
|
||||
%else
|
||||
# backport and option d projects for 15.X having one or more python in the buildset don't need the Ring split for bootstrap
|
||||
@@ -45,12 +39,28 @@ ExclusiveArch: do-not-build
|
||||
%define pprefix python
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# test everything in the buildset by standard python flavor expansion: primary and non-primary, if any.
|
||||
%if "%{flavor}" == "test"
|
||||
%define pprefix python
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%bcond_with test
|
||||
%endif
|
||||
|
||||
%if "%{flavor}" == ""
|
||||
%{?pythons_for_pypi}
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
|
||||
%if "%{flavor}" == "" && "%{shrink:%{pythons}}" == ""
|
||||
# Exclude for local osc build: unresolvable
|
||||
%define python_module() empty-python-buildset
|
||||
# Exclude for obs server
|
||||
ExclusiveArch: do-not-build
|
||||
%endif
|
||||
|
||||
Name: %{pprefix}-flit-core%{?psuffix}
|
||||
Version: 3.12.0
|
||||
Release: 0
|
||||
@@ -62,7 +72,7 @@ BuildRequires: %{python_module base >= 3.6}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
%if "%{flavor}" == "test"
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module flit-core = %{version}}
|
||||
BuildRequires: %{python_module packaging}
|
||||
BuildRequires: %{python_module pytest}
|
||||
@@ -90,7 +100,7 @@ The only public interface is the API specified by PEP 517, at flit_core.buildapi
|
||||
%prep
|
||||
%autosetup -p2 -n flit_core-%{version}
|
||||
|
||||
%if "%{flavor}" != "test"
|
||||
%if !%{with test}
|
||||
%build
|
||||
# https://flit.readthedocs.io/en/latest/bootstrap.html, take the first available python in the build set
|
||||
mypython=%{expand:%%__%(echo %{pythons} | cut -d " " -f 1)}
|
||||
@@ -105,14 +115,14 @@ $python bootstrap_install.py dist/flit_core-%{version}-py3-none-any.whl -i %{bui
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%if "%{flavor}" == "test"
|
||||
%if %{with test}
|
||||
%check
|
||||
# make sure we do not test the sources but the package
|
||||
rm flit_core/*.py pyproject.toml
|
||||
%pytest -rfEs
|
||||
%endif
|
||||
|
||||
%if "%{flavor}" != "test"
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%{python_sitelib}/flit_core
|
||||
%{python_sitelib}/flit_core-%{version}.dist-info
|
||||
|
||||
Reference in New Issue
Block a user