1- %if 0%{?fedora } || 0%{?rhel } >= 8
2- %global build_py3 1
3- %endif
4-
51Name: python-varlink
62Version: 30.3.1
73Release: 1%{?dist }
@@ -11,73 +7,41 @@ URL: https://github.com/varlink/%{name}
117Source0: https://github.com/varlink/%{name }/archive/%{version }/%{name }-%{version }.tar.gz
128BuildArch: noarch
139
14- BuildRequires: python2-devel
15- BuildRequires: python-rpm-macros
16- BuildRequires: python-setuptools
17- BuildRequires: python-setuptools_scm
18-
19- %if 0%{?build_py3 }
2010BuildRequires: python3-devel
2111BuildRequires: python3-rpm-macros
22- %endif
12+ BuildRequires: python3-setuptools
13+ BuildRequires: python3-setuptools_scm
2314
2415
2516%global _description \
2617An python module for Varlink with client and server support.
2718
2819%description %_description
2920
30- %package -n python2-varlink
31- Summary: %summary
32- %{?python_provide:%python_provide python2-varlink}
33-
34-
35- %if 0%{?build_py3 }
3621%package -n python3-varlink
3722Summary: %summary
3823%{?python_provide:%python_provide python3-varlink}
39- %endif
40-
41- %description -n python2-varlink %_description
4224
43- %if 0%{?build_py3 }
4425%description -n python3-varlink %_description
45- %endif
4626
4727%prep
4828%autosetup -n python-%{version }
4929
5030%build
5131export SETUPTOOLS_SCM_PRETEND_VERSION=%{version }
52- %py2_build
53- %if 0%{?build_py3 }
5432%py3_build
55- %endif
5633
57-
58- %if 0%{?build_py3 }
5934%check
6035export SETUPTOOLS_SCM_PRETEND_VERSION=%{version }
6136CFLAGS=" %{optflags}" %{__python3} %{py_setup } %{?py_setup_args } check
62- %endif
6337
6438%install
6539export SETUPTOOLS_SCM_PRETEND_VERSION=%{version }
66- %py2_install
67- %if 0%{?build_py3 }
6840%py3_install
69- %endif
70-
71- %files -n python2-varlink
72- %license LICENSE.txt
73- %doc README.md
74- %{python2_sitelib }/*
7541
76- %if 0%{?build_py3 }
7742%files -n python3-varlink
7843%license LICENSE.txt
7944%doc README.md
8045%{python3_sitelib }/*
81- %endif
8246
8347%changelog
0 commit comments