do some finagling to make it build again
Signed-off-by: Ricky Elrod <ricky@elrod.me>
This commit is contained in:
parent
1b468ddeb3
commit
caa3d2b04c
@ -20,7 +20,8 @@ Source0: http://pypi.python.org/packages/source/F/Flask/%{srcname}-%{srcv
|
|||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel python-setuptools python-werkzeug python-sphinx
|
BuildRequires: python2-devel python-setuptools python-werkzeug python-sphinx
|
||||||
Requires: python-werkzeug
|
BuildRequires: python-click
|
||||||
|
Requires: python-werkzeug python-click
|
||||||
|
|
||||||
# if we're not on rhel, 0%%{?rhel} < 7, so we need to also check for 0%{?rhel}
|
# if we're not on rhel, 0%%{?rhel} < 7, so we need to also check for 0%{?rhel}
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||||
@ -63,9 +64,11 @@ BuildRequires: python3-jinja2
|
|||||||
BuildRequires: python3-werkzeug
|
BuildRequires: python3-werkzeug
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-itsdangerous
|
BuildRequires: python3-itsdangerous
|
||||||
|
BuildRequires: python3-click
|
||||||
Requires: python3-jinja2
|
Requires: python3-jinja2
|
||||||
Requires: python3-werkzeug
|
Requires: python3-werkzeug
|
||||||
Requires: python3-itsdangerous
|
Requires: python3-itsdangerous
|
||||||
|
Requires: python3-click
|
||||||
|
|
||||||
%description -n python3-flask
|
%description -n python3-flask
|
||||||
Flask is called a “micro-framework” because the idea to keep the core
|
Flask is called a “micro-framework” because the idea to keep the core
|
||||||
@ -115,7 +118,7 @@ popd
|
|||||||
# Need to install flask in the setuptools "develop" mode to build docs
|
# Need to install flask in the setuptools "develop" mode to build docs
|
||||||
# The BuildRequires on Werkzeug, Jinja2 and Sphinx is due to this as well.
|
# The BuildRequires on Werkzeug, Jinja2 and Sphinx is due to this as well.
|
||||||
export PYTHONPATH=%{buildroot}%{python_sitelib}
|
export PYTHONPATH=%{buildroot}%{python_sitelib}
|
||||||
%{__python} setup.py develop --install-dir %{buildroot}%{python_sitelib}
|
%{__python} setup.py develop --prefix %{buildroot}/%{_prefix}
|
||||||
make -C docs html
|
make -C docs html
|
||||||
|
|
||||||
rm -rf %{buildroot}%{python_sitelib}/site.py
|
rm -rf %{buildroot}%{python_sitelib}/site.py
|
||||||
@ -127,13 +130,17 @@ rm -rf examples/flaskr/*.pyc
|
|||||||
rm -rf examples/jqueryexample/*.pyc
|
rm -rf examples/jqueryexample/*.pyc
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
|
|
||||||
|
# Move the python2-installed script so it doesn't get overwritten.
|
||||||
|
mv %{buildroot}/%{_bindir}/flask %{buildroot}/%{_bindir}/python2-flask
|
||||||
|
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
# Need to install flask in the setuptools "develop" mode to build docs
|
# Need to install flask in the setuptools "develop" mode to build docs
|
||||||
# The BuildRequires on Werkzeug, Jinja2 and Sphinx is due to this as well.
|
# The BuildRequires on Werkzeug, Jinja2 and Sphinx is due to this as well.
|
||||||
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
||||||
%{__python3} setup.py develop --install-dir %{buildroot}%{python3_sitelib}
|
%{__python3} setup.py develop --prefix %{buildroot}/%{_prefix}
|
||||||
make -C docs html
|
make -C docs html
|
||||||
|
|
||||||
rm -rf %{buildroot}%{python3_sitelib}/site.py
|
rm -rf %{buildroot}%{python3_sitelib}/site.py
|
||||||
@ -144,6 +151,11 @@ rm -rf docs/_build/html/.buildinfo
|
|||||||
rm -rf examples/minitwit/*.pyc
|
rm -rf examples/minitwit/*.pyc
|
||||||
rm -rf examples/flaskr/*.pyc
|
rm -rf examples/flaskr/*.pyc
|
||||||
rm -rf examples/jqueryexample/*.pyc
|
rm -rf examples/jqueryexample/*.pyc
|
||||||
|
|
||||||
|
# Do some juggling to put `flask` (python2) back in place.
|
||||||
|
mv %{buildroot}/%{_bindir}/flask %{buildroot}/%{_bindir}/python3-flask
|
||||||
|
mv %{buildroot}/%{_bindir}/python2-flask %{buildroot}/%{_bindir}/flask
|
||||||
|
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -163,6 +175,7 @@ popd
|
|||||||
%{python_sitelib}/*.egg-info
|
%{python_sitelib}/*.egg-info
|
||||||
%{python_sitelib}/*.egg-link
|
%{python_sitelib}/*.egg-link
|
||||||
%{python_sitelib}/flask
|
%{python_sitelib}/flask
|
||||||
|
%{_bindir}/flask
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc docs/_build/html examples
|
%doc docs/_build/html examples
|
||||||
@ -173,6 +186,7 @@ popd
|
|||||||
%{python3_sitelib}/*.egg-info
|
%{python3_sitelib}/*.egg-info
|
||||||
%{python3_sitelib}/*.egg-link
|
%{python3_sitelib}/*.egg-link
|
||||||
%{python3_sitelib}/flask
|
%{python3_sitelib}/flask
|
||||||
|
%{_bindir}/python3-flask
|
||||||
|
|
||||||
%files -n python3-flask-doc
|
%files -n python3-flask-doc
|
||||||
%doc docs/_build/html examples
|
%doc docs/_build/html examples
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user