python-py/python-py.spec

160 lines
5.9 KiB
RPMSpec
Raw Normal View History

2009-07-22 22:54:57 +00:00
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2009-01-16 11:22:40 +00:00
Name: python-py
2009-08-27 18:33:46 +00:00
Version: 1.0.2
Release: 1%{?prerelease:.%{prerelease}}%{?dist}
2009-01-16 11:22:40 +00:00
Summary: Innovative python library containing py.test, greenlets and other niceties
Group: Development/Languages
License: MIT and LGPLv2+ and Public Domain and BSD and Python
# - main package: MIT, except:
# - test/rsession/webdata/json.py: LPGLv2+
# - doc/style.css: Public Domain
2009-08-27 18:33:46 +00:00
# - test/web/post_multipart.py: Python
2009-01-16 11:22:40 +00:00
# (see http://code.activestate.com/help/terms)
# - compat/textwrap.py: Python
# - compat/subprocess.py: Python
# - compat/doctest.py: Public Domain
# - compat/optparse.py: BSD
# Note that all but the doctest compat files are removed
# in the prep stage.
URL: http://codespeak.net/py/dist/
2009-07-22 22:54:57 +00:00
Source: http://pypi.python.org/packages/source/p/py/py-%{version}%{?prerelease}.tar.gz
2009-01-16 11:22:40 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2009-07-22 22:54:57 +00:00
BuildArch: noarch
2009-01-16 11:22:40 +00:00
BuildRequires: python-devel
BuildRequires: python-setuptools-devel
2009-07-22 22:54:57 +00:00
# needed by the testsuite:
2009-01-16 11:22:40 +00:00
BuildRequires: subversion
BuildRequires: python-docutils
2009-07-22 22:54:57 +00:00
BuildRequires: python-pygments
BuildRequires: pylint
BuildRequires: pexpect
2009-01-16 11:22:40 +00:00
%define doctarget %{buildroot}%{_docdir}/%{name}-%{version}
%description
The py lib aims at supporting a decent development process addressing
deployment, versioning, testing and documentation perspectives.
%prep
2009-07-22 22:54:57 +00:00
%setup -q -n py-%{version}%{?prerelease}
2009-01-16 11:22:40 +00:00
# remove the compatibility modules, and use system modules instead
for module in doctest optparse textwrap subprocess ; do
rm py/compat/$module.py
echo "from $module import *" > py/compat/system_$module.py
sed -i py/__init__.py -e "s,compat/$module.py,compat/system_$module.py,"
done
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
# remove shebangs and fix permissions
2009-07-22 22:54:57 +00:00
find %{buildroot}%{python_sitelib} \( -name '*.py' -o -name 'py.*' \) \
2009-01-16 11:22:40 +00:00
-exec sed -i '1{/^#!/d}' {} \; \
-exec chmod u=rw,go=r {} \;
2009-07-22 22:54:57 +00:00
# move some txt files to the doc directory
2009-01-16 11:22:40 +00:00
mkdir -p %{doctarget}
2009-07-22 22:54:57 +00:00
mv %{buildroot}%{python_sitelib}/py/LICENSE %{doctarget}
2009-08-27 18:33:46 +00:00
# files are not in the 1.0.2 tarball, but might again be there in
# later releases:
#mv %{buildroot}%{python_sitelib}/py/compat/LICENSE %{doctarget}/compat_LICENSE
#mv %{buildroot}%{python_sitelib}/py/execnet/NOTES %{doctarget}/execnet_NOTES
#mv %{buildroot}%{python_sitelib}/py/execnet/improve-remote-tracebacks.txt \
# %{doctarget}/execnet_improve-remote-tracebacks.txt
#mv %{buildroot}%{python_sitelib}/py/path/gateway/TODO.txt %{doctarget}/path_gateway_TODO.txt
#mv %{buildroot}%{python_sitelib}/py/path/svn/quoting.txt %{doctarget}/svn_quoting_path.txt
cp -pr README.txt doc example contrib %{doctarget}
2009-01-16 11:22:40 +00:00
# remove this and that
2009-07-22 22:54:57 +00:00
find %{buildroot}%{python_sitelib} -name '*.cmd' -exec rm {} \;
2009-01-16 11:22:40 +00:00
2009-08-27 18:33:46 +00:00
# remove (most) files only used by the testsuite - upstream plans on
# separating that out for the 1.1 version
2009-07-22 22:54:57 +00:00
#find %{buildroot}%{python_sitelib} -type d -name testing -prune -exec rm -r {} \;
#find %{buildroot}%{python_sitelib} -name 'conftest.py*' -exec rm {} \;
2009-01-16 11:22:40 +00:00
2009-07-22 22:54:57 +00:00
%check
2009-08-27 18:33:46 +00:00
# test cannot be run in %{buildroot}, because it uses
# inspect.getsourcefile() et. al.
PYTHONPATH=$(pwd)/py %{__python} py/bin/py.test py
2009-01-16 11:22:40 +00:00
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/py.*
2009-07-22 22:54:57 +00:00
%{python_sitelib}/*
2009-01-16 11:22:40 +00:00
%{_docdir}/%{name}-%{version}
%changelog
2009-08-27 18:33:46 +00:00
* Thu Aug 27 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.2-1
- Update to 1.0.2.
- One failing test is no longer part of the testsuite, thus needs not
to be skipped anymore.
- Some developer docs are missing this time in upstream's tarfile, so
cannot be moved to %%{_docdir}
2009-08-13 17:31:58 +00:00
* Thu Aug 13 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.0-1
- Update to 1.0.0.
- Re-enable SVN tests in %%check.
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-1.b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2009-07-22 22:54:57 +00:00
* Wed Jul 22 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.0.0-0.b8
- Update to 1.0.0b8.
- Remove patches applied upstream.
- Greenlets have been removed upstream. So, package is noarch and
- installs to %%{python_sitelib} again
- %%ifarch sections have been removed.
- Don't remove files used by the testsuite for now.
- Add dependency on python-pygments, pylint and pexpect (for the
testsuite).
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2009-01-16 11:22:40 +00:00
* Wed Jan 14 2009 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-6
- Use system doctest module again, as this wasn't the real cause of
the test failure. Instead, remove the failing test for now.
* Fri Dec 12 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-5
- Add patch from trunk fixing a subversion 1.5 problem (pylib
issue66).
- Don't replace doctest compat module (pylib issue67).
* Fri Nov 21 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-4
- Use dummy_greenlet on ppc and ppc64.
* Tue Oct 7 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-3
- Replace compat modules by stubs using the system modules instead.
- Add patch from trunk fixing a timing issue in the tests.
* Tue Sep 30 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-2
- Update license information.
- Fix the tests.
* Sun Sep 7 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.2-1
- Update to 0.9.2.
- Upstream now uses setuptools and installs to %%{python_sitearch}.
- Remove %%{srcname} macro.
- More detailed information about licenses.
* Wed Aug 21 2008 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.1-1
- New package.