2019-04-15 09:24:26 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-lib3to6
|
|
|
|
|
#
|
2022-08-08 05:22:19 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2019-04-15 09:24:26 +00: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.
|
|
|
|
|
|
2019-04-21 11:18:03 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
2019-04-15 09:24:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
|
%define skip_python2 1
|
|
|
|
|
Name: python-lib3to6
|
2021-12-08 15:28:19 +00:00
|
|
|
Version: 202107.1047
|
2019-04-15 09:24:26 +00:00
|
|
|
Release: 0
|
2019-04-21 11:18:03 +00:00
|
|
|
Summary: Module to compile Python 3.6+ code to Python 2.7+
|
2019-04-15 09:24:26 +00:00
|
|
|
License: MIT
|
2020-03-10 09:05:27 +00:00
|
|
|
URL: https://gitlab.com/mbarkhau/lib3to6
|
2019-04-15 09:24:26 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/l/lib3to6/lib3to6-%{version}.tar.gz
|
2022-08-08 05:22:19 +00:00
|
|
|
# PATCH-FIX-UPSTREAM Based on gh#mbarkhau/lib3to6#5
|
|
|
|
|
Patch0: use-pathlib-directly.patch
|
2019-04-15 09:24:26 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2020-03-10 09:05:27 +00:00
|
|
|
BuildRequires: fdupes
|
2019-04-21 11:18:03 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-03-10 09:05:27 +00:00
|
|
|
Requires: python-astor
|
|
|
|
|
Requires: python-click
|
|
|
|
|
Requires: python-typing
|
2020-10-10 06:56:40 +00:00
|
|
|
Requires: python-wheel
|
2020-05-25 09:25:20 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-04-28 11:28:18 +00:00
|
|
|
Requires(postun):update-alternatives
|
2020-03-10 09:05:27 +00:00
|
|
|
BuildArch: noarch
|
2019-04-15 09:24:26 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module astor}
|
|
|
|
|
BuildRequires: %{python_module click}
|
2020-10-10 06:56:40 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-04-15 09:24:26 +00:00
|
|
|
BuildRequires: %{python_module typing}
|
|
|
|
|
# /SECTION
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
2019-04-21 11:18:03 +00:00
|
|
|
A module to compile Python 3.6+ code to Python 2.7+.
|
2019-04-15 09:24:26 +00:00
|
|
|
|
|
|
|
|
%prep
|
2022-08-08 05:22:19 +00:00
|
|
|
%autosetup -p1 -n lib3to6-%{version}
|
2019-04-15 09:24:26 +00:00
|
|
|
sed -i '1{/^#!/d}' src/lib3to6/__main__.py
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
2020-05-25 09:25:20 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/lib3to6
|
2019-04-15 09:24:26 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
2020-10-10 06:56:40 +00:00
|
|
|
# Avoid Python 3.8 specific test cases to support Leap 15.x
|
|
|
|
|
%pytest -k 'not (fixture7 or fixture17 or fixture53 or fixture54 or fixture55 or fixture56 or fixture57)'
|
2019-04-15 09:24:26 +00:00
|
|
|
|
2020-05-25 09:25:20 +00:00
|
|
|
%post
|
|
|
|
|
%python_install_alternative lib3to6
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative lib3to6
|
|
|
|
|
|
2019-04-15 09:24:26 +00:00
|
|
|
%files %{python_files}
|
|
|
|
|
%doc CHANGELOG.md README.md
|
|
|
|
|
%license LICENSE
|
2020-05-25 09:25:20 +00:00
|
|
|
%python_alternative %{_bindir}/lib3to6
|
2019-04-15 09:24:26 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
|
|
%changelog
|