Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 't/29950/build_sagelib_using_installed_sage_setup' into …
Browse files Browse the repository at this point in the history
…t/30277/remove_src_module_list_py
  • Loading branch information
Matthias Koeppe committed Aug 3, 2020
2 parents 3aa2d8e + 01b96b0 commit 2818739
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 39 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ gitlab-build-docker.log
/src/bin/sage-env-config
/build/bin/sage-build-env-config

/build/pkgs/*/src/build
/build/pkgs/*/src/dist
/build/pkgs/*/src/MANIFEST
/build/pkgs/*/src/*.egg-info
/build/pkgs/*/src/.tox

#######################
# tox generated files #
#######################
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/spkg-install
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
cd "$SAGE_SRC"
cd src
## All sagelib-building is done by setup.py.
## This is so that sagelib can be installed by standard Python procedures,
## such as "./setup.py install" or "pip install ."
Expand Down
21 changes: 21 additions & 0 deletions build/pkgs/sagelib/spkg-src
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# Script to prepare an sdist tarball for sagelib
# This script is not used during build.
#
# HOW TO MAKE THE TARBALL:
# ./sage --sh build/pkgs/sagelib/spkg-src

if [ -z "$SAGE_ROOT" ] ; then
echo >&2 "Error - SAGE_ROOT undefined ... exiting"
echo >&2 "Maybe run 'sage -sh'?"
exit 1
fi

# Exit on failure
set -e

cd build/pkgs/sagelib

cd src
sage-python23 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES"
8 changes: 8 additions & 0 deletions build/pkgs/sagelib/src/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
global-include *.c *.cc *.cpp *.h *.hh *.hpp *.inc *.py *.pyx *.pxd *.pxi *.rst *.txt *.tex

include MANIFEST.in

prune .tox

graft sage/libs/gap/test
prune sage/ext/interpreters # In particular, __init__.py must not be present in the distribution; or sage_setup.autogen.interpreters.rebuild will not generate the code
1 change: 1 addition & 0 deletions build/pkgs/sagelib/src/bin
19 changes: 19 additions & 0 deletions build/pkgs/sagelib/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#sage_conf
#sage_setup
six # use of six should be removed from sage_setup
Cython==0.29.17
pkgconfig
cysignals
gmpy2==2.1.0b1

numpy # already needed by sage.env
jinja2 # sage_setup.autogen.interpreters

cypari2 # but building bdist_wheel of cypari2 fails with recent pip... https://github.com/sagemath/cypari2/issues/93

########## Runtime

psutil
pexpect
pplpy
ipython<=5.8
1 change: 1 addition & 0 deletions build/pkgs/sagelib/src/sage
1 change: 1 addition & 0 deletions build/pkgs/sagelib/src/sage_setup
1 change: 1 addition & 0 deletions build/pkgs/sagelib/src/setup.py
35 changes: 35 additions & 0 deletions build/pkgs/sagelib/src/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# First pip-install tox:
#
# ./sage -pip install tox
#
# To build and test in the tox environment:
#
# ./sage -sh -c '(cd build/pkgs/sagelib/src && tox -v -v)'
#
# To test interactively:
#
# build/pkgs/sagelib/src/.tox/python/bin/python
#
[tox]

[testenv]
deps = -rrequirements.txt

passenv =
SAGE_LOCAL

setenv =
# Sage scripts such as sage-runtests like to use $HOME/.sage
HOME={envdir}

whitelist_externals =
bash

commands =
# Beware of the treacherous non-src layout. "./sage/" shadows the install sage package.
python -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.all; print(sage.all.__file__)'

# FIXME: The following loads sage-env, which loads the wrong Python.
sage -c 'import sys; print("sys.path =", sys.path); import sage.all; print(sage.all.__file__)'

#sage -t --all
38 changes: 0 additions & 38 deletions src/MANIFEST.in

This file was deleted.

0 comments on commit 2818739

Please sign in to comment.