67a5fec
# circular build dependency on requests-download and testpath
37d67a0
%bcond_without tests
ea61a5e
ea61a5e
%global srcname flit
ea61a5e
ea61a5e
Name:		python-%{srcname}
468cb7f
Version:	3.0.0
2acc408
Release:	2%{?dist}
1aeb9f4
Summary:	Simplified packaging of Python modules
ea61a5e
ea61a5e
# ./flit/logo.py  under ASL 2.0 license
ea61a5e
# ./flit/upload.py under PSF license
ea61a5e
License:	BSD and ASL 2.0 and Python
ea61a5e
ea61a5e
URL:		https://flit.readthedocs.io/en/latest/
ea61a5e
Source0:	https://github.com/takluyver/flit/archive/%{version}/%{srcname}-%{version}.tar.gz
68c70d4
37d67a0
# For the tests
37d67a0
Source1:	https://pypi.org/pypi?%3Aaction=list_classifiers#/classifiers.lst
37d67a0
2acc408
# Replace deprecated pytoml with toml, backported from upstream
2acc408
Patch1:		https://github.com/takluyver/flit/commit/b81b1da55e.patch
2acc408
ea61a5e
BuildArch:	noarch
ea61a5e
BuildRequires:	python3-devel
837ae06
BuildRequires:	pyproject-rpm-macros
ea61a5e
BuildRequires:	python3-pip
558807b
558807b
# Runtime deps needed to build self
558807b
BuildRequires:	python3-toml
558807b
558807b
%if %{with tests}
558807b
# Runtime deps, others
ea61a5e
BuildRequires:	python3-requests
ea61a5e
BuildRequires:	python3-docutils
68c70d4
BuildRequires:	python3-pygments
ea61a5e
558807b
# Test deps
b940a9d
BuildRequires:	/usr/bin/python
ea61a5e
BuildRequires:	python3-pytest
ea61a5e
BuildRequires:	python3-responses
ea61a5e
558807b
# Test deps that require flit to build:
ea61a5e
BuildRequires:	python3-testpath
b940a9d
BuildRequires:	python3-requests-download
ea61a5e
%endif
ea61a5e
ea61a5e
# https://pypi.python.org/pypi/tornado
ea61a5e
# ./flit/logo.py unkown version
ea61a5e
Provides:    bundled(python-tornado)
ea61a5e
b940a9d
%global _description %{expand:
ea61a5e
Flit is a simple way to put Python packages and modules on PyPI.
ea61a5e
ea61a5e
Flit only creates packages in the new 'wheel' format. People using older
ea61a5e
versions of pip (<1.5) or easy_install will not be able to install them.
ea61a5e
ea61a5e
Flit packages a single importable module or package at a time, using the import
ea61a5e
name as the name on PyPI. All sub-packages and data files within a package are
ea61a5e
included automatically.
ea61a5e
ea61a5e
Flit requires Python 3, but you can use it to distribute modules for Python 2,
b940a9d
so long as they can be imported on Python 3.}
b940a9d
b940a9d
%description %_description
ea61a5e
ea61a5e
ea61a5e
%package -n python3-%{srcname}
1aeb9f4
Summary:	%{summary}
ea61a5e
%{?python_provide:%python_provide python3-%{srcname}}
b940a9d
Requires:	python3-%{srcname}-core = %{version}-%{release}
ea61a5e
ea61a5e
a3b9443
# soft dependency: (WARNING) Cannot analyze code. Pygments package not found.
a3b9443
Recommends:	python3-pygments
a3b9443
b940a9d
%description -n python3-%{srcname} %_description
ea61a5e
ea61a5e
b940a9d
%package -n python3-%{srcname}-core
b940a9d
Summary:	PEP 517 build backend for packages using Flit
b940a9d
%{?python_provide:%python_provide python3-%{srcname}-core}
b940a9d
Conflicts:	python3-%{srcname} < 2.1.0-2
ea61a5e
b940a9d
%description -n python3-%{srcname}-core
b940a9d
This provides a PEP 517 build backend for packages using Flit.
b940a9d
The only public interface is the API specified by PEP 517,
b940a9d
at flit_core.buildapi.
ea61a5e
ea61a5e
ea61a5e
%prep
2acc408
%autosetup -p1 -n %{srcname}-%{version}
ea61a5e
ea61a5e
%build
68c70d4
export FLIT_NO_NETWORK=1
b940a9d
b940a9d
# first, build flit_core with self
b940a9d
cd flit_core
837ae06
%pyproject_wheel
837ae06
# Move %%{_pyproject_wheeldir}/flit_core wheel to the main dir
837ae06
mv %{_pyproject_wheeldir} ..
b940a9d
cd -
b940a9d
837ae06
# build of the main flit (needs flit_core)
837ae06
PYTHONPATH=$PWD:$PWD/flit_core %pyproject_wheel
ea61a5e
ea61a5e
%install
837ae06
%pyproject_install
ea61a5e
67a5fec
%if %{with tests}
ea61a5e
%check
37d67a0
# flit attempts to download list of classifiers from PyPI, but not if it's cached
37d67a0
# test_invalid_classifier fails without the list
37d67a0
mkdir -p fake_cache/flit
37d67a0
cp %{SOURCE1} fake_cache/flit
37d67a0
export XDG_CACHE_HOME=$PWD/fake_cache
37d67a0
b940a9d
export PYTHONPATH=%{buildroot}%{python3_sitelib}
b940a9d
pytest-3
ea61a5e
%endif
ea61a5e
ea61a5e
ea61a5e
%files -n python3-%{srcname}
ea61a5e
%license LICENSE
ea61a5e
%doc README.rst
b940a9d
%{python3_sitelib}/flit-*.dist-info/
b940a9d
%{python3_sitelib}/flit/
b940a9d
%{_bindir}/flit
b940a9d
b940a9d
b940a9d
%files -n python3-%{srcname}-core
b940a9d
%license LICENSE
b940a9d
%doc flit_core/README.rst
b940a9d
%{python3_sitelib}/flit_core-*.dist-info/
b940a9d
%{python3_sitelib}/flit_core/
ea61a5e
ea61a5e
ea61a5e
%changelog
2acc408
* Thu Nov 19 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.0-2
2acc408
- Replace deprecated pytoml with toml
2acc408
468cb7f
* Mon Sep 21 2020 Tomas Hrnciar <thrnciar@redhat.com> - 3.0.0-1
468cb7f
- Update to 3.0.0
468cb7f
8f4cf57
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-4
8f4cf57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
8f4cf57
7ae084c
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-3
7ae084c
- Rebuilt for Python 3.9
7ae084c
73de1a0
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-2
73de1a0
- Bootstrap for Python 3.9
73de1a0
e89739a
* Mon May 11 2020 Tomas Hrnciar <thrnciar@redhat.com> - 2.3.0-1
e89739a
- Update to 2.3.0
e89739a
72e6e07
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-2
72e6e07
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
72e6e07
8d64f73
* Mon Jan 20 2020 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 2.2.0-1
8d64f73
- Update to 2.2.0
8d64f73
b940a9d
* Sat Dec 14 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1.0-2
b940a9d
- Properly package flit-core and restore /usr/bin/flit (#1783610)
b940a9d
ca56f65
* Tue Dec 03 2019 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 2.1.0-1
ca56f65
- Update to 2.1.0
ca56f65
b187c97
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3-4
b187c97
- Rebuilt for Python 3.8.0rc1 (#1748018)
b187c97
8d351c9
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3-3
8d351c9
- Rebuilt for Python 3.8
8d351c9
5a06760
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-2
5a06760
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
5a06760
e14b665
* Sun Feb 10 2019 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 1.3-1
e14b665
- Update to 1.3
e14b665
54a25ea
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
54a25ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
54a25ea
1aeb9f4
* Mon Sep 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1-1
1aeb9f4
- Update to 1.1
1aeb9f4
b75c28a
* Sat Aug 18 2018 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 1.0-4
b75c28a
- Drop pypandoc as requires
b75c28a
57b4824
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-3
57b4824
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
57b4824
30bfcd6
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0-2
30bfcd6
- Rebuilt for Python 3.7
30bfcd6
cb9ed7a
* Sun Apr 08 2018 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 1.0-1
cb9ed7a
- Update to 1.0
cb9ed7a
d24f16a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-3
d24f16a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d24f16a
a3b9443
* Tue Jan 09 2018 Miro Hrončok <mhroncok@redhat.com> - 0.13-2
a3b9443
- Recommend Pygments
a3b9443
917451a
* Sat Dec 23 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> -  0.13-1
917451a
- Update to 0.13
917451a
09a3ee2
* Thu Nov 16 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.12.2-1
09a3ee2
- Update to 0.12.2
09a3ee2
33bb2dd
* Wed Nov 08 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.12.1-1
33bb2dd
- Update to 0.12.1
33bb2dd
cb9ed7a
* Mon Nov 06 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.12-2
2dccc1f
- Add pytoml as dependency
2dccc1f
450fe56
* Sun Nov 05 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.12-1
450fe56
- Update to 0.12
450fe56
- Add pytoml as buildrequires
450fe56
83105a2
* Mon Aug 14 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.11.4-1
83105a2
- Update to 0.11.4
83105a2
- Drop file-encoding patch (fixed upstream)
83105a2
6eabcab
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.1-2
6eabcab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6eabcab
68c70d4
* Tue Jun 13 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.11.1-1
68c70d4
- Update to 0.11.1
68c70d4
e979e04
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9-6
e979e04
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e979e04
67dca49
* Mon Jan 23 2017 Michal Cyprian <mcyprian@redhat.com> - 0.9-5
67dca49
- Use python install wheel macro
67dca49
61308f8
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.9-4
61308f8
- Rebuild for Python 3.6
61308f8
ea61a5e
* Thu Sep 29 2016 Mukundan Ragavan <nonamedotc@gmail.com> - 0.9-3
ea61a5e
- Updated spec file with license comments and provides
ea61a5e
ea61a5e
* Sat Sep 24 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.9-2
ea61a5e
- spec file cleanup
ea61a5e
ea61a5e
* Sat Jul 2 2016 Elliott Sales de Andrade <quantum.analyst@gmail.com> 0.9-1
ea61a5e
- Initial RPM release