forked from pool/python-pysvn
Accepting request 856055 from devel:languages:python
- Replace %__python3 with %python_exec - Adopt spec file from Fedora and enable testing. OBS-URL: https://build.opensuse.org/request/show/856055 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pysvn?expand=0&rev=30
This commit is contained in:
@@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 15 15:24:30 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Replace %__python3 with %python_exec
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 14 20:09:13 UTC 2020 - andy great <andythe_great@pm.me>
|
||||||
|
|
||||||
|
- Adopt spec file from Fedora and enable testing.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Dec 11 13:34:16 UTC 2020 - andy great <andythe_great@pm.me>
|
Fri Dec 11 13:34:16 UTC 2020 - andy great <andythe_great@pm.me>
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define packagename pysvn
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-pysvn
|
Name: python-pysvn
|
||||||
Version: 1.9.12
|
Version: 1.9.12
|
||||||
@@ -24,7 +25,7 @@ Summary: Highlevel Subversion Python Bindings
|
|||||||
License: Apache-1.1
|
License: Apache-1.1
|
||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
URL: https://pysvn.sourceforge.io/
|
URL: https://pysvn.sourceforge.io/
|
||||||
Source0: https://sourceforge.net/projects/pysvn/files/pysvn/V1.9.12/pysvn-%{version}.tar.gz
|
Source0: https://sourceforge.net/projects/pysvn/files/pysvn/V%{version}/pysvn-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module pycxx-devel}
|
BuildRequires: %{python_module pycxx-devel}
|
||||||
BuildRequires: %{python_module xml}
|
BuildRequires: %{python_module xml}
|
||||||
@@ -54,41 +55,39 @@ Features:
|
|||||||
* No need to understand the Subversion C API
|
* No need to understand the Subversion C API
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pysvn-%{version}
|
%setup -q -n %{packagename}-%{version}
|
||||||
|
|
||||||
|
# Remove bundled libs
|
||||||
|
rm -rf Import
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
%{python_expand cp -r Source Source-%{$python_bin_suffix}
|
pushd Source
|
||||||
pushd Source-%{$python_bin_suffix}
|
%python_exec setup.py configure --enable-debug --verbose --fixed-module-name --norpath
|
||||||
$python setup.py backport
|
|
||||||
$python setup.py configure \
|
|
||||||
--enable-debug --verbose --fixed-module-name --norpath \
|
|
||||||
--pycxx-dir=%{$python_sysconfig_path include}/ --pycxx-src-dir=%{_datadir}/python%{$python_bin_suffix}/CXX
|
|
||||||
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 %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{python_expand mkdir -p %{buildroot}/%{$python_sitearch}/pysvn
|
install -d -m 755 %{buildroot}%{python_sitearch}/%{packagename}
|
||||||
pushd Source-%{$python_bin_suffix}
|
install -p -m 644 Source/%{packagename}/__init__.py %{buildroot}%{python_sitearch}/%{packagename}
|
||||||
cp pysvn/{__init__.py,_pysvn*.so} %{buildroot}/%{$python_sitearch}/pysvn
|
install -p -m 755 Source/%{packagename}/_pysvn.so %{buildroot}%{python_sitearch}/%{packagename}
|
||||||
$python -m compileall -d %{$python_sitearch} %{buildroot}/%{$python_sitearch}/pysvn
|
|
||||||
$python -O -m compileall -d %{$python_sitearch} %{buildroot}/%{$python_sitearch}/pysvn
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
rm -f Docs/generate_cpp_docs_from_html_docs.py
|
|
||||||
|
|
||||||
%fdupes %{buildroot}%{python_sitearch}/pysvn/__pycache__
|
%fdupes %{buildroot}%{python_sitearch}/%{packagename}/__pycache__
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Disabled test because there are errors. Bug report: https://sourceforge.net/p/pysvn/tickets/8/
|
pushd Tests
|
||||||
# cd Tests
|
# the tests expect a valid answer from locale.getdefaultlocale()
|
||||||
# %%python_expand PYTHONPATH=%%{buildroot}%%{$python_sitearch} PYTHON=$python make %%{?_smp_mflags} || :
|
# C.UTF-8 does not work. Use en_US.utf-8.
|
||||||
|
# The test have not been test in parallel, use one core for now.
|
||||||
|
export LC_ALL=en_US.UTF-8
|
||||||
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} PYTHON=$python make -j1
|
||||||
|
popd
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc Docs Examples
|
%doc Docs Examples
|
||||||
%{python_sitearch}/pysvn
|
%dir %{python_sitearch}/%{packagename}
|
||||||
|
%{python_sitearch}/%{packagename}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user