File: make_osx.sh

package info (click to toggle)
montage 6.0%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 23,120 kB
  • sloc: ansic: 205,662; python: 1,621; makefile: 1,547; javascript: 1,338; sh: 157; xml: 48
file content (40 lines) | stat: -rwxr-xr-x 1,172 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

# This script is for building the Python 2.7/3.6 versions of
# the MontagePy wheels for Mac OSX.  It assumes you have already
# installed 'python2' and 'python3' and have 'Cython', 'jinja2'
# and 'wheel' installed as Python packages in both.


# Python 2.7

rm -rf build dist MontagePy.egg-info MontagePy/__pycache__

python2 parse.py

sed '/^def mViewer/a \
\ \ \ \ # Next four lines added by sed script \
\ \ \ \ import pkg_resources \
\ \ \ \ if fontFile == "": \
\ \ \ \ \ \ \ \ fontFile = pkg_resources.resource_filename("MontagePy", "FreeSans.ttf") \
\ \ \ \ \ \ \ \ ' MontagePy/_wrappers.pyx > MontagePy/tmpfile
mv MontagePy/tmpfile MontagePy/_wrappers.pyx

python2 setup_osx.py build bdist_wheel


# Python 3.6

rm -rf build MontagePy.egg-info MontagePy/__pycache__

python3 parse.py

sed '/^def mViewer/a \
\ \ \ \ # Next four lines added by sed script \
\ \ \ \ import pkg_resources \
\ \ \ \ if fontFile == "": \
\ \ \ \ \ \ \ \ fontFile = pkg_resources.resource_filename("MontagePy", "FreeSans.ttf") \
\ \ \ \ \ \ \ \ ' MontagePy/_wrappers.pyx > MontagePy/tmpfile
mv MontagePy/tmpfile MontagePy/_wrappers.pyx

python3 setup_osx.py build bdist_wheel