Blame SPECS/python-py.spec

5ee328
%if 0%{?fedora} > 12
5ee328
%global with_python3 1
5ee328
%global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
5ee328
%endif
5ee328
%if 0%{?rhel} && 0%{?rhel} < 6
5ee328
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
5ee328
%endif
5ee328
5ee328
# we have a circular (build) dependency with the (new) pytest package
5ee328
# when generating the docs or running the testsuite
5ee328
%global with_docs 1
5ee328
%global run_check 1
5ee328
5ee328
%global pytest_version 2.3.1
5ee328
5ee328
Name:           python-py
5ee328
Version:        1.4.32
5ee328
Release:        1%{?dist}
5ee328
Summary:        Library with cross-python path, ini-parsing, io, code, log facilities
5ee328
Group:          Development/Languages
5ee328
License:        MIT and Public Domain
5ee328
#               main package: MIT, except: doc/style.css: Public Domain
5ee328
URL:            http://py.readthedocs.io
5ee328
Source:         https://files.pythonhosted.org/packages/source/p/py/py-%{version}.tar.gz
5ee328
# Replace the decorator for skipping the Python 3.6 tests with a compatible one for
5ee328
# the RHEL 7 version of pytest
5ee328
Patch0:         skip-python3.6-tests.patch
5ee328
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5ee328
BuildArch:      noarch
5ee328
BuildRequires:  python-devel
5ee328
BuildRequires:  python-setuptools
5ee328
Requires:       python-setuptools
5ee328
%if 0%{?with_docs}
5ee328
%if 0%{?rhel} > 6 || 0%{?fedora}
5ee328
BuildRequires:  python-sphinx
5ee328
%else
5ee328
BuildRequires:  python-sphinx10
5ee328
%endif # fedora
5ee328
%endif # with_docs
5ee328
%if 0%{?run_check}
5ee328
BuildRequires:  pytest >= %{pytest_version}
5ee328
%endif # run_check
5ee328
%if 0%{?with_python3}
5ee328
BuildRequires:  python3-devel
5ee328
BuildRequires:  python3-setuptools
5ee328
%if 0%{?run_check}
5ee328
BuildRequires:  python3-pytest >= %{pytest_version}
5ee328
%endif # run_check
5ee328
%endif # with_python3
5ee328
5ee328
# needed by the testsuite
5ee328
BuildRequires:  subversion
5ee328
5ee328
Provides: python2-py = %{version}-%{release}
5ee328
5ee328
%description
5ee328
The py lib is a Python development support library featuring the
5ee328
following tools and modules:
5ee328
5ee328
  * py.path: uniform local and svn path objects
5ee328
  * py.apipkg: explicit API control and lazy-importing
5ee328
  * py.iniconfig: easy parsing of .ini files
5ee328
  * py.code: dynamic code generation and introspection
5ee328
  * py.path: uniform local and svn path objects
5ee328
5ee328
%if 0%{?with_python3}
5ee328
%package -n python3-py
5ee328
Summary:        Library with cross-python path, ini-parsing, io, code, log facilities
5ee328
Requires:       python3-setuptools
5ee328
5ee328
%description -n python3-py
5ee328
The py lib is a Python development support library featuring the
5ee328
following tools and modules:
5ee328
5ee328
  * py.path: uniform local and svn path objects
5ee328
  * py.apipkg: explicit API control and lazy-importing
5ee328
  * py.iniconfig: easy parsing of .ini files
5ee328
  * py.code: dynamic code generation and introspection
5ee328
  * py.path: uniform local and svn path objects
5ee328
5ee328
%endif # with_python3
5ee328
5ee328
%prep
5ee328
%setup -q -n py-%{version}
5ee328
%patch0 -p1
5ee328
5ee328
# remove shebangs and fix permissions
5ee328
find -type f -a \( -name '*.py' -o -name 'py.*' \) \
5ee328
   -exec sed -i '1{/^#!/d}' {} \; \
5ee328
   -exec chmod u=rw,go=r {} \;
5ee328
5ee328
%if 0%{?with_python3}
5ee328
cp -a . %{py3dir}
5ee328
%endif # with_python3
5ee328
5ee328
5ee328
%build
5ee328
%{__python} setup.py build
5ee328
5ee328
%if 0%{?with_docs}
5ee328
%if 0%{?rhel} > 6 || 0%{?fedora}
5ee328
make -C doc html PYTHONPATH=$(pwd)
5ee328
%else
5ee328
make -C doc html SPHINXBUILD=sphinx-1.0-build PYTHONPATH=$(pwd)
5ee328
%endif # fedora
5ee328
%endif # with_docs
5ee328
5ee328
%if 0%{?with_python3}
5ee328
pushd %{py3dir}
5ee328
%{__python3} setup.py build
5ee328
popd
5ee328
%endif # with_python3
5ee328
5ee328
5ee328
%install
5ee328
rm -rf %{buildroot}
5ee328
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
5ee328
5ee328
%if 0%{?with_python3}
5ee328
pushd %{py3dir}
5ee328
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
5ee328
popd
5ee328
%endif # with_python3
5ee328
5ee328
# remove hidden file
5ee328
rm -rf doc/_build/html/.buildinfo
5ee328
5ee328
5ee328
%check
5ee328
%if 0%{?run_check}
5ee328
PYTHONPATH=%{buildroot}%{python_sitelib} \
5ee328
LC_ALL="en_US.UTF-8" \
5ee328
py.test -r s
5ee328
%if 0%{?with_python3}
5ee328
pushd %{py3dir}
5ee328
PYTHONPATH=%{buildroot}%{python3_sitelib} \
5ee328
LC_ALL="en_US.UTF-8" \
5ee328
py.test-%{python3_version} -r s
5ee328
popd
5ee328
%endif # with_python3
5ee328
%endif # run_check
5ee328
5ee328
%clean
5ee328
rm -rf %{buildroot}
5ee328
5ee328
5ee328
%files
5ee328
%defattr(-,root,root,-)
5ee328
%doc CHANGELOG LICENSE README.rst
5ee328
%if 0%{?with_docs}
5ee328
%doc doc/_build/html
5ee328
%endif # with_docs
5ee328
%{python_sitelib}/*
5ee328
5ee328
5ee328
%if 0%{?with_python3}
5ee328
%files -n python3-py
5ee328
%defattr(-,root,root,-)
5ee328
%doc CHANGELOG LICENSE README.rst
5ee328
%if 0%{?with_docs}
5ee328
%doc doc/_build/html
5ee328
%endif # with_docs
5ee328
%{python3_sitelib}/*
5ee328
%endif # with_python3
5ee328
5ee328
5ee328
%changelog
5ee328
* Thu Feb 09 2017 Charalampos Stratakis <cstratak@redhat.com> - 1.4.32-1
5ee328
- Updated to 1.4.32
5ee328
Resolves: rhbz#1389113
5ee328
5ee328
* Mon May 11 2015 Matej Stuchlik <mstuchli@redhat.com> - 1.4.27-1
5ee328
- Updated to 1.4.27
5ee328
Resolves: rhbz#1219480
5ee328
5ee328
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.4.14-4
5ee328
- Mass rebuild 2013-12-27
5ee328
5ee328
* Tue Jun 18 2013 Endi S. Dewata <edewata@redhat.com> - 1.4.14-3
5ee328
- Disabled pytest dependency for RHEL 7.
5ee328
5ee328
* Wed Jun 12 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.14-2
5ee328
- Use python-sphinx for rhel > 6 (rhbz#973321).
5ee328
- Update URL.
5ee328
- Fix changelog entry with an incorrect date (rhbz#973325).
5ee328
5ee328
* Sat May 11 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.14-1
5ee328
- Update to 1.4.14.
5ee328
5ee328
* Sat Mar  2 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.13-1
5ee328
- Update to 1.4.13.
5ee328
5ee328
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.12-2
5ee328
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5ee328
5ee328
* Fri Nov 23 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.12-1
5ee328
- Update to 1.4.12.
5ee328
5ee328
* Sat Oct 27 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.11-1
5ee328
- Update to 1.4.11.
5ee328
5ee328
* Sun Oct 21 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.10-2
5ee328
- Re-enable doc building and testsuite.
5ee328
- Minor testsuite fixes.
5ee328
5ee328
* Sun Oct 21 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.10-1
5ee328
- Update to 1.4.10.
5ee328
5ee328
* Fri Oct 12 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.9-8
5ee328
- Re-enable doc building and testsuite.
5ee328
5ee328
* Thu Oct 11 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.9-7
5ee328
- Add conditional for sphinx on rhel.
5ee328
- Remove rhel logic from with_python3 conditional.
5ee328
5ee328
* Wed Oct 10 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.9-6
5ee328
- Re-enable doc building and testsuite.
5ee328
5ee328
* Sat Aug  4 2012 David Malcolm <dmalcolm@redhat.com> - 1.4.9-5
5ee328
- Temporarily disable docs and testsuite.
5ee328
5ee328
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 1.4.9-4
5ee328
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
5ee328
5ee328
* Fri Jul 27 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.9-3
5ee328
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5ee328
5ee328
* Fri Jun 15 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.9-2
5ee328
- Re-enable doc building and testsuite.
5ee328
5ee328
* Thu Jun 14 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.9-1
5ee328
- Update to 1.4.9.
5ee328
5ee328
* Sat Jun  9 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.8-2
5ee328
- Re-enable doc building and testsuite.
5ee328
5ee328
* Wed Jun  6 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.8-1
5ee328
- Update to 1.4.8.
5ee328
5ee328
* Wed Feb  8 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.7-2
5ee328
- Re-enable doc building and testsuite.
5ee328
5ee328
* Wed Feb  8 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.7-1
5ee328
- Update to 1.4.7.
5ee328
5ee328
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-3
5ee328
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5ee328
5ee328
* Sat Dec 17 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.6-2
5ee328
- Re-enable doc building and testsuite.
5ee328
5ee328
* Sat Dec 17 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.6-1
5ee328
- Update to 1.4.6.
5ee328
- Remove %%prerelease macro.
5ee328
- Temporarily disable docs and testsuite.
5ee328
5ee328
* Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5-4
5ee328
- Rebuilt for glibc bug#747377
5ee328
5ee328
* Sat Sep  3 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.5-3
5ee328
- Fix: python3 dependencies.
5ee328
5ee328
* Tue Aug 30 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.5-2
5ee328
- Re-enable doc building and testsuite.
5ee328
5ee328
* Sat Aug 27 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.5-1
5ee328
- Update to 1.4.5.
5ee328
5ee328
* Thu Aug 11 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.4-2
5ee328
- Re-enable doc building and testsuite.
5ee328
5ee328
* Thu Aug 11 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.4.4-1
5ee328
- Update to 1.4.4.
5ee328
- Upstream provides a .zip archive only.
5ee328
- pytest and pycmd are separate packages now. 
5ee328
- Disable building html docs und the testsuite to break the circular
5ee328
  build dependency with pytest.
5ee328
- Update summary and description.
5ee328
- Remove BRs no longer needed.
5ee328
- Create a Python 3 subpackage.
5ee328
5ee328
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.4-2
5ee328
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5ee328
5ee328
* Sat Sep 18 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.3.4-1
5ee328
- Update to 1.3.4
5ee328
5ee328
* Fri Aug 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.3.3-2
5ee328
- Add dependency on python-setuptools (see bz 626808).
5ee328
5ee328
* Sat Jul 31 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.3.3-1
5ee328
- Update to 1.3.3.
5ee328
5ee328
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.2-2
5ee328
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
5ee328
5ee328
* Sat Jul 10 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.3.2-1
5ee328
- Update to 1.3.2.
5ee328
- Do cleanups already in %%prep to avoid inconsistent mtimes between
5ee328
  source files and bytecode.
5ee328
5ee328
* Sat May 29 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.3.1-1
5ee328
- Update to 1.3.1.
5ee328
5ee328
* Sat May  8 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.3.0-1
5ee328
- Update to 1.3.0.
5ee328
- Remove some backup (.orig) files.
5ee328
5ee328
* Sun Feb 14 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.2.1-1
5ee328
- Update to 1.2.1.
5ee328
5ee328
* Wed Jan 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.2.0-1
5ee328
- Update to 1.2.0.
5ee328
- Adjust summary and %%description.
5ee328
- Use %%global instead of %%define.
5ee328
5ee328
* Sat Nov 28 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.1.1-1
5ee328
- Update to 1.1.1.
5ee328
5ee328
* Sat Nov 21 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.1.0-1
5ee328
- Update to 1.1.0. Upstream reorganized the package's structure and
5ee328
  cleaned up the install process, so the specfile could be greatly
5ee328
  simplified.
5ee328
- Dropped licenses for files no longer present from the License tag.
5ee328
5ee328
* Thu Aug 27 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.2-1
5ee328
- Update to 1.0.2.
5ee328
- One failing test is no longer part of the testsuite, thus needs not
5ee328
  to be skipped anymore.
5ee328
- Some developer docs are missing this time in upstream's tarfile, so
5ee328
  cannot be moved to %%{_docdir}
5ee328
5ee328
* Thu Aug 13 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.0-1
5ee328
- Update to 1.0.0.
5ee328
- Re-enable SVN tests in %%check.
5ee328
5ee328
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-1.b8
5ee328
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
5ee328
5ee328
* Wed Jul 22 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.0-0.b8
5ee328
- Update to 1.0.0b8.
5ee328
- Remove patches applied upstream.
5ee328
- Greenlets have been removed upstream. So, package is noarch and
5ee328
  - installs to %%{python_sitelib} again
5ee328
  - %%ifarch sections have been removed.
5ee328
- Don't remove files used by the testsuite for now.
5ee328
- Add dependency on python-pygments, pylint and pexpect (for the
5ee328
  testsuite).
5ee328
5ee328
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-7
5ee328
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5ee328
5ee328
* Wed Jan 14 2009 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-6
5ee328
- Use system doctest module again, as this wasn't the real cause of
5ee328
  the test failure. Instead, remove the failing test for now.
5ee328
5ee328
* Fri Dec 12 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-5
5ee328
- Add patch from trunk fixing a subversion 1.5 problem (pylib
5ee328
  issue66).
5ee328
- Don't replace doctest compat module (pylib issue67).
5ee328
5ee328
* Fri Nov 21 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-4
5ee328
- Use dummy_greenlet on ppc and ppc64.
5ee328
5ee328
* Tue Oct  7 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-3
5ee328
- Replace compat modules by stubs using the system modules instead.
5ee328
- Add patch from trunk fixing a timing issue in the tests.
5ee328
5ee328
* Tue Sep 30 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-2
5ee328
- Update license information.
5ee328
- Fix the tests.
5ee328
5ee328
* Sun Sep  7 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-1
5ee328
- Update to 0.9.2.
5ee328
- Upstream now uses setuptools and installs to %%{python_sitearch}.
5ee328
- Remove %%{srcname} macro.
5ee328
- More detailed information about licenses.
5ee328
5ee328
* Thu Aug 21 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.1-1
5ee328
- New package.