forked from pool/python-py2pack
Accepting request 1086602 from home:bnavigator:branches:devel:languages:python
- Replace build_sphinx setuptools hook with direct sphinx-build call -- fixes boo#1211051 - Move to PEP517 macros for buildin py2pack - Remove shebang from __init__.py OBS-URL: https://build.opensuse.org/request/show/1086602 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py2pack?expand=0&rev=95
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 11 18:32:06 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Replace build_sphinx setuptools hook with direct sphinx-build
|
||||||
|
call -- fixes boo#1211051
|
||||||
|
- Move to PEP517 macros for buildin py2pack
|
||||||
|
- Remove shebang from __init__.py
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 7 07:22:01 UTC 2023 - pgajdos@suse.com
|
Tue Mar 7 07:22:01 UTC 2023 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
Name: python-py2pack
|
Name: python-py2pack
|
||||||
Version: 0.8.7
|
Version: 0.8.7
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -28,8 +27,10 @@ Source: https://files.pythonhosted.org/packages/source/p/py2pack/py2pack
|
|||||||
BuildRequires: %{python_module Jinja2}
|
BuildRequires: %{python_module Jinja2}
|
||||||
BuildRequires: %{python_module metaextract}
|
BuildRequires: %{python_module metaextract}
|
||||||
BuildRequires: %{python_module pbr}
|
BuildRequires: %{python_module pbr}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pypi-search}
|
BuildRequires: %{python_module pypi-search}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
# SECTION doc requirements
|
# SECTION doc requirements
|
||||||
BuildRequires: python3-Sphinx
|
BuildRequires: python3-Sphinx
|
||||||
BuildRequires: python3-sphinxcontrib-programoutput
|
BuildRequires: python3-sphinxcontrib-programoutput
|
||||||
@@ -63,15 +64,29 @@ Documentation and help files for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n py2pack-%{version}
|
%setup -q -n py2pack-%{version}
|
||||||
|
# remove shebang
|
||||||
|
sed -i '1{/#!/d}' py2pack/__init__.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
python3 setup.py build_sphinx
|
|
||||||
|
# build docs, cli.rst needs py2pack as executable
|
||||||
|
mkdir -p build/directbin/
|
||||||
|
cat <<EOF > build/directbin/py2pack
|
||||||
|
#!%{__python3}
|
||||||
|
import sys
|
||||||
|
import py2pack
|
||||||
|
sys.exit(py2pack.main())
|
||||||
|
EOF
|
||||||
|
chmod +x build/directbin/py2pack
|
||||||
|
export PATH="$PWD/build/directbin/:$PATH"
|
||||||
|
export PYTHONPATH=$PWD
|
||||||
|
sphinx-build -b html doc/source doc/build/html
|
||||||
# remove the sphinx-build leftovers
|
# remove the sphinx-build leftovers
|
||||||
rm -rf doc/build/html/.{doctrees,buildinfo}
|
rm -rf doc/build/html/.{doctrees,buildinfo}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/py2pack
|
%python_clone -a %{buildroot}%{_bindir}/py2pack
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
@@ -83,7 +98,7 @@ rm -rf doc/build/html/.{doctrees,buildinfo}
|
|||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%python_alternative %{_bindir}/py2pack
|
%python_alternative %{_bindir}/py2pack
|
||||||
%{python_sitelib}/py2pack-%{version}-py*.egg-info
|
%{python_sitelib}/py2pack-%{version}.dist-info
|
||||||
%{python_sitelib}/py2pack/
|
%{python_sitelib}/py2pack/
|
||||||
|
|
||||||
%files -n %{name}-doc
|
%files -n %{name}-doc
|
||||||
|
Reference in New Issue
Block a user