Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 287b4a03480f4b47a14a0924f69f0f0f > files > 1

python-zc-customdoctests-1.0.1-1.fc18.src.rpm

%if 0%{?fedora}
%global with_python3 1
%endif

%global modname zc.customdoctests

Name:               python-zc-customdoctests
Version:            1.0.1
Release:            1%{?dist}
Summary:            Use doctest with other languages
Group:              Development/Libraries
License:            ZPLv2.1
URL:                http://pypi.python.org/pypi/zc.customdoctests
Source0:            http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.zip

BuildArch:          noarch


BuildRequires:      python2-devel
BuildRequires:      python-setuptools

BuildRequires:      python-zope-testing
BuildRequires:      python-manuel
BuildRequires:      python-six

%if 0%{?with_python3}
BuildRequires:      python3-devel
BuildRequires:      python3-setuptools
BuildRequires:      python3-zope-testing
BuildRequires:      python3-manuel
BuildRequires:      python3-six
%endif

%description
doctest (and recently manuel) provide hooks for using custom doctest
parsers.  `zc.customdoctests` helps to leverage this to support other
languages, such as JavaScript::

js> function double (x) { ...     return x*2; ... } js> double(2) 4

And with `manuel <http://pypi.python.org/pypi/manuel>`_, it facilitates
doctests that mix multiple languages, such as Python, JavaScript, and sh.

%if 0%{?with_python3}
%package -n python3-zc-customdoctests
Summary:            Use doctest with other languages
Group:              Development/Libraries

%description -n python3-zc-customdoctests
doctest (and recently manuel) provide hooks for using custom doctest
parsers.  `zc.customdoctests` helps to leverage this to support other
languages, such as JavaScript::

js> function double (x) { ...     return x*2; ... } js> double(2) 4

And with `manuel <http://pypi.python.org/pypi/manuel>`_, it facilitates
doctests that mix multiple languages, such as Python, JavaScript, and sh.
%endif

%prep
%setup -q -n %{modname}-%{version}

# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif

%build
%{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif

%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
popd
%endif
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}

%check
%{__python} setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif

%files
%doc README.txt CHANGES.txt PKG-INFO
%{python_sitelib}/zc/customdoctests/
%{python_sitelib}/%{modname}-%{version}*

%if 0%{?with_python3}
%files -n python3-zc-customdoctests
%doc README.txt CHANGES.txt PKG-INFO
%{python3_sitelib}/zc/customdoctests/
%{python3_sitelib}/%{modname}-%{version}-*
%endif

%changelog
* Mon Feb 25 2013 Ralph Bean <rbean@redhat.com> - 1.0.1-1
- Initial package for Fedora