Skip to content

Build sagelib from build/pkgs/sagelib/src, fix setup.py sdist, add spkg-src and tox.ini #29950

@mkoeppe

Description

@mkoeppe

As a follow-up to #29411, we set up a separate directory build/pkgs/sagelib/src with symlinks into SAGE_ROOT/src so that sagelib's setup.py does not have access to the whole tree SAGE_ROOT/src.

We fix setup.py sdist, which can be tested using spkg-src (which builds a pip-installable tarball in upstream/) and tox:

./sage -sh -c '(cd build/pkgs/sagelib/src && tox -v -v)'
./sage -sh -c 'build/pkgs/sagelib/src/.tox/python/bin/sage-ipython'

The call of ./sage -sh is necessary so that SAGE_LOCAL is set.
Moreover, for scripts that use sage-env, also SAGE_ENV_SOURCED is crucial for the correct operation; otherwise sage-env sets things based on SAGE_LOCAL again.

Depends on #29701

CC: @kiwifb @jhpalmieri @dimpase @kliem @isuruf @vbraun

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: ccc67b0

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/29950

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions