~ubuntu-branches/ubuntu/oneiric/python-scipy/oneiric-proposed

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
.. --*-- rest --*--
.. NB! Keep this document a valid restructured document.

Packaging Scipy
===============

:Author: Pearu Peterson <pearu@cens.ioc.ee>
:Last changed: $Date: 2004/01/04 11:01:04 $
:Revision: $Revision: 1.7 $
:Discussions to: scipy-dev@scipy.org

Introduction
------------

People who have tried to create a distribution of a Scipy package have
been faced with complex dependency issues between ``scipy`` and
``f2py2e`` modules. Namely, both Scipy and F2py tar-balls provide
``scipy_distutils`` module that may have different time stamps, for
instance, not to mention that packaging tools (e.g. debian apt) don't
like such cases at all. Scipy_distutils is part of the Scipy package
while F2py ships ``scipy_distutils`` for the convenience of F2py
users.  So, the issue of distributing Scipy and F2py have been brought
up in Scipy and F2py mailing lists many times and the purpose of this
document is to provide instructions for the packagers how to overcome
this issue.

Any suggestions, especially from the packagers, to improve these
instructions are most welcome. Please, send your comments or patches
to scipy-dev@scipy.org.

Packaging Scipy and friends
---------------------------

Instead of using tar-balls from web, currently it is highly
recommended getting scipy and other software from their CVS
repository. Usually CVS versions are more stable than tar-balls
(sometimes not but any issues will be quickly fixed), also core
developers do not test tar-balls very frequently and occasionally some
important files may be missing.

1. Get Scipy, F2py and their dependencies from CVS::

     export CVSROOT=:pserver:anonymous@scipy.org:/home/cvsroot
     cvs -z7 co scipy

     export CVSROOT=:pserver:anonymous@cens.ioc.ee:/home/cvs
     cvs -z7 co f2py2e

2. Create source tar-balls::

     cd f2py2e
     python setup.py sdist
     cp dist/F2PY-*.tar.gz ..
     cd ..

     cd scipy
     python setup.py sdist
     cp scipy_core/dist/Scipy_core-*.tar.gz ..
     cp dist/SciPy-*.tar.gz ..
     cd ..

   The resulting gzipped tar-files do not contain software overlaps
   anymore and should be suitable for packaging.

3. Install ``scipy_core``, ``f2py2e``, and ``scipy`` strictly in the
   given order. Unpack all tar-ball sources and run::

     cd Scipy_core-*
     python setup.py install
     cd ..

     cd F2PY-*
     python setup.py install
     cd ..

     cd SciPy-*
     python setup.py install
     cd ..

That's it!

RPMs for Scipy and friends
--------------------------

Follow the items 1-2 above and then continue as follows:

3. Create RPMs::

     cd f2py2e
     # run buildhtml.py script provided by docutils to generate
     # HTML documentation of f2py.
     python setup.py bdist_rpm --fix-python
     cp dist/F2PY-*.rpm ..
     cd ..

     cd scipy
     python setup.py bdist_rpm --fix-python
     cp scipy_core/dist/Scipy_core-*.rpm ..
     cp dist/SciPy-*.rpm ..
     cd ..

4. Install RPMs in the usual way but keep the order as in item 4.