public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-py] pr7: simplify spec file
@ 2026-08-01 11:43 Igor Gnatenko
0 siblings, 0 replies; only message in thread
From: Igor Gnatenko @ 2026-08-01 11:43 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-py
Branch : pr7
Commit : 880e6417a513b60dea174809bc1eae39ff110415
Author : Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Date : 2017-11-04T10:27:07+01:00
Stats : +16/-57 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-py/c/880e6417a513b60dea174809bc1eae39ff110415?branch=pr7
Log:
simplify spec file
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
---
diff --git a/python-py.spec b/python-py.spec
index c2c91d3..f73f273 100644
--- a/python-py.spec
+++ b/python-py.spec
@@ -47,7 +47,7 @@ Summary: Library with cross-python path, ini-parsing, io, code, log facil
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%if %{with docs}
-BuildRequires: python-sphinx
+BuildRequires: %{_bindir}/sphinx-build-2
%endif # with_docs
%if %{with tests}
BuildRequires: python2-pytest >= %{pytest_version_lb}, python2-pytest < %{pytest_version_ub}
@@ -75,7 +75,7 @@ Summary: Library with cross-python path, ini-parsing, io, code, log facil
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%if %{with docs}
-BuildRequires: python3-sphinx
+BuildRequires: %{_bindir}/sphinx-build-3
%endif # with_docs
%if %{with tests}
BuildRequires: python3-pytest >= %{pytest_version_lb}, python3-pytest < %{pytest_version_ub}
@@ -98,100 +98,59 @@ following tools and modules:
%endif
%prep
-%setup -qc -n %{srcname}-%{version}
-pushd %{srcname}-%{version}
+%autosetup -n %{srcname}-%{version}
# remove shebangs and fix permissions
find -type f -a \( -name '*.py' -o -name 'py.*' \) \
-exec sed -i '1{/^#!/d}' {} \; \
-exec chmod u=rw,go=r {} \;
-popd
-mv %{srcname}-%{version} python2
-cp -a python2 python3
-
-
%build
-%if %{with python2}
-pushd python2
%py2_build
-
-%if %{with docs}
-make -C doc html PYTHONPATH=$(pwd)
-%endif # with_docs
-popd
-
-%endif
-
-%if %{with python3}
-pushd python3
%py3_build
-
%if %{with docs}
-make -C doc html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-3
-%endif # with_docs
+export PYTHONPATH=$(pwd)
+pushd doc
+ sphinx-build-2 -b html -d _build-2/doctrees . _build-2/html
+ sphinx-build-3 -b html -d _build-3/doctrees . _build-3/html
popd
-%endif
+%endif # with_docs
%install
-%if %{with python2}
-pushd python2
%py2_install
-# remove hidden file
-rm -rf doc/_build/html/.buildinfo
-popd
-%endif
-
-%if %{with python3}
-pushd python3
%py3_install
# remove hidden file
rm -rf doc/_build/html/.buildinfo
-popd
-%endif
%check
%if %{with tests}
-%if %{with python2}
# disable failing Subversion checks for now
-pushd python2
PYTHONPATH=%{buildroot}%{python2_sitelib} \
LC_ALL="en_US.UTF-8" \
py.test-%{python2_version} -r s -k"-TestWCSvnCommandPath" testing
-popd
-%endif
-
-%if %{with python3}
-pushd python3
PYTHONPATH=%{buildroot}%{python3_sitelib} \
LC_ALL="en_US.UTF-8" \
py.test-%{python3_version} -r s -k"-TestWCSvnCommandPath" testing
-popd
-%endif
%endif # with tests
-%if %{with python2}
%files -n python2-%{srcname}
-%doc python2/CHANGELOG
-%doc python2/README.rst
-%license python2/LICENSE
+%doc CHANGELOG
+%doc README.rst
+%license LICENSE
%if %{with docs}
-%doc python2/doc/_build/html
+%doc doc/_build-2/html
%endif # with_docs
%{python2_sitelib}/*
-%endif
-%if %{with python3}
%files -n python3-%{srcname}
-%doc python3/CHANGELOG
-%doc python3/README.rst
-%license python3/LICENSE
+%doc CHANGELOG
+%doc README.rst
+%license LICENSE
%if %{with docs}
-%doc python3/doc/_build/html
+%doc doc/_build-3/html
%endif # with_docs
%{python3_sitelib}/*
-%endif
%changelog
* Fri Nov 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.4.34-6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-01 11:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-01 11:43 [rpms/python-py] pr7: simplify spec file Igor Gnatenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox