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/30277/remove_src_module_list_py' into t/30163/cygwin_…
Browse files Browse the repository at this point in the history
…_try_again_to_use_system_blas_and_system_r
  • Loading branch information
mkoeppe committed Aug 14, 2020
2 parents b5963fc + df38027 commit 7f8ede4
Show file tree
Hide file tree
Showing 15 changed files with 100 additions and 1,265 deletions.
6 changes: 6 additions & 0 deletions .gitignore
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
4 changes: 2 additions & 2 deletions build/make/Makefile.in
Expand Up @@ -331,10 +331,10 @@ clean:
@echo "Deleting package build directories..."
rm -rf "$(SAGE_LOCAL)/var/tmp/sage/build"

# c_lib .cython_version are from old sage versions
# "c_lib", ".cython_version", "build" in $(SAGE_SRC) are from old sage versions
sagelib-clean:
@echo "Deleting Sage library build artifacts..."
cd "$(SAGE_SRC)" && (rm -rf c_lib .cython_version; rm -rf build; find . -name '*.pyc' | xargs rm -f; rm -rf sage/ext/interpreters)
(cd "$(SAGE_SRC)" && rm -rf c_lib .cython_version; rm -rf build; find . -name '*.pyc' | xargs rm -f; rm -rf sage/ext/interpreters) && (cd "$(SAGE_ROOT)/build/pkgs/sagelib/src/" && rm -rf build)

build-clean: clean doc-clean sagelib-clean

Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/spkg-install
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 7f8ede4

Please sign in to comment.