5298d1a
Name:           python-ZODB3
2b736fc
Version:        3.10.5
017b582
Release:        3%{?dist}
5298d1a
Summary:        Zope Object Database: Object Database and Persistence
5298d1a
Group:          Development/Libraries
5298d1a
License:        ZPLv2.1
5298d1a
URL:            http://www.zodb.org/
5298d1a
Source0:        http://pypi.python.org/packages/source/Z/ZODB3/ZODB3-%{version}%{?prerel}.tar.gz
5298d1a
5298d1a
BuildRequires:  python2-devel
5298d1a
BuildRequires:  python-setuptools
55c78f5
# need for tests
55c78f5
BuildRequires:  python-transaction
55c78f5
BuildRequires:  python-zc-lockfile
55c78f5
BuildRequires:  python-ZConfig
55c78f5
BuildRequires:  python-zdaemon
55c78f5
BuildRequires:  python-zope-event
55c78f5
BuildRequires:  python-zope-interface
55c78f5
BuildRequires:  python-zope-proxy
55c78f5
BuildRequires:  python-manuel
55c78f5
BuildRequires:  python-zope-testing
5298d1a
Requires:       python-setuptools
5298d1a
Requires:       python-transaction
5298d1a
Requires:       python-zc-lockfile
5298d1a
Requires:       python-ZConfig
5298d1a
Requires:       python-zdaemon
5298d1a
Requires:       python-zope-event
5298d1a
Requires:       python-zope-interface
5298d1a
Requires:       python-zope-proxy
5298d1a
5a0ffbe
%global __provides_exclude_from ^%{python_sitearch}/.*\\.so$
5a0ffbe
5298d1a
%description
5298d1a
The Zope Object Database provides an object-oriented database for Python
5298d1a
that provides a high-degree of transparency. Applications can take
5298d1a
advantage of object database features with few, if any, changes to
5298d1a
application logic. ZODB includes features such as a pluggable storage
5298d1a
interface, rich transaction support, and undo.
5298d1a
5298d1a
%package devel
5298d1a
Summary:  Developer files for %{name}
5298d1a
Group:    Development/Libraries
5298d1a
Requires: %{name} = %{version}-%{release}
5298d1a
Requires: python2-devel
5298d1a
BuildArch: noarch
5298d1a
5298d1a
%description devel
5298d1a
Files for developing applications using Python extensions of ZODB.
5298d1a
5298d1a
5298d1a
%prep
5298d1a
%setup -q -n ZODB3-%{version}%{?prerel}
5298d1a
for File in src/ZEO/zeoctl.py src/{ZODB,ZEO}/scripts/*.py ; do
5298d1a
  sed -i.orig -e '/^#! *\//, 1d' $File
5298d1a
  touch -r ${File}.orig $File
5298d1a
  rm ${File}.orig
5298d1a
done
5298d1a
5298d1a
5298d1a
%build
5298d1a
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
5298d1a
5298d1a
5298d1a
%install
5298d1a
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
5298d1a
5298d1a
pushd $RPM_BUILD_ROOT%{python_sitearch}
5298d1a
# remove contained source files
5298d1a
find . \( -name '*.c' -o -name '*.h' \) -type f -print0 | xargs -0 rm -fv
5298d1a
5298d1a
# deal with documents
5298d1a
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
5298d1a
DOCDIR=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
5298d1a
for FILE in `find . -name '*.txt'`; do
5298d1a
  DIR=${FILE%/*.*}
5298d1a
  # If a file in */tests/ directory, move it to an upper one.
5298d1a
  DIR=${DIR%/tests}
5298d1a
  # Don't move the files in the egg info directory
5298d1a
  if echo $DIR| grep -v egg-info >/dev/null; then
5298d1a
     if [ $DIR != . -a ! -d $DOCDIR$DIR ]; then
5298d1a
        mkdir -p $DOCDIR$DIR
5298d1a
     fi
5298d1a
     if [ ! -e $DOCDIR$DIR/${FILE##.*/} ]; then
5298d1a
        mv $FILE $DOCDIR$DIR
5298d1a
     else
8d36b57
        echo "name conflicts occur in documentation"
5298d1a
        exit 1
5298d1a
     fi
5298d1a
  fi
5298d1a
done
5298d1a
5298d1a
popd
5298d1a
55c78f5
iconv -f ISO-8859-1 -t UTF-8 src/CHANGES.txt >$DOCDIR/CHANGES.txt
55c78f5
touch -r src/CHANGES.txt $DOCDIR/CHANGES.txt
55c78f5
cp -p COPYRIGHT.txt LICENSE.txt HISTORY.txt README.txt \
5298d1a
   doc/* $DOCDIR
5298d1a
55c78f5
%check
55c78f5
python setup.py test
55c78f5
5298d1a
%files
5298d1a
%{_docdir}/%{name}-%{version}/
5298d1a
%{python_sitearch}/ZODB/
5298d1a
%exclude %{python_sitearch}/ZODB/tests/
5298d1a
%exclude %{python_sitearch}/ZODB/scripts/tests/
5298d1a
%exclude %{python_sitearch}/ZODB/FileStorage/tests.py*
5298d1a
%{python_sitearch}/ZODB3-*.egg-info
5298d1a
%{_bindir}/*
5298d1a
%{python_sitearch}/BTrees/
5298d1a
%exclude %{python_sitearch}/BTrees/tests/
5298d1a
%{python_sitearch}/persistent/
5298d1a
%exclude %{python_sitearch}/persistent/tests/
5298d1a
%{python_sitearch}/ZEO/
5298d1a
%exclude %{python_sitearch}/ZEO/tests/
5298d1a
%exclude %{python_sitearch}/ZEO/scripts/tests.py*
5298d1a
5298d1a
%files devel
5298d1a
%{_includedir}/python?.?/ZODB3
5298d1a
5298d1a
%changelog
017b582
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.5-3
017b582
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
017b582
5a0ffbe
* Tue Jan 10 2012 Jerry James <loganjerry@gmail.com> - 3.10.5-2
5a0ffbe
- Mass rebuild for Fedora 17
5a0ffbe
- Switch to the RPM 4.9 style of provides filtering
5a0ffbe
2b736fc
* Mon Nov 21 2011 Jerry James <loganjerry@gmail.com> - 3.10.5-1
2b736fc
- Update to 3.10.5
2b736fc
1146c47
* Fri Nov 18 2011 Jerry James <loganjerry@gmail.com> - 3.10.4-1
1146c47
- Update to 3.10.4
1146c47
55c78f5
* Sun May  1 2011 Robin Lee <cheeselee@fedoraproject.org> - 3.10.3-2
55c78f5
- Enable the tests
55c78f5
8d36b57
* Wed Apr 27 2011 Jerry James <loganjerry@gmail.com> - 3.10.3-1
8d36b57
- Update to 3.10.3
8d36b57
5298d1a
* Sun Feb 20 2011 Robin Lee <cheeselee@fedoraproject.org> - 3.10.2-1
5298d1a
- Update to 3.10.2
5298d1a
5298d1a
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.1-2
5298d1a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5298d1a
5298d1a
* Mon Jan  3 2011 Robin Lee <cheeselee@fedoraproject.org> - 3.10.1-1
5298d1a
- Update to 3.10.1
5298d1a
5298d1a
* Wed Oct 13 2010 Robin Lee <cheeselee@fedoraproject.org> - 3.10.0-1
5298d1a
- Update to 3.10.0 final
5298d1a
5298d1a
* Thu Sep 30 2010 Robin Lee <cheeselee@fedoraproject.org> - 3.10.0-0.6.b7
5298d1a
- Update to 3.10.0b7
5298d1a
5298d1a
* Wed Sep 29 2010 jkeating - 3.10.0-0.5.b6
5298d1a
- Rebuilt for gcc bug 634757
5298d1a
5298d1a
* Sat Sep 18 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.10.0-0.4.b6
5298d1a
- Filter out private shared library provides
5298d1a
- Rearrage the documents
5298d1a
- Exclude the tests from installation
5298d1a
5298d1a
* Thu Sep  9 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.10.0-0.3.b6
5298d1a
- Update to 3.10.0b6
5298d1a
- An unused line of comment removed
5298d1a
- A deeper path used in the find command
5298d1a
5298d1a
* Sat Sep  4 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.10.0-0.2.b5
5298d1a
- Update to 3.10.0b5
5298d1a
- Use recommended commands to remove shebangs
5298d1a
- Requires python-setuptools, which is used by generated scripts
5298d1a
5298d1a
* Wed Sep  1 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.10.0-0.1.b4
5298d1a
- Update to 3.10.0b4
5298d1a
- Spec cleaned up
5298d1a
5298d1a
* Tue Jun 22 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.9.5-2
5298d1a
- Don't move the text files
5298d1a
5298d1a
* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.9.5-1
5298d1a
- Update to 3.9.5
5298d1a
- Take over the review request (#476600).
5298d1a
- Don't split out per-extension subpackages.
5298d1a
- BR: python-setuptools added
5298d1a
- Requires: python-zope-testing removed
5298d1a
- Make a -devel subpackage to contain all the header files
5298d1a
- Remove the C source files installed by setup.py
5298d1a
- Include more documents
5298d1a
- Don't move the executable scripts
5298d1a
5298d1a
* Wed Oct 28 2009 Conrad Meyer <konrad@tylerc.org> - 3.9.3-1
5298d1a
- Bumped to 3.9.3.
5298d1a
- Numerous minor fixes from review (#476600).
5298d1a
- Split into several subpackages.
5298d1a
5298d1a
* Mon Dec 15 2008 Conrad Meyer <konrad@tylerc.org> - 3.9.0-0.1.a7
5298d1a
- Initial package.