Compare commits

...

7 Commits

Author SHA1 Message Date
Maxwell G
a6ac6e348c
Remove unnecessary sed from devendoring code
As of [1], we don't need to replace imports of the vendored tomli.
Removing it is sufficient, as flit-core will fallback to the the
standard tomli.

[1]: 22764736c4
2022-11-13 11:46:56 -06:00
Maxwell G
b9af8656f0
Add missing build dependency on python3-pip
This package started to FTBFS due to pip missing. I'm not sure how this
worked before...
2022-11-13 11:46:56 -06:00
Maxwell G
72ad8b4b56
Handle missing README in sdist
The LICENSE was added to the sdist this release, but the README is
missing for some reason :(.
2022-11-13 11:46:56 -06:00
Maxwell G
dc83cbbf58
Update to 3.8.0. 2022-11-12 12:14:58 -06:00
Maxwell G
4242472836
Unbootstrap
This reverts commit fd26e442ec.
2022-10-11 19:56:06 -05:00
Maxwell G
fd26e442ec
Bootstrap 2022-10-10 16:54:40 -05:00
Maxwell G
d8bc92a2a4
Initial EPEL 8 package (rhbz#2133111). 2022-10-10 16:54:38 -05:00
5 changed files with 139 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/flit_core-3.7.1.tar.gz
/flit_core-3.8.0.tar.gz

View File

@ -0,0 +1,27 @@
From f9c9942386fdd9d00ae6005744070258041ce211 Mon Sep 17 00:00:00 2001
From: Maxwell G <gotmax@e.email>
Date: Thu, 6 Oct 2022 23:58:51 -0500
Subject: [PATCH] Add custom tmp_path pytest fixture
RHEL 8's old pytest does not support this fixture.
---
flit_core/tests/conftest.py | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 flit_core/tests/conftest.py
diff --git a/flit_core/tests/conftest.py b/flit_core/tests/conftest.py
new file mode 100644
index 0000000..d7e767a
--- /dev/null
+++ b/flit_core/tests/conftest.py
@@ -0,0 +1,7 @@
+from pathlib import Path
+
+import pytest
+
+@pytest.fixture
+def tmp_path(tmpdir):
+ return Path(tmpdir)
--
2.37.3

6
README.rst.upstream Normal file
View File

@ -0,0 +1,6 @@
flit_core
---------
This provides a PEP 517 build backend for packages using Flit.
The only public interface is the API specified by PEP 517, at ``flit_core.buildapi``.

103
python-flit-core.spec Normal file
View File

@ -0,0 +1,103 @@
# This specfile is licensed under:
# SPDX-License-Identifier: MIT
# License text: https://spdx.org/licenses/MIT.html
# SPDX-FileCopyrightText: Fedora Project Authors
# SPDX-FileCopyrightText: 2022 Maxwell G <gotmax@e.email>
%bcond_without tests
Name: python-flit-core
Version: 3.8.0
Release: 1%{?dist}
Summary: Simplified packaging of Python modules
License: BSD-3-Clause
URL: https://github.com/pypa/flit
Source0: %{pypi_source flit_core}
# The README was in the sdist for the previous release,
# but it's not in this one :(.
Source1: %{url}/raw/%{version}/flit_core/README.rst#/README.rst.upstream
# Add custom tmp_path pytest fixture
# RHEL 8's old pytest does not support this fixture.
Patch0: 0001-Add-custom-tmp_path-pytest-fixture.patch
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
# Pip is needed for %%py3_install_wheel
BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-tomli
%if %{with tests}
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-testpath
%endif
%global _description %{expand:
Flit is a simple way to put Python packages and modules on PyPI.
Flit only creates packages in the new 'wheel' format. People using older
versions of pip (<1.5) or easy_install will not be able to install them.
Flit packages a single importable module or package at a time, using the import
name as the name on PyPI. All sub-packages and data files within a package are
included automatically.
Flit requires Python 3, but you can use it to distribute modules for Python 2,
so long as they can be imported on Python 3.}
%description %_description
%package -n python3-flit-core
Summary: %{summary}
# We manually specify this, because it's bundled upstream and not in the metadata
Requires: python%{python3_pkgversion}-tomli
%description -n python3-flit-core %_description
%prep
%autosetup -p1 -n flit_core-%{version}
cp %{SOURCE1} .
mv README.rst{.upstream,}
# Remove vendored tomli that flit_core includes to solve the circular dependency.
# (flit_core requires tomli, but flit_core is needed to build tomli).
# We don't use this, as python3-tomli already has its own bootstrap bcond
# to build without flit_core.
rm -rf flit_core/vendor
%build
%python3 -m flit_core.wheel
%install
%py3_install_wheel flit_core-%{version}-py3-none-any.whl
# don't ship tests in flit_core package
# if upstream decides to change the installation, it can be removed:
# https://github.com/takluyver/flit/issues/403
rm -r %{buildroot}%{python3_sitelib}/flit_core/tests/
%check
%py3_check_import flit_core
%if %{with tests}
%pytest
%endif
%files -n python3-flit-core
%doc README.rst
%license LICENSE
%{python3_sitelib}/flit_core/
%{python3_sitelib}/flit_core-%{version}.dist-info/
%changelog
* Sat Nov 12 2022 Maxwell G <gotmax@e.email> - 3.8.0-1
- Update to 3.8.0.
* Thu Oct 06 2022 Maxwell G <gotmax@e.email> - 3.7.1-1
- Initial EPEL 8 package (rhbz#2133111).

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (flit_core-3.8.0.tar.gz) = 914804e3f2040762381afe039272d9d6fdbcd3f3cf8b9eea854f2f1d95edcb01718fd6685476bc1cdc251dfc46ef80b40f087df881d8b963dcc3f3332fd32a46