Skip to content

Commit d98728a

Browse files
committed
make-srpm.sh: move pycsdiff.so to the python2-csdiff subpkg
1 parent fb65429 commit d98728a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

make-srpm.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,22 @@ Source0: https://git.fedorahosted.org/cgit/codescan-diff.git/snapshot/$SRC
8585
BuildRequires: boost-devel
8686
BuildRequires: cmake
8787
BuildRequires: help2man
88-
BuildRequires: python-devel
8988
9089
%description
9190
This package contains the csdiff tool for comparing code scan defect lists in
9291
order to find out added or fixed defects, and the csgrep utility for filtering
9392
defect lists using various filtering predicates.
9493
94+
%package -n python2-%{name}
95+
Summary: Python interface to csdiff for Python 2
96+
Conflicts: %{name} <= 1.2.3
97+
BuildRequires: python2-devel
98+
%{?python_provide:%python_provide python2-%{name}}
99+
100+
%description -n python2-%{name}
101+
This package contains the Python 2 binding for the csdiff tool for comparing
102+
code scan defect lists to find out added or fixed defects.
103+
95104
%if 0%{?rhel} && 0%{?rhel} <= 6
96105
%{!?__python2: %global __python2 /usr/bin/python2}
97106
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
@@ -104,7 +113,7 @@ defect lists using various filtering predicates.
104113
make version.cc
105114
mkdir csdiff_build
106115
cd csdiff_build
107-
%cmake ..
116+
%cmake .. -DPYTHON_EXECUTABLE=%{__python2}
108117
make %{?_smp_mflags} VERBOSE=yes
109118
110119
%install
@@ -126,8 +135,11 @@ ctest %{?_smp_mflags} --output-on-failure
126135
%{_mandir}/man1/cshtml.1*
127136
%{_mandir}/man1/cslinker.1*
128137
%{_mandir}/man1/cssort.1*
129-
%{python2_sitearch}/pycsdiff.so
130138
%doc COPYING README
139+
140+
%files -n python2-%{name}
141+
%{python2_sitearch}/pycsdiff.so
142+
%doc COPYING
131143
EOF
132144

133145
set -v

0 commit comments

Comments
 (0)