File: Notes.txt

package info (click to toggle)
montage 6.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 45,580 kB
  • sloc: ansic: 144,907; javascript: 4,636; python: 1,625; makefile: 1,447; sh: 230; xml: 48
file content (75 lines) | stat: -rw-r--r-- 2,799 bytes parent folder | download | duplicates (4)
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
INTRODUCTION
------------

On order to build a Python wheel for MontagePy that can run on all the 
flavors of LINUX, we need to use the "manylinux" formalism described in
PEP 513 (https://www.python.org/dev/peps/pep-0513/#docker-image).

Since this involves building on a CentOS 5 platform, it is usually now
done using a Docker image of CentOS 5.


SOURCES
-------

Here are all the sources of stuff we need.  Besides Montage itself 
(downloaded from GitHub or as a tarball), which you should already have
if you are reading this file, you need the following Docker image:


   https://hub.docker.com/r/dockcross/manylinux-x64/ ("docker pull dockcross/manylinux-x64")



DOCKER
------

If you do not already have Docker, you will have to install it first (from 
https://www.docker.com/).  On a Mac this installs as a package, so there is
no real work.  Then run the "docker pull" request from above and your docker
install will be update with that image.  

   #!/bin/bash

   DOCKCROSS_IMAGE=quay.io/pypa/manylinux1_x86_64

   docker run -i -t \
      -v $PWD:/build \
      $DOCKCROSS_IMAGE bash


This script ("startDocker.sh") plus some other stuff we will need can be found 
in the same directory as these instructions (and that directory should be
named "Python_ManyLinux").  The "-v" flag makes the parent directory (i.e. the
top level Montage directory) visible inside the Docker container as "/build".
This give you access to the code from inside docker and also means that anything
you create in this tree persists as it real disk space rather than inside the 
Docker image (again, Docker stuff has a tendency to go away when you exit a 
container unless you make such arrangements).

So start up the container ("startDocker.sh") and "cd /build/Python_ManyLinux" 
to get back where we were outside the container.  Finally, run the configure
script ("./configureDocker.sh") which updates Python with Cython and jinja2
(since this is a docker container, we have to do this each time). 

That takes care of setting us up in Docker.


MONTAGE
-------

Back in the main directory ("/build"), run "make".  This will create a Montage
directory tree of Centos 5 binaries.  

Running "make" builds everything except the python package as this is still
somewhat system dependent.  We could probably create a tarball of generic
executables here that would work on any Linux but in general we prefer that
people rebuild on their own system if they aren't building the Python package.


Python
------
The only thing left is to actually build the python binary package.  This is
done in the Montage python/MontagePy directory.  There is more information 
on Python packaging there but basically running "./make_manylinux.sh" should
do it (the Python wheels created are put in the "dist" subdirectory).