Changes between Version 3 and Version 4 of PyWaveletsOsxBuilding


Ignore:
Timestamp:
Mar 27, 2016, 7:13:57 PM (5 years ago)
Author:
flip
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PyWaveletsOsxBuilding

    v3 v4  
    44our [PyWaveletsOsx PyWavelets for OS X] package.
    55
    6 When these instructions were written, we supported Python 2.5, 2.6 and 2.7. In order to simplify maintenance, I recommend that any future builds of this package ignore Python 2.5 and 2.6. Users who need compatibility with one of the older Pythons (there will hopefully be very, very few of them) can use an older version of this package.
    7 
    8 == The Package Contents ==
    9 
    10 The package we provide is simple. It's basically the same stuff that
    11 PyWavelets creates during an installation, plus some packaging meta stuff
    12 from us.
    13 
    14 More specifically, when one builds and installs PyWavelets from source, the
    15 result is a directory containing a bunch of `.py` files and one `.so` file.
    16 The `.py` files are the same for Python 2.5 - 2.7, only the binary differs.
    17 Therefore our package consists of one set of `.py` files and three `.so`
    18 binaries, one for each Python version we support. At install time, we
    19 decide which binary is the correct one and copy it to reside along with the
    20 `.py` files. After that, installation proceeds normally.
     6In 2012 when we first built our own PyWavelets distribution for OS X, building this
     7package was a bit complicated. Now in 2016, thanks to Python's new wheel format,
     8it's a snap.
    219
    2210== The Build Process ==
    2311
    24 Our PyWavelets for OS X package lives
    25 [https://scion.duhs.duke.edu/svn/pywavelets-osx/ in its own SVN repository].
     12You first need to satisfy PyWavelets' build dependencies -- Python, of course,
     13as well as `numpy` (I think) and `Cython`. You'll also need the Python packages
     14`setuptools` and `wheel` in order to build wheels. All of these come with Anaconda.
    2615
    27 If you need to build our package for a new version of PyWavelets (or Python),
    28 here's how to do it. You'll need gcc and Cython <= 0.13, plus of course the
    29 version of Python against which you want to build.
    30 
    31 A side note about PyWavelets and Cython versions -- PyWavelets 0.2.0 is the
    32 most recent version and does ''not'' build with the most recent
    33 version of Cython (0.14). However,
    34 [http://groups.google.com/group/pywavelets/browse_thread/thread/d29c7f2cdcbfcac6 the author reports that the build problem will be fixed in the next PyWavelets release],
    35 so if you're building a version of PyWavelets > 0.2.0 then you can probably
    36 use Cython >= 0.14.
    37 
    38 For each Python in (2.5, 2.6, 2.7):
    39 
    40  1. Set the Python you want to build against to be the default Python.
    41  1. If you haven't done so already, build and install Cython for that Python.
    42  This adds Cython to that Python's `site-packages`.
    43  1. Build and install PyWavelets and note the directory to which it installs.
    44  1. Go to that directory, grab the `.py` files, and copy them to our
    45  pywavelets-osx package in `pywavelets-osx/pywt`.
    46  1. From the same directory, grab the `.so` files, copy it to the 
    47  `pywavelets-osx/binaries` directory and rename it appropriately (e.g.
    48  `32-py26.so` for 32-bit Python 2.6).
    49  1. From the same directory, copy `COPYING.txt` to `pywavelets-osx/pywt` so
    50  that we're sure we are distributing the latest PyWavelets license.
    51 
    52 == Python 2.5 Considerations ==
    53 
    54 When building Cython and PyWavelets (and I think any C-based Python extension)
    55 against Python 2.5 under OS X Snow Leopard, using the default gcc (4.2.1)
    56 gives this error ---
    57 
     16To build a wheel, download the PyWavelets source code, untar it, and then
     17enter this command --
    5818{{{
    59 cc1: error: unrecognized command line option "-Wno-long-double"
     19python setup.py bdist_wheel
    6020}}}
    6121
    62 An easy way to get around this is to build using gcc 4.0. To temporarily set
    63 the default compiler to gcc 4.0, enter this at the command line --
    64 {{{
    65 export CC=gcc-4.0
    66 export CPP=gcc-4.0
    67 }}}
     22Python will build PyWavelets for you and place a correctly-named wheel in the `dist` directory.
    6823
    69 Python >= 2.6 avoids this by forcing use of `gcc-4.0`.
    70 
    71 == Releasing a New Version ==
    72 
    73 Unlike most of our packages, we don't track versions of this package. Since
    74 PyWavelets has its own version number, it'd be pretty confusing to have
    75 separate version numbers for this package too. So the version available
    76 on this page is always the most current, and it's the only one that we offer.
    77 
    78  1. Follow the steps in [#TheBuildProcess The Build Process].
    79  1. Commit the changes to SVN.
    80  1. Run `build_tarball.py` which will create files in the `dist` directory.
    81  1. Upload those files [PyWaveletsOsx to this page], replacing the attachments of the same
    82  name.
    83