14
0

Accepting request 184933 from home:frispete:python

spell out upstream URL in Source:

OBS-URL: https://build.opensuse.org/request/show/184933
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zope.event?expand=0&rev=4
This commit is contained in:
Sascha Peilicke
2013-07-31 06:37:35 +00:00
committed by Git OBS Bridge
parent 11caf1b23f
commit a44b0b7c17
4 changed files with 32 additions and 8 deletions

View File

@@ -23,12 +23,12 @@ Summary: Very basic event publishing system
License: ZPL-2.1
Group: Development/Libraries/Python
Url: http://pypi.python.org/pypi/zope.event
Source: zope.event-%{version}.tar.bz2
Source: https://pypi.python.org/packages/source/z/zope.event/zope.event-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-distribute
# Documentation requirements:
#BuildRequires: python-Sphinx
BuildRequires: python-Sphinx
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
@@ -44,14 +44,23 @@ which more sophisticated event dispatching systems can be built. For
example, a type-based event dispatching system that builds on zope.event
can be found in zope.component.
%package doc
Summary: Very basic event publishing system
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q -n zope.event-%{version}
%build
python setup.py build
# Doc build is self-referential, i.e. move to a seperate spec to require this one:
#python setup.py build_sphinx
# cannot give build/lib here, as pkg_resources.py needs the egg info and
# raises DistributionNotFound for zope.event, hence build doc directly
# from source in order to avoid the need for an external doc package
PYTHONPATH=$(pwd)/src python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
@@ -61,7 +70,11 @@ python setup.py test
%files
%defattr(-,root,root)
%doc COPYRIGHT.txt LICENSE.txt README.txt
%doc CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt
%{python_sitelib}/*
%files doc
%defattr(-,root,root,-)
%doc build/sphinx/html/
%changelog