Skip to content

Commit

Permalink
HACK: Make sure we use python.org interpreter to build the mpkg in paver
Browse files Browse the repository at this point in the history
  • Loading branch information
cournape committed Apr 2, 2009
1 parent d215183 commit fe23881
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pavement.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
- the script is messy, lots of global variables
- make it more easily customizable (through command line args)
- missing targets: install & test, sdist test, debian packaging
- fix bdist_mpkg: we build the same source twice -> how to make sure we use
the same underlying python for egg install in venv and for bdist_mpkg
"""
import os
import sys
Expand Down Expand Up @@ -119,6 +121,10 @@
RELEASE_DIR = 'release'
INSTALLERS_DIR = os.path.join(RELEASE_DIR, 'installers')

# XXX: fix this in a sane way
MPKG_PYTHON = {"25": "/Library/Frameworks/Python.framework/Versions/2.5/bin/python",
"26": "/Library/Frameworks/Python.framework/Versions/2.6/bin/python"}

options(sphinx=Bunch(builddir="build", sourcedir="source", docroot='doc'),
virtualenv=Bunch(script_name=BOOTSTRAP_SCRIPT,packages_to_install=["sphinx==0.5.1"]),
wininst=Bunch(pyver="2.5", scratch=True))
Expand Down Expand Up @@ -215,7 +221,7 @@ def latex():
def pdf():
def build_pdf():
subprocess.check_call(["make", "all-pdf"], cwd=str(DOC_BLD_LATEX))
dry("Build pdf doc", build_latex)
dry("Build pdf doc", build_pdf)

PDF_DESTDIR.rmtree()
PDF_DESTDIR.makedirs()
Expand Down Expand Up @@ -397,7 +403,9 @@ def dmg_name():

@task
def bdist_mpkg():
sh("python setupegg.py bdist_mpkg")
call_task("clean")
pyver = "".join([str(i) for i in sys.version_info[:2]])
sh("%s setupegg.py bdist_mpkg" % MPKG_PYTHON[pyver])

@task
@needs("bdist_mpkg", "pdf")
Expand Down

0 comments on commit fe23881

Please sign in to comment.