1 |
< |
### RPM external py2-sqlalchemy 0.3.5 |
2 |
< |
%define pythonv %(echo $PYTHON_VERSION | cut -f1,2 -d.) |
3 |
< |
## INITENV +PATH PYTHONPATH %i/lib/python$(echo $PYTHON_VERSION | cut -f1,2 -d.)/site-packages |
1 |
> |
### RPM external py2-sqlalchemy 0.5.2 |
2 |
> |
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages |
3 |
|
|
4 |
< |
Source: http://superb-east.dl.sourceforge.net/sourceforge/sqlalchemy/SQLAlchemy-%v.tar.gz |
5 |
< |
Requires: python |
4 |
> |
Source: http://superb-east.dl.sourceforge.net/sourceforge/sqlalchemy/SQLAlchemy-%realversion.tar.gz |
5 |
> |
Requires: python |
6 |
> |
# Apply patch to make ORACLE works correctly while specifying owner, see |
7 |
> |
# http://groups.google.com/group/sqlalchemy/browse_thread/thread/902d39df9bc8cf21 |
8 |
> |
#Patch: py2-sqlalchemy_patch_0.4.4_0.4.5 |
9 |
|
|
10 |
|
%prep |
11 |
< |
%setup -n SQLAlchemy-%v |
11 |
> |
%setup -n SQLAlchemy-%realversion |
12 |
> |
|
13 |
|
%build |
11 |
– |
%install |
12 |
– |
mkdir -p %i/lib/python$(echo $PYTHON_VERSION | cut -f1,2 -d.)/site-packages |
14 |
|
python setup.py build |
14 |
– |
mv build/lib/* %i/lib/python$(echo $PYTHON_VERSION | cut -f1,2 -d.)/site-packages |
15 |
|
|
16 |
+ |
%install |
17 |
+ |
python setup.py install --prefix=%i |
18 |
+ |
egrep -r -l '^#!.*python' %i | xargs perl -p -i -e 's{^#!.*python.*}{#!/usr/bin/env python}' |
19 |
+ |
find %i -name '*.egg-info' -exec rm {} \; |