|
|
@ -1,16 +1,10 @@
|
|
|
|
# When bootstrapping new Python we need to build flit in bootstrap mode.
|
|
|
|
# Tests are enabled by default
|
|
|
|
# The Python RPM dependency generators and pip are not yet available.
|
|
|
|
|
|
|
|
# When building in bootstrap mode, only flit-core is built.
|
|
|
|
|
|
|
|
%bcond bootstrap 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Tests are enabled by default, unless we bootstrap.
|
|
|
|
|
|
|
|
# Disable them to avoid a circular build dependency on requests-download and testpath.
|
|
|
|
|
|
|
|
# RHEL does not have all the test dependencies
|
|
|
|
# RHEL does not have all the test dependencies
|
|
|
|
%bcond tests %[%{without bootstrap} && ! %[%{defined rhel} && %{undefined epel}]]
|
|
|
|
%bcond tests %[! %[%{defined rhel} && %{undefined epel}]]
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-flit
|
|
|
|
Name: python-flit
|
|
|
|
Version: 3.8.0
|
|
|
|
Version: 3.8.0
|
|
|
|
Release: 2%{?dist}
|
|
|
|
Release: 3%{?dist}
|
|
|
|
Summary: Simplified packaging of Python modules
|
|
|
|
Summary: Simplified packaging of Python modules
|
|
|
|
|
|
|
|
|
|
|
|
# ./flit/log.py: Apache-2.0
|
|
|
|
# ./flit/log.py: Apache-2.0
|
|
|
@ -25,27 +19,14 @@ Source1: https://pypi.org/pypi?%3Aaction=list_classifiers#/classifiers.ls
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
%if %{without bootstrap}
|
|
|
|
|
|
|
|
BuildRequires: pyproject-rpm-macros >= 0-40
|
|
|
|
|
|
|
|
BuildRequires: python3-pip
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
%if %{with tests}
|
|
|
|
# Runtime deps, others
|
|
|
|
|
|
|
|
BuildRequires: python3-requests
|
|
|
|
|
|
|
|
BuildRequires: python3-docutils
|
|
|
|
|
|
|
|
BuildRequires: python3-pygments
|
|
|
|
|
|
|
|
BuildRequires: python3-tomli-w
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Test deps
|
|
|
|
|
|
|
|
BuildRequires: /usr/bin/python
|
|
|
|
BuildRequires: /usr/bin/python
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
BuildRequires: python3-responses
|
|
|
|
BuildRequires: python3-responses
|
|
|
|
BuildRequires: git-core
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Test deps that require flit to build:
|
|
|
|
|
|
|
|
BuildRequires: python3-testpath
|
|
|
|
BuildRequires: python3-testpath
|
|
|
|
BuildRequires: python3-requests-download
|
|
|
|
BuildRequires: python3-requests-download
|
|
|
|
|
|
|
|
BuildRequires: git-core
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
%global _description %{expand:
|
|
|
@ -64,10 +45,8 @@ so long as they can be imported on Python 3.}
|
|
|
|
%description %_description
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
|
|
|
|
%package -n python3-flit
|
|
|
|
%package -n python3-flit
|
|
|
|
Summary: %{summary}
|
|
|
|
Summary: %{summary}
|
|
|
|
Requires: python3-flit-core = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# https://pypi.python.org/pypi/tornado
|
|
|
|
# https://pypi.python.org/pypi/tornado
|
|
|
|
# ./flit/log.py unknown version
|
|
|
|
# ./flit/log.py unknown version
|
|
|
@ -77,95 +56,52 @@ Provides: bundled(python3dist(tornado))
|
|
|
|
Recommends: python3-pygments
|
|
|
|
Recommends: python3-pygments
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-flit %_description
|
|
|
|
%description -n python3-flit %_description
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-flit-core
|
|
|
|
|
|
|
|
Summary: PEP 517 build backend for packages using Flit
|
|
|
|
|
|
|
|
Conflicts: python3-flit < 2.1.0-2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# RPM generators are not yet available when we bootstrap
|
|
|
|
|
|
|
|
%if %{with bootstrap}
|
|
|
|
|
|
|
|
Provides: python%{python3_pkgversion}dist(flit-core) = %{version}
|
|
|
|
|
|
|
|
Provides: python%{python3_version}dist(flit-core) = %{version}
|
|
|
|
|
|
|
|
Requires: python(abi) = %{python3_version}
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n flit-%{version}
|
|
|
|
%autosetup -p1 -n flit-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
# Remove vendored tomli that flit_core includes to solve the circular dependency on older Pythons
|
|
|
|
|
|
|
|
# (flit_core requires tomli, but flit_core is needed to build tomli).
|
|
|
|
%generate_buildrequires
|
|
|
|
# We don't use this, as tomllib is a part of standard library since Python 3.11.
|
|
|
|
%pyproject_buildrequires
|
|
|
|
rm -rf flit_core/flit_core/vendor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
export FLIT_NO_NETWORK=1
|
|
|
|
export FLIT_NO_NETWORK=1
|
|
|
|
|
|
|
|
|
|
|
|
# first, build flit_core with self
|
|
|
|
|
|
|
|
cd flit_core
|
|
|
|
|
|
|
|
%if %{with bootstrap}
|
|
|
|
|
|
|
|
%{python3} -m flit_core.wheel
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%pyproject_wheel
|
|
|
|
%pyproject_wheel
|
|
|
|
cd -
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build of the main flit (needs flit_core)
|
|
|
|
|
|
|
|
export PYTHONPATH=$PWD:$PWD/flit_core
|
|
|
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
%if %{with bootstrap}
|
|
|
|
|
|
|
|
cd flit_core
|
|
|
|
|
|
|
|
%{python3} bootstrap_install.py --install-root %{buildroot} dist/flit_core-%{version}-py3-none-any.whl
|
|
|
|
|
|
|
|
# for consistency with %%pyproject_install:
|
|
|
|
|
|
|
|
rm %{buildroot}%{python3_sitelib}/flit_core-*.dist-info/RECORD
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%pyproject_install
|
|
|
|
%pyproject_install
|
|
|
|
%endif
|
|
|
|
%pyproject_save_files flit
|
|
|
|
|
|
|
|
|
|
|
|
# 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/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
|
|
|
|
%pyproject_check_import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
# flit attempts to download list of classifiers from PyPI, but not if it's cached
|
|
|
|
# flit attempts to download list of classifiers from PyPI, but not if it's cached
|
|
|
|
# test_invalid_classifier fails without the list
|
|
|
|
# test_invalid_classifier fails without the list
|
|
|
|
mkdir -p fake_cache/flit
|
|
|
|
mkdir -p fake_cache/flit
|
|
|
|
cp %{SOURCE1} fake_cache/flit
|
|
|
|
cp %{SOURCE1} fake_cache/flit
|
|
|
|
export XDG_CACHE_HOME=$PWD/fake_cache
|
|
|
|
export XDG_CACHE_HOME=$PWD/fake_cache
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# This also runs tests of flit_core but deselecting them breaks the flit tests,
|
|
|
|
|
|
|
|
# so we run them anyway:
|
|
|
|
%pytest
|
|
|
|
%pytest
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
%files -n python3-flit -f %{pyproject_files}
|
|
|
|
%files -n python3-flit
|
|
|
|
|
|
|
|
%license LICENSE
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst
|
|
|
|
%doc README.rst
|
|
|
|
%{python3_sitelib}/flit-*.dist-info/
|
|
|
|
|
|
|
|
%{python3_sitelib}/flit/
|
|
|
|
|
|
|
|
%{_bindir}/flit
|
|
|
|
%{_bindir}/flit
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-flit-core
|
|
|
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%doc flit_core/README.rst
|
|
|
|
|
|
|
|
%{python3_sitelib}/flit_core-*.dist-info/
|
|
|
|
|
|
|
|
%{python3_sitelib}/flit_core/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Fri May 19 2023 Miro Hrončok <mhroncok@redhat.com> - 3.8.0-3
|
|
|
|
|
|
|
|
- Fork python-flit-core from the python-flit package
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.0-2
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|