Skip to content

Commit a4e2ff4

Browse files
committed
make it possible to build 'python3.1?t-setuptools'
1 parent d6ff305 commit a4e2ff4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packaging/rpm/python3-setuptools.spec

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
%define _disable_source_fetch 0
33
%if "%{getenv:PYTHON3}" == ""
44
%global python3 python3
5+
%define python3_interpreter python3
6+
%define python3_devel python3-devel
57
%else
68
%global python3 %{getenv:PYTHON3}
79
%undefine __pythondist_requires
810
%undefine __python_requires
911
%define python3_sitelib %(%{python3} -Ic "from sysconfig import get_path; print(get_path('purelib').replace('/usr/local/', '/usr/'))" 2> /dev/null)
12+
%define python3_interpreter %(echo %{python3} | sed 's/t$//g')
13+
%define python3_devel %{python3_interpreter}-devel
1014
%endif
1115

1216
Name: %{python3}-%{srcname}
@@ -17,8 +21,8 @@ License: MIT
1721
URL: http://pypi.python.org/pypi/%{srcname}
1822
Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz
1923
BuildArch: noarch
20-
BuildRequires: %{python3}-devel
21-
Requires: %{python3}
24+
BuildRequires: %{python3_devel}
25+
Requires: %{python3_interpreter}
2226

2327
%description
2428
Setuptools_scm handles managing your python package versions in scm metadata.

0 commit comments

Comments
 (0)