public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/python-py] pr7: simplify spec file
Date: Sat, 01 Aug 2026 11:43:27 GMT [thread overview]
Message-ID: <178558460704.1.15618506025658693258.rpms-python-py-880e6417a513@fedoraproject.org> (raw)
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
reply other threads:[~2026-08-01 11:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178558460704.1.15618506025658693258.rpms-python-py-880e6417a513@fedoraproject.org \
--to=ignatenkobrain@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox