Blob Blame History Raw
# Filter private shared library provides
%filter_provides_in %{python_sitearch}/BTrees/.*\.so$
%filter_provides_in %{python_sitearch}/persistent/.*\.so$
%filter_setup

Name:           python-ZODB3
Version:        3.10.3
Release:        1%{?dist}
Summary:        Zope Object Database: Object Database and Persistence
Group:          Development/Libraries
License:        ZPLv2.1
URL:            http://www.zodb.org/
Source0:        http://pypi.python.org/packages/source/Z/ZODB3/ZODB3-%{version}%{?prerel}.tar.gz

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
# need for tests, not yet in Fedora
#BuildRequires: python-manuel
Requires:       python-setuptools
Requires:       python-transaction
Requires:       python-zc-lockfile
Requires:       python-ZConfig
Requires:       python-zdaemon
Requires:       python-zope-event
Requires:       python-zope-interface
Requires:       python-zope-proxy

%description
The Zope Object Database provides an object-oriented database for Python
that provides a high-degree of transparency. Applications can take
advantage of object database features with few, if any, changes to
application logic. ZODB includes features such as a pluggable storage
interface, rich transaction support, and undo.

%package devel
Summary:  Developer files for %{name}
Group:    Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: python2-devel
BuildArch: noarch

%description devel
Files for developing applications using Python extensions of ZODB.


%prep
%setup -q -n ZODB3-%{version}%{?prerel}
for File in src/ZEO/zeoctl.py src/{ZODB,ZEO}/scripts/*.py ; do
  sed -i.orig -e '/^#! *\//, 1d' $File
  touch -r ${File}.orig $File
  rm ${File}.orig
done


%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build


%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

pushd $RPM_BUILD_ROOT%{python_sitearch}
# remove contained source files
find . \( -name '*.c' -o -name '*.h' \) -type f -print0 | xargs -0 rm -fv

# deal with documents
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
DOCDIR=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
for FILE in `find . -name '*.txt'`; do
  DIR=${FILE%/*.*}
  # If a file in */tests/ directory, move it to an upper one.
  DIR=${DIR%/tests}
  # Don't move the files in the egg info directory
  if echo $DIR| grep -v egg-info >/dev/null; then
     if [ $DIR != . -a ! -d $DOCDIR$DIR ]; then
        mkdir -p $DOCDIR$DIR
     fi
     if [ ! -e $DOCDIR$DIR/${FILE##.*/} ]; then
        mv $FILE $DOCDIR$DIR
     else
        echo "name conflicts occur in documentation"
        exit 1
     fi
  fi
done

popd

cp -p src/CHANGES.txt{,.orig}
iconv -f ISO-8859-1 -t UTF-8 src/CHANGES.txt.orig >src/CHANGES.txt
touch -r src/CHANGES.txt{.orig,}
rm src/CHANGES.txt.orig
cp -p COPYRIGHT.txt LICENSE.txt HISTORY.txt README.txt src/CHANGES.txt \
   doc/* $DOCDIR

%files
%defattr(-,root,root,-)
%{_docdir}/%{name}-%{version}/
%{python_sitearch}/ZODB/
%exclude %{python_sitearch}/ZODB/tests/
%exclude %{python_sitearch}/ZODB/scripts/tests/
%exclude %{python_sitearch}/ZODB/FileStorage/tests.py*
%{python_sitearch}/ZODB3-*.egg-info
%{_bindir}/*
%{python_sitearch}/BTrees/
%exclude %{python_sitearch}/BTrees/tests/
%{python_sitearch}/persistent/
%exclude %{python_sitearch}/persistent/tests/
%{python_sitearch}/ZEO/
%exclude %{python_sitearch}/ZEO/tests/
%exclude %{python_sitearch}/ZEO/scripts/tests.py*

%files devel
%defattr(-,root,root,-)
%{_includedir}/python?.?/ZODB3

%changelog
* Wed Apr 27 2011 Jerry James <loganjerry@gmail.com> - 3.10.3-1
- Update to 3.10.3

* Sun Feb 20 2011 Robin Lee <cheeselee@fedoraproject.org> - 3.10.2-1
- Update to 3.10.2

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.10.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Jan  3 2011 Robin Lee <cheeselee@fedoraproject.org> - 3.10.1-1
- Update to 3.10.1

* Wed Oct 13 2010 Robin Lee <cheeselee@fedoraproject.org> - 3.10.0-1
- Update to 3.10.0 final

* Thu Sep 30 2010 Robin Lee <cheeselee@fedoraproject.org> - 3.10.0-0.6.b7
- Update to 3.10.0b7

* Wed Sep 29 2010 jkeating - 3.10.0-0.5.b6
- Rebuilt for gcc bug 634757

* Sat Sep 18 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.10.0-0.4.b6
- Filter out private shared library provides
- Rearrage the documents
- Exclude the tests from installation

* Thu Sep  9 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.10.0-0.3.b6
- Update to 3.10.0b6
- An unused line of comment removed
- A deeper path used in the find command

* Sat Sep  4 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.10.0-0.2.b5
- Update to 3.10.0b5
- Use recommended commands to remove shebangs
- Requires python-setuptools, which is used by generated scripts

* Wed Sep  1 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.10.0-0.1.b4
- Update to 3.10.0b4
- Spec cleaned up

* Tue Jun 22 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.9.5-2
- Don't move the text files

* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.9.5-1
- Update to 3.9.5
- Take over the review request (#476600).
- Don't split out per-extension subpackages.
- BR: python-setuptools added
- Requires: python-zope-testing removed
- Make a -devel subpackage to contain all the header files
- Remove the C source files installed by setup.py
- Include more documents
- Don't move the executable scripts

* Wed Oct 28 2009 Conrad Meyer <konrad@tylerc.org> - 3.9.3-1
- Bumped to 3.9.3.
- Numerous minor fixes from review (#476600).
- Split into several subpackages.

* Mon Dec 15 2008 Conrad Meyer <konrad@tylerc.org> - 3.9.0-0.1.a7
- Initial package.