summaryrefslogtreecommitdiffstats
path: root/python-ZODB3/F-13/python-ZODB3.spec
blob: c268e4ea40a9551a2c60c007463f8b2bfb7d6411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%include %{_rpmconfigdir}/macros.python
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

Name:           python-ZODB3
Version:        3.9.5
Release:        1%{?dist}
Summary:        Zope Object Database: Object Database and Persistence
Group:          Development/Libraries
License:        ZPLv2.1
URL:            http://pypi.python.org/pypi/ZODB3
Source0:        http://pypi.python.org/packages/source/Z/ZODB3/ZODB3-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python-devel
BuildRequires:  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, BTrees and
persistent.

%prep
%setup -q -n ZODB3-%{version}
for script in src/{ZODB,ZEO}/{zeoctl.py,scripts/{*.py,*/*.py}}; do
  if head -n 1 "$script" | grep -q '#!'; then
    sed -i '1,1d' "$script"
  fi
done


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


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
# remove contained source files
find $RPM_BUILD_ROOT -name '*.c' -type f -print0 | xargs -0 rm -fv
# deal with header files
for MOD in BTrees persistent; do
  mkdir -p $RPM_BUILD_ROOT%{_includedir}/python%{py_ver}/$MOD/
  mv $RPM_BUILD_ROOT%{python_sitearch}/$MOD/*.h \
     $RPM_BUILD_ROOT%{_includedir}/python%{py_ver}/$MOD/
done
# move some documents to stardard paths
for MOD in BTrees persistent ZODB ZEO; do
  mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/$MOD/
  mv $RPM_BUILD_ROOT%{python_sitearch}/$MOD/*.txt \
     $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/$MOD/
done
# install more documents
cp -p COPYRIGHT.txt LICENSE.txt HISTORY.txt README.txt doc/* \
   $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/

%clean
rm -rf $RPM_BUILD_ROOT


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

%files devel
%defattr(-,root,root,-)
%{_includedir}/python%{py_ver}/ZODB3
%{_includedir}/python%{py_ver}/BTrees
%{_includedir}/python%{py_ver}/persistent

%changelog
* 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.