-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
After #29500, it is possible to install Python packages built by the Sage distribution into user-defined venvs.
As of Sage 9.3.beta8, sagelib
is published as a source distribution on PyPI (https://pypi.org/project/sagemath-standard), but the package does not have proper dependency information yet.
As part of bootstrap
, we now generate (1) the pyproject.toml
(PEP 517 metadata) and install_requires
information, (2) requirements.txt
and (3) Pipfile
using m4 from the information added in #30719. These files provide 3 distinct ways of setting up a user-defined venv.
(Adding pyproject.toml
does not change how the Sage distribution installs sagelib because build/pkgs/sagelib/spkg-install
uses setup.py install
directly.)
To test - use ./bootstrap
and then configure and build the Sage distribution. Then follow the instructions in build/pkgs/sagelib/src/tox.ini
:
#
# SUPPORTED ENVIRONMENTS:
#
# Build dependencies according to requirements.txt (all versions fixed).
# Use ONLY the wheels built and stored by the Sage distribution (no PyPI):
#
# ./sage -sh -c '(cd build/pkgs/sagelib/src && tox -v -v -v -e python-sagewheels-nopypi)'
#
python-sagewheels-nopypi,
#
# Build and test without using the concrete dependencies specified by requirements.txt,
# using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only:
# Still use ONLY the wheels built and stored by the Sage distribution (no PyPI).
#
# ./sage -sh -c '(cd build/pkgs/sagelib/src && tox -v -v -v -e python-sagewheels-nopypi-norequirements)'
#
python-sagewheels-nopypi-norequirements,
#
Related or follow-up tickets:
- ./configure --enable-editable #31377
./configure --enable-editable
- Developer's Guide: Add instructions for sagelib development in a conda environment #28746 Developer's Guide: Add instructions for sagelib development in a conda environment
- Meta-ticket: Make sagelib pip-installable in a conda environment #28752 Make sagelib pip-installable in a conda environment
- Use pipenv to create venv for development #30371 In-place (editable) installs of sagelib in a venv
- sage_bootstrap: Add command "sage -package list --output={install-requires,requirements,pipfile,debian,....}" #29041
sage_bootstrap
: Add command "sage -package list --output={install-requires,requirements,pipfile,debian,....}" - add documentation on how to set up the virtual environment, using either plain
python -m venv
,virtualenv
(20.x), orpipenv
.
References:
CC: @dimpase @tobiasdiez @jhpalmieri @videlec @kiwifb @malb
Component: build
Keywords: sd111
Author: Matthias Koeppe
Branch/Commit: 04da2c6
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/30913