Accepting request 763281 from home:bmwiedemann:branches:devel:languages:python:jupyter

Use pyproject_install macro (boo#1094323)
- Do not rewrite source artifact

OBS-URL: https://build.opensuse.org/request/show/763281
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbdime?expand=0&rev=15
This commit is contained in:
Todd R 2020-01-15 14:45:51 +00:00 committed by Git OBS Bridge
parent bf7bb6b6c0
commit 3e2f4973dc
2 changed files with 12 additions and 9 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Jan 11 14:10:51 UTC 2020 - Bernhard Wiedemann <bwiedemann@suse.com>
- Use pyproject_install macro (boo#1094323)
- Do not rewrite source artifact
-------------------------------------------------------------------
Tue Nov 12 17:38:51 UTC 2019 - Todd R <toddrme2178@gmail.com>

View File

@ -40,8 +40,6 @@ BuildRequires: %{python_module tornado}
BuildRequires: fdupes
BuildRequires: jupyter-jupyterlab-filesystem
BuildRequires: python-rpm-macros
BuildRequires: unzip
BuildRequires: zip
BuildRequires: python-backports.functools_lru_cache
BuildRequires: python-backports.shutil_which
# SECTION test requirements
@ -138,20 +136,18 @@ This package provides mercurial integration.
%prep
%setup -q -c -T
unzip %{SOURCE0} 'nbdime/*'
find . -type f -name "*.py" -exec sed -i 's/\r$//' {} +
find . -type f -name "*.ipynb" -exec sed -i 's/\r$//' {} +
find nbdime/ -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} +
zip -r %{SOURCE0} nbdime
rm -rf nbdime
%build
# Not needed
%install
%python_expand pip%{$python_bin_suffix} install --root=%{buildroot} %{SOURCE0}
cp -a %{SOURCE0} .
%pyproject_install
%{jupyter_move_config}
%python_expand find %{buildroot}%{$python_sitelib} -type f -name "*.py" -exec sed -i 's/\r$//' {} +
%python_expand find %{buildroot}%{$python_sitelib} -type f -name "*.ipynb" -exec sed -i 's/\r$//' {} +
%python_expand find %{buildroot}%{$python_sitelib}/nbdime/ -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} +
cp %{buildroot}%{python3_sitelib}/nbdime-%{mainver}.dist-info/LICENSE.md .
%python_expand %fdupes %{buildroot}%{$python_sitelib}
@ -159,6 +155,7 @@ cp %{buildroot}%{python3_sitelib}/nbdime-%{mainver}.dist-info/LICENSE.md .
%check
export PATH=$PATH:%{buildroot}%{_bindir}
export PYTHONDONTWRITEBYTECODE=1
git config --global user.email "test@test.com"
git config --global user.name "tester"
%pytest %{buildroot}%{python3_sitelib}/nbdime/