forked from pool/python-pysvn
Accepting request 889873 from home:bnavigator:branches:devel:languages:python
- Disable python39 build: Need to update pycxx-devel first - Fix multiflavor build OBS-URL: https://build.opensuse.org/request/show/889873 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysvn?expand=0&rev=55
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun May 2 22:58:02 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Disable python39 build: Need to update pycxx-devel first
|
||||||
|
- Fix multiflavor build
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 23 17:46:13 UTC 2021 - andy great <andythe_great@pm.me>
|
Tue Feb 23 17:46:13 UTC 2021 - andy great <andythe_great@pm.me>
|
||||||
|
|
||||||
|
@@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
%define packagename pysvn
|
%define packagename pysvn
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
# Needs a newer pycxx-devel
|
||||||
|
%define skip_python39 1
|
||||||
Name: python-pysvn
|
Name: python-pysvn
|
||||||
Version: 1.9.12
|
Version: 1.9.12
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -58,49 +60,53 @@ Features:
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{packagename}-%{version}
|
%setup -q -n %{packagename}-%{version}
|
||||||
|
|
||||||
|
%{python_expand # python_build and python_install not applicable: not the standard setuptools workflow
|
||||||
|
# copy pristine dirs to flavor specific directory (shuffled by python_expand)
|
||||||
|
mkdir -p build
|
||||||
|
cp -r Builder Docs Examples Kit Patches Source Tests build/
|
||||||
|
}
|
||||||
|
|
||||||
|
rm -r Builder Docs Examples Kit Patches Source Tests
|
||||||
# Remove bundled libs
|
# Remove bundled libs
|
||||||
rm -rf Import
|
rm -rf Import
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
pushd Source
|
%{python_expand #
|
||||||
%python_exec setup.py configure --enable-debug --verbose --fixed-module-name --norpath
|
pushd build/Source
|
||||||
|
$python setup.py configure --enable-debug --verbose --fixed-module-name --norpath
|
||||||
|
|
||||||
sed -i -e 's@-Wall -fPIC -fexceptions -frtti@%{optflags} -fPIC -frtti@' Makefile
|
sed -i -e 's@-Wall -fPIC -fexceptions -frtti@%{optflags} -fPIC -frtti@' Makefile
|
||||||
%make_build
|
%make_build
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Using install does not automatically expand to python36 and python38.
|
%{python_expand #
|
||||||
# So manually install it.
|
install -d -m 755 %{buildroot}%{$python_sitearch}/%{packagename}
|
||||||
|
install -p -m 644 build/Source/pysvn/__init__.py %{buildroot}%{$python_sitearch}/%{packagename}
|
||||||
|
install -p -m 755 build/Source/pysvn/_pysvn.so %{buildroot}%{$python_sitearch}/%{packagename}
|
||||||
|
|
||||||
%if 0%{?sle_version} > 0 && 0%{?sle_version} <= 150200
|
mkdir -p pkgdoc-%{$python_bin_suffix}
|
||||||
install -d -m 755 %{buildroot}%{_libdir}/python2.7/site-packages/%{packagename}
|
cp -r build/Docs build/Examples pkgdoc-%{$python_bin_suffix}
|
||||||
install -p -m 644 Source/pysvn/__init__.py %{buildroot}%{_libdir}/python2.7/site-packages/%{packagename}
|
|
||||||
install -p -m 755 Source/pysvn/_pysvn.so %{buildroot}%{_libdir}/python2.7/site-packages/%{packagename}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{python36_sitearch}/%{packagename}
|
%fdupes %{buildroot}%{$python_sitearch}
|
||||||
install -p -m 644 Source/pysvn/__init__.py %{buildroot}%{python36_sitearch}/%{packagename}
|
}
|
||||||
install -p -m 755 Source/pysvn/_pysvn.so %{buildroot}%{python36_sitearch}/%{packagename}
|
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{python38_sitearch}/%{packagename}
|
|
||||||
install -p -m 644 Source/pysvn/__init__.py %{buildroot}%{python38_sitearch}/%{packagename}
|
|
||||||
install -p -m 755 Source/pysvn/_pysvn.so %{buildroot}%{python38_sitearch}/%{packagename}
|
|
||||||
|
|
||||||
%fdupes %{buildroot}%{python_sitearch}/%{packagename}*
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd Tests
|
%{python_expand #
|
||||||
|
pushd build/Tests
|
||||||
# the tests expect a valid answer from locale.getdefaultlocale()
|
# the tests expect a valid answer from locale.getdefaultlocale()
|
||||||
# C.UTF-8 does not work. Use en_US.utf-8.
|
# C.UTF-8 does not work. Use en_US.utf-8.
|
||||||
# The test have not been test in parallel, use one core for now.
|
# The test have not been test in parallel, use one core for now.
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} make -j1
|
PYTHONPATH=%{buildroot}%{$python_sitearch} make -j1
|
||||||
popd
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc Docs Examples
|
%doc pkgdoc-%{python_bin_suffix}/Docs pkgdoc-%{python_bin_suffix}/Examples
|
||||||
%{python_sitearch}/%{packagename}
|
%{python_sitearch}/%{packagename}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user