Ticket #12994: setuptools-serial.patch

File setuptools-serial.patch, 4.9 KB (added by Julien Puydt, 10 years ago)

Patch fixing the issue

  • spkg/install

    # HG changeset patch
    # User Julien Puydt <julien.puydt@laposte.net>
    # Date 1337866351 25200
    # Node ID c861c906684eda8daca93d700b46acf23a0c08fb
    # Parent  0409fc873e3b1a9fbe5fd62c44c10b873d9569a7
    Handle setuptools installation serialization without tainting other packages dependencies
    
    diff --git a/spkg/install b/spkg/install
    a b  
    88SAGE_ROOT=`cd .. && pwd -P`
    99SAGE_LOCAL="$SAGE_ROOT/local"
    1010SAGE_LOGS="$SAGE_ROOT/spkg/logs"
     11if [ "x$SAGE_BUILD_DIR" = x ]; then
     12    SAGE_BUILD_DIR="$SAGE_ROOT/spkg/build"
     13fi
    1114PATH="$SAGE_ROOT/spkg/bin:$SAGE_LOCAL/bin:$PATH"
    1215PYTHONPATH="$SAGE_LOCAL"
    1316export SAGE_ROOT SAGE_LOCAL SAGE_LOGS PATH PYTHONPATH
     
    446449    exit 1
    447450fi
    448451
    449 # Build succeeded.
     452# Build succeeded, clean stamps and announce
     453rm -f $SAGE_BUILD_DIR/*stamp
    450454echo "Sage build/upgrade complete!"
    451455
    452456if [ "$1" = "all" ]; then
  • spkg/standard/deps

    diff --git a/spkg/standard/deps b/spkg/standard/deps
    a b  
    33# $SAGE_ROOT/spkg/Makefile by $SAGE_ROOT/spkg/install
    44###############################################################################
    55
     6SAGE_BUILD_DIR ?= "$SAGE_ROOT/spkg/build"
    67INST = installed
    78# Let e.g. SAGE_ROOT/spkg/install pass options to sage-spkg, i.e. currently
    89# "-f", to force rebuilding dependent packages during an upgrade (#9896).
     
    411412$(INST)/$(SAGE_ROOT_REPO): $(BASE) $(INST)/$(MERCURIAL)
    412413        +$(PIPE) "$(SAGE_SPKG) $(SAGE_ROOT_REPO) 2>&1" "tee -a $(SAGE_LOGS)/$(SAGE_ROOT_REPO).log"
    413414
    414 # setuptools forgets to update easy-install.pth during parallel
    415 # builds, so we build the relevant packages serially.  Note: To avoid
    416 # branching, we haven't given explicit dependencies, but the chain's
    417 # order is important.
    418 $(INST)/$(SAGENB): $(BASE) $(INST)/$(SQLALCHEMY) $(INST)/$(PATCH)
     415$(INST)/$(SAGENB): $(BASE) $(INST)/$(PYTHON) $(INST)/$(PEXPECT) $(INST)/$(TWISTED) $(INST)/$(JINJA2) $(INST)/$(SPHINX) $(INST)/$(DOCUTILS) $(INST)/$(SETUPTOOLS) $(INST)/$(PATCH)
    419416        +$(PIPE) "$(SAGE_SPKG) $(SAGENB) 2>&1" "tee -a $(SAGE_LOGS)/$(SAGENB).log"
    420417
    421 $(INST)/$(SQLALCHEMY): $(BASE) $(INST)/$(SPHINX) $(INST)/$(PATCH)
     418$(INST)/$(SQLALCHEMY): $(BASE) $(INST)/$(PYTHON) $(INST)/$(SETUPTOOLS) $(INST)/$(PATCH)
    422419        +$(PIPE) "$(SAGE_SPKG) $(SQLALCHEMY) 2>&1" "tee -a $(SAGE_LOGS)/$(SQLALCHEMY).log"
    423420
    424 $(INST)/$(SPHINX): $(BASE) $(INST)/$(JINJA2) $(INST)/$(PATCH)
     421$(INST)/$(SPHINX): $(BASE) $(INST)/$(DOCUTILS) $(INST)/$(JINJA2) $(INST)/$(SETUPTOOLS) $(INST)/$(PATCH)
    425422        +$(PIPE) "$(SAGE_SPKG) $(SPHINX) 2>&1" "tee -a $(SAGE_LOGS)/$(SPHINX).log"
    426423
    427 $(INST)/$(JINJA2): $(BASE) $(INST)/$(PYGMENTS) $(INST)/$(PATCH)
     424$(INST)/$(JINJA2): $(BASE) $(INST)/$(PYTHON) $(INST)/$(DOCUTILS) $(INST)/$(SETUPTOOLS) $(INST)/$(PATCH)
    428425        +$(PIPE) "$(SAGE_SPKG) $(JINJA2) 2>&1" "tee -a $(SAGE_LOGS)/$(JINJA2).log"
    429426
    430 $(INST)/$(PYGMENTS): $(BASE) $(INST)/$(ZODB) $(INST)/$(PATCH)
     427$(INST)/$(PYGMENTS): $(BASE) $(INST)/$(PYTHON) $(INST)/$(SETUPTOOLS) $(INST)/$(PATCH)
    431428        +$(PIPE) "$(SAGE_SPKG) $(PYGMENTS) 2>&1" "tee -a $(SAGE_LOGS)/$(PYGMENTS).log"
    432429
    433 $(INST)/$(ZODB): $(BASE) $(INST)/$(TWISTED) $(INST)/$(PATCH)
     430$(INST)/$(ZODB): $(BASE) $(INST)/$(PYTHON) $(INST)/$(SETUPTOOLS) $(INST)/$(PATCH)
    434431        +$(PIPE) "$(SAGE_SPKG) $(ZODB) 2>&1" "tee -a $(SAGE_LOGS)/$(ZODB).log"
    435432
    436433$(INST)/$(TWISTED): $(BASE) $(INST)/$(PYTHON) $(INST)/$(PYTHON_GNUTLS) \
     
    438435                    $(INST)/$(SETUPTOOLS) $(INST)/$(PATCH)
    439436        +$(PIPE) "$(SAGE_SPKG) $(TWISTED) 2>&1" "tee -a $(SAGE_LOGS)/$(TWISTED).log"
    440437
    441 # For reference and for when the setuptools problem is solved, here
    442 # are the actual dependencies:
    443 #
    444 # sagenb: python pexpect twisted jinja2 sphinx docutils setuptools
    445 # sqlalchemy: python setuptools
    446 # sphinx: docutils jinja2 pygments
    447 # jinja2: python docutils setuptools
    448 # pygments: python setuptools
    449 # twisted: python python_gnutls setuptools
    450 # zodb: python setuptools
     438# setuptools forgets to update easy-install.pth during parallel
     439# builds, so we build the relevant packages serially.
     440
     441$(SAGE_BUILD_DIR)/setuptools-serial-1-stamp: $(INST)/$(TWISTED)
     442        touch $@
     443$(INST)/$(ZODB): $(SAGE_BUILD_DIR)/setuptools-serial-1-stamp
     444
     445$(SAGE_BUILD_DIR)/setuptools-serial-2-stamp: $(INST)/$(ZODB)
     446        touch $@
     447$(INST)/$(PYGMENTS): $(SAGE_BUILD_DIR)/setuptools-serial-2-stamp
     448
     449$(SAGE_BUILD_DIR)/setuptools-serial-3-stamp: $(INST)/$(PYGMENTS)
     450        touch $@
     451$(INST)/$(JINJA2): $(SAGE_BUILD_DIR)/setuptools-serial-3-stamp
     452
     453$(SAGE_BUILD_DIR)/setuptools-serial-4-stamp: $(INST)/$(JINJA2)
     454        touch $@
     455$(INST)/$(SPHINX): $(SAGE_BUILD_DIR)/setuptools-serial-4-stamp
     456
     457$(SAGE_BUILD_DIR)/setuptools-serial-5-stamp: $(INST)/$(SPHINX)
     458        touch $@
     459$(INST)/$(SQLALCHEMY): $(SAGE_BUILD_DIR)/setuptools-serial-5-stamp
     460
     461$(SAGE_BUILD_DIR)/setuptools-serial-6-stamp: $(INST)/$(SQLALCHEMY)
     462        touch $@
     463$(INST)/$(SAGENB): $(SAGE_BUILD_DIR)/setuptools-serial-6-stamp
    451464
    452465########################################################################
    453466# List all *build-time* dependencies of the Sage library.  These are,