Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demote brial (= polybori) from standard to optional, add distribution sagemath-brial, enlarge sagemath-objects, sagemath-categories #36380

Open
wants to merge 105 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
168742e
Merge branch 'sage_schemes_imports' into brial_experimental
mkoeppe Jun 22, 2024
6167f32
build/pkgs/brial/type: Change to experimental
mkoeppe Oct 1, 2023
665d402
src/setup.py: Add brial to optional packages excluded in monolithic i…
mkoeppe May 12, 2024
1041e9c
build/pkgs/sagelib/dependencies*: Reduce brial to optional
mkoeppe Apr 13, 2024
4a17cbe
src/sage/features/sagemath.py: Change type of sage.rings.polynomial.p…
mkoeppe Oct 7, 2023
ceaf4b0
build/make/Makefile.in (PYPI_WHEEL_PACKAGES): Add sagemath_brial
mkoeppe Oct 1, 2023
4261f0b
build/pkgs/sagemath_brial, pkgs/sagemath-brial: New (from #35095)
mkoeppe Apr 13, 2024
ac5f7e5
src/sage_setup/{__init__.py,find.py,command}: Update from #35095
mkoeppe Apr 13, 2024
baefb9a
build/pkgs/{brial,sagemath_brial}: Change to optional
mkoeppe Apr 13, 2024
4c8b66e
Add all__sagemath_brial.py files
mkoeppe Apr 13, 2024
6a8d03b
pkgs/sagemath-brial/tox.ini: Fix references to package name
mkoeppe Oct 17, 2023
de1aa5d
src/sage/features/sagemath.py: Make sagemath-brial optional, not expe…
mkoeppe Apr 13, 2024
ac7523e
build/pkgs/sagemath_brial/dependencies: Move PYTHON to end
mkoeppe Apr 13, 2024
10ad2a9
src/sage_setup/find.py: Restore
mkoeppe Apr 17, 2024
82ad499
pkgs/sagemath-brial/pyproject.toml.m4: Remove runtime dependencies on…
mkoeppe Apr 17, 2024
84d6e67
build/pkgs/sagemath_brial: Depend on sagelib instead of sagemath_cate…
mkoeppe Apr 17, 2024
21a55d4
pkgs/sagemath-brial/tox.ini: Update from sagemath-categories
mkoeppe Apr 18, 2024
71c0204
pkgs/sagemath-brial/pyproject.toml.m4: Declare test requirements
mkoeppe Apr 18, 2024
fe739a4
.gitignore: Handle pkgs/sagemath-brial
mkoeppe May 22, 2024
8550f3b
src/setup.cfg.m4: Define extra 'brial'
mkoeppe May 12, 2024
4884112
pkgs/sagemath-{objects,categories,repl,environment}/MANIFEST.in: Upda…
mkoeppe May 12, 2024
0c5ea52
pkgs/sagemath-{objects,categories,repl,environment}/pyproject.toml: U…
mkoeppe May 12, 2024
b4919e8
pkgs/sagemath-categories/MANIFEST.in.m4: exclude sage/rings/function_…
mkoeppe May 12, 2024
ef95af5
sage -fixdistributions --set all: Handle sagemath-brial
mkoeppe May 22, 2024
60ea218
Update all__sagemath_{objects,categories,repl,environment}.py from #3…
mkoeppe Jun 11, 2024
3cc461f
Update 'all' files
mkoeppe Jun 11, 2024
415fd5b
src/sage/misc/dev_tools.py (find_objects_from_name): Ignore objects f…
mkoeppe May 14, 2023
1a416ab
src/sage/rings/rational.pyx: Update from #35095
mkoeppe May 23, 2024
6c46b0d
src/sage/rings/rational.pyx: Revert
mkoeppe Jun 2, 2024
94fe9d3
src/sage/schemes/elliptic_curves/ell_curve_isogeny.py: Fix # needs
mkoeppe Jun 3, 2024
93f3dd6
src/sage/schemes/elliptic_curves/ell_curve_isogeny.py: Remove unneces…
mkoeppe Jun 3, 2024
1319ec7
src/sage/schemes/elliptic_curves/ell_curve_isogeny.py: Revert add of …
mkoeppe Jun 3, 2024
35d0c71
Revert "src/sage/rings/rational.pyx: Revert"
mkoeppe Jun 7, 2024
77e6637
src/sage/rings/rational.pyx: Do not use RealDouble_classes for now
mkoeppe Jun 7, 2024
69c5c8a
./sage -fixdoctests --distribution sagemath-categories --update-known…
mkoeppe Jun 7, 2024
b99fdf0
./sage -fixdoctests --distribution sagemath-repl --update-known-test-…
mkoeppe Jun 7, 2024
efbee8c
.github/workflows/dist.yml: Build sagemath-brial wheel
mkoeppe Jun 7, 2024
2f3ac96
pkgs/sagemath-brial/setup.py: Set up sys.path for now
mkoeppe Jun 7, 2024
7a7c795
pkgs/sagemath-objects/pyproject.toml.m4: Add to package-data
mkoeppe Jun 7, 2024
0590be2
pkgs/sagemath-{categories,environment}/README.rst: Update from #35095
mkoeppe Jun 9, 2024
d3851cd
sage.categories: Update # needs
mkoeppe Jun 9, 2024
6cb3e71
sage -fixdoctests --distribution sagemath-categories --update-known-t…
mkoeppe Jun 9, 2024
046dbcf
src/sage/all__sagemath_categories.py: Update from #35095
mkoeppe Jun 11, 2024
04dd503
src/sage/categories/semigroups.py: Fix # needs
mkoeppe Jun 22, 2024
9bd9f18
src/sage/combinat/permutation.py: Use lazy_import for SJT
mkoeppe Jun 23, 2024
1d29e4b
sage -fixdoctests --distribution sagemath-categories --update-known-t…
mkoeppe Jun 23, 2024
5d2efe1
src/sage/misc/dev_tools.py: Update doctest output
mkoeppe Jun 24, 2024
736dfdb
Merge remote-tracking branch 'upstream/develop' into brial_experimental
mkoeppe Jul 25, 2024
dbdb740
src/sage/categories/triangular_kac_moody_algebras.py: Add # needs
mkoeppe Jul 26, 2024
9cd16e3
src/sage/tests/cmdline.py: Add # needs
mkoeppe Jul 26, 2024
4fa314c
Merge remote-tracking branch 'upstream/develop' into brial_experimental
mkoeppe Aug 3, 2024
9c04670
Merge branch 'develop' into brial_experimental
mkoeppe Aug 10, 2024
1a9c4c5
./sage --fixdistributions --set sagemath-brial --from-egg-info
mkoeppe Aug 22, 2024
679d582
Merge branch 'develop' into brial_experimental
mkoeppe Sep 4, 2024
54b9aa0
src/sage/sat/converters/polybori.py: Use lazy_import
mkoeppe Sep 5, 2024
6588560
src/sage_docbuild/builders.py: Actually test feature presence in '.. …
mkoeppe Sep 6, 2024
c5f1ad1
./sage --fixdoctests --distribution sagemath-categories --update-know…
mkoeppe Sep 6, 2024
e875b25
Merge branch 'develop' into brial_experimental
mkoeppe Sep 25, 2024
5e71f53
src/sage/functions/hypergeometric.py: Update # needs
mkoeppe Sep 26, 2024
ff660fc
src/sage/rings/function_field/element.pyx: Update # needs
mkoeppe Sep 26, 2024
f90093f
src/sage/rings/polynomial/pbori: Add # sage.doctest file directives
mkoeppe Sep 28, 2024
2afb99c
src/sage/structure/sequence.py: Use more lazy_import
mkoeppe Sep 28, 2024
8f00816
src/sage/crypto/mq/sr.py: Add # needs
mkoeppe Sep 28, 2024
e06bcf3
src/sage/rings/polynomial/multi_polynomial_libsingular.pyx: Add # needs
mkoeppe Sep 29, 2024
581bd47
src/doc/en/reference/sat/index.rst: Add # needs
mkoeppe Sep 29, 2024
0a400bf
src/sage/misc/citation.pyx: Recognize pbori use from a compiled module
mkoeppe Sep 29, 2024
b52f037
Merge branch 'develop' into brial_experimental
mkoeppe Oct 1, 2024
876fa67
src/sage/sets/disjoint_set.pyx: Use LazyImport
mkoeppe Oct 2, 2024
c937d3b
Merge remote-tracking branch 'upstream/develop' into brial_experimental
mkoeppe Oct 14, 2024
462d20d
src/sage/rings/power_series_ring.py: Use lazy_import
mkoeppe Oct 14, 2024
ac4af7c
src/sage/schemes/generic/scheme.py: Use lazy_import
mkoeppe Oct 14, 2024
cbd4705
src/sage/structure/parent.pyx: Add # needs
mkoeppe Oct 14, 2024
76a1137
./sage --fixdoctests --distribution sagemath-categories --update-know…
mkoeppe Oct 14, 2024
4a230cd
src/sage/arith/misc.py: Add # needs
mkoeppe Oct 14, 2024
7ff4d21
sage.categories: Add # needs
mkoeppe Oct 14, 2024
93edb68
sage.combinat: Add # needs
mkoeppe Oct 14, 2024
d1c0adf
src/sage/doctest/util.py: Add # needs
mkoeppe Oct 14, 2024
6c3067d
src/sage/groups/generic.py: Add # needs
mkoeppe Oct 14, 2024
84e3252
src/sage/rings/function_field/jacobian_*.py: Add # needs
mkoeppe Oct 14, 2024
697ac5b
sage.rings: Modularization fixes (imports)
mkoeppe Oct 14, 2024
9641879
./sage --fixdoctests --distribution sagemath-categories --update-know…
mkoeppe Oct 14, 2024
f562919
sage.groups: Add # needs
mkoeppe Oct 14, 2024
75f7fc7
sage.modules: Add # needs
mkoeppe Oct 14, 2024
52203c2
sage.rings.function_field: Add # needs
mkoeppe Oct 14, 2024
d0eed98
src/sage/rings/generic.py: Add # needs
mkoeppe Oct 14, 2024
ff5e5b0
sage.rings: Add # needs
mkoeppe Oct 14, 2024
2140e49
PowerSeries_poly.reverse: Recognize ImportError as pari failure
mkoeppe Oct 14, 2024
c7fbf22
./sage --fixdoctests --distribution sagemath-categories --update-know…
mkoeppe Oct 14, 2024
3c9c49b
src/sage/schemes/generic/homset.py: Add # needs
mkoeppe Oct 14, 2024
41c0d10
src/sage/schemes/projective/projective_subscheme.py: Use lazy_import
mkoeppe Oct 14, 2024
d500775
sage.categories: Add # needs
mkoeppe Oct 15, 2024
695c1d1
sage.groups: Add # needs
mkoeppe Oct 15, 2024
44f78ed
sage.rings: Add # needs
mkoeppe Oct 15, 2024
4056a24
sage.sets: Add # needs
mkoeppe Oct 15, 2024
25cd8f4
sage.structure: Add # needs
mkoeppe Oct 15, 2024
2153574
./sage --fixdoctests --distribution sagemath-categories --update-know…
mkoeppe Oct 15, 2024
0a508b4
sage.rings: Add # needs
mkoeppe Oct 15, 2024
dbadb36
sage.schemes: Add # needs
mkoeppe Oct 15, 2024
099f97b
sage.rings: Add # needs
mkoeppe Oct 15, 2024
98f2702
sage.schemes: Add # needs
mkoeppe Oct 15, 2024
8aa4580
sage.structure: Add # needs
mkoeppe Oct 15, 2024
9cba2e8
./sage --fixdoctests --distribution sagemath-categories --update-know…
mkoeppe Oct 15, 2024
4db215b
Merge remote-tracking branch 'upstream/develop' into brial_experimental
mkoeppe Oct 27, 2024
f5ee6a4
src/sage_setup/__init__.py: Fix for breaking change in sage_setup.aut…
mkoeppe Oct 26, 2024
aed5ba0
Make brial standard again for now
mkoeppe Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
# SPKGs to install as system packages
SPKGS: _bootstrap _prereq
# Non-Python packages to install as spkgs
TARGETS_PRE: gmp mpfr mpc bliss coxeter3 mcqd meataxe sirocco boost_cropped tdlib
TARGETS_PRE: gmp mpfr mpc bliss coxeter3 mcqd meataxe sirocco boost_cropped tdlib brial
CIBW_BUILD: "*${{ matrix.build }}*"
# Disable building PyPy wheels on all platforms
CIBW_SKIP: "pp*"
Expand Down Expand Up @@ -250,6 +250,10 @@ jobs:
run: |
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*bliss*

- name: sagemath-brial
run: |
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*brial*

- name: sagemath-coxeter3
run: |
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*coxeter3*
Expand All @@ -258,6 +262,13 @@ jobs:
run: |
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*mcqd*

- name: sagemath-tdlib
run: |
case "${{ matrix.arch }}" in
sagemath*tdlib:i686) ;; # broken - boost-related
*) "${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*tdlib*
esac

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-wheels
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ build/pkgs/wheel/version_requirements.txt

/pkgs/sagemath-objects/setup.cfg
/pkgs/sagemath-bliss/setup.cfg
/pkgs/sagemath-brial/setup.cfg
/pkgs/sagemath-coxeter3/setup.cfg
/pkgs/sagemath-mcqd/setup.cfg
/pkgs/sagemath-meataxe/setup.cfg
Expand All @@ -229,6 +230,7 @@ build/pkgs/wheel/version_requirements.txt
/pkgs/sagemath-repl/setup.cfg
/pkgs/sagemath-objects/pyproject.toml
/pkgs/sagemath-bliss/pyproject.toml
/pkgs/sagemath-brial/pyproject.toml
/pkgs/sagemath-coxeter3/pyproject.toml
/pkgs/sagemath-mcqd/pyproject.toml
/pkgs/sagemath-meataxe/pyproject.toml
Expand All @@ -239,6 +241,7 @@ build/pkgs/wheel/version_requirements.txt
/pkgs/sagemath-repl/pyproject.toml
/pkgs/sagemath-objects/requirements*.txt
/pkgs/sagemath-bliss/requirements*.txt
/pkgs/sagemath-brial/requirements*.txt
/pkgs/sagemath-coxeter3/requirements*.txt
/pkgs/sagemath-mcqd/requirements*.txt
/pkgs/sagemath-meataxe/requirements*.txt
Expand Down
3 changes: 2 additions & 1 deletion build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ PYPI_WHEEL_PACKAGES = $(PYPI_NOARCH_WHEEL_PACKAGES) \
sagemath_tdlib \
sagemath_coxeter3 \
sagemath_sirocco \
sagemath_meataxe
sagemath_meataxe \
sagemath_brial

# sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib
WHEEL_PACKAGES = $(PYPI_WHEEL_PACKAGES) \
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/brial/type
Original file line number Diff line number Diff line change
@@ -1 +1 @@
standard
optional
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FORCE $(SCRIPTS) boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml importlib_metadata importlib_resources jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy $(PYTHON) requests rw sage_conf singular symmetrica typing_extensions $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup $(PYTHON) pythran
FORCE $(SCRIPTS) boost_cropped $(BLAS) cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml importlib_metadata importlib_resources jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy $(PYTHON) requests rw sage_conf singular symmetrica typing_extensions $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup $(PYTHON) pythran

----------
mkoeppe marked this conversation as resolved.
Show resolved Hide resolved
All lines of this file are ignored except the first.
Expand Down
1 change: 1 addition & 0 deletions build/pkgs/sagelib/dependencies_optional
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brial
1 change: 1 addition & 0 deletions build/pkgs/sagemath_brial/SPKG.rst
1 change: 1 addition & 0 deletions build/pkgs/sagemath_brial/bootstrap
1 change: 1 addition & 0 deletions build/pkgs/sagemath_brial/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cypari memory_allocator brial sagelib | $(PYTHON_TOOLCHAIN) sage_setup cython pkgconfig $(PYTHON)
1 change: 1 addition & 0 deletions build/pkgs/sagemath_brial/dependencies_check
1 change: 1 addition & 0 deletions build/pkgs/sagemath_brial/package-version.txt
1 change: 1 addition & 0 deletions build/pkgs/sagemath_brial/spkg-check
1 change: 1 addition & 0 deletions build/pkgs/sagemath_brial/spkg-install.in
24 changes: 24 additions & 0 deletions build/pkgs/sagemath_brial/spkg-src
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
#
# Script to prepare an sdist tarball for sagemath-brial
# This script is not used during build.
#
# HOW TO MAKE THE TARBALL:
# ./sage --sh build/pkgs/sagemath_brial/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/sagemath_brial

cd src
# Get rid of old *.egg-info/SOURCES.txt
rm -Rf *.egg-info

python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES"
1 change: 1 addition & 0 deletions build/pkgs/sagemath_brial/src
1 change: 1 addition & 0 deletions build/pkgs/sagemath_brial/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
2 changes: 2 additions & 0 deletions build/pkgs/sagemath_brial/version_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-brial
21 changes: 21 additions & 0 deletions pkgs/sagemath-brial/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
prune sage

include VERSION.txt

graft sage/libs/polybori
graft sage/rings/polynomial/pbori

global-exclude *.c
global-exclude *.cpp

global-exclude all__sagemath_*.py
global-include all__sagemath_brial.py

global-exclude __pycache__
global-exclude *.py[co]
global-exclude *.bak
global-exclude *.so
global-exclude *~
prune .tox
prune build
prune dist
30 changes: 30 additions & 0 deletions pkgs/sagemath-brial/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
=========================================================================
Sage: Open Source Mathematics Software: Boolean Ring Algebra with BRiAl
=========================================================================

About SageMath
--------------

"Creating a Viable Open Source Alternative to
Magma, Maple, Mathematica, and MATLAB"

Copyright (C) 2005-2023 The Sage Development Team

https://www.sagemath.org

SageMath fully supports all major Linux distributions, recent versions of
macOS, and Windows (using Cygwin or Windows Subsystem for Linux).

The traditional and recommended way to install SageMath is from source via
Sage-the-distribution (https://www.sagemath.org/download-source.html).
Sage-the-distribution first builds a large number of open source packages from
source (unless it finds suitable versions installed in the system) and then
installs the Sage Library (sagelib, implemented in Python and Cython).


About this pip-installable source distribution
----------------------------------------------

This pip-installable source distribution ``sagemath-brial`` provides
a Boolean Ring Algebra implementation using binary decision diagrams,
implemented by the BRiAl library, the successor to PolyBoRi.
1 change: 1 addition & 0 deletions pkgs/sagemath-brial/VERSION.txt
57 changes: 57 additions & 0 deletions pkgs/sagemath-brial/pyproject.toml.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*-
[build-system]
# Minimum requirements for the build system to execute.
requires = [
SPKG_INSTALL_REQUIRES_setuptools
SPKG_INSTALL_REQUIRES_pkgconfig
SPKG_INSTALL_REQUIRES_sage_setup
SPKG_INSTALL_REQUIRES_sagemath_categories
SPKG_INSTALL_REQUIRES_sagemath_environment
SPKG_INSTALL_REQUIRES_sagemath_objects
SPKG_INSTALL_REQUIRES_cython
SPKG_INSTALL_REQUIRES_cysignals
]
build-backend = "setuptools.build_meta"

[project]
name = "sagemath-brial"
description = "Sage: Open Source Mathematics Software: Boolean Ring Algebra with BRiAl"
dependencies = [
SPKG_INSTALL_REQUIRES_cysignals
]
dynamic = ["version"]
include(`pyproject_toml_metadata.m4')dnl'

[project.readme]
file = "README.rst"
content-type = "text/x-rst"

[project.optional-dependencies]
test = [
SPKG_INSTALL_REQUIRES_sagemath_categories
SPKG_INSTALL_REQUIRES_sagemath_repl
]

[tool.setuptools]
include-package-data = false

[tool.setuptools.dynamic]
version = {file = ["VERSION.txt"]}

[external]
# External dependencies in the format proposed by https://peps.python.org/pep-0725
build-requires = [
"virtual:compiler/c",
"virtual:compiler/cpp",
"pkg:generic/pkg-config",
]

host-requires = [
"pkg:generic/brial",
"pkg:generic/gmp",
"pkg:generic/mpc",
"pkg:generic/mpfr",
]

dependencies = [
]
6 changes: 6 additions & 0 deletions pkgs/sagemath-brial/requirements-editable.txt.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include(`sage_spkg_versions.m4')dnl
dnl Same as setup.cfg.m4 install_requires; FIXME: should pin to built wheels.
SPKG_INSTALL_REQUIRES_gmpy2
SPKG_INSTALL_REQUIRES_cysignals
-e ../sagemath-objects
-e ../sagemath-categories
2 changes: 2 additions & 0 deletions pkgs/sagemath-brial/requirements.txt.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Cython==esyscmd(`printf $(sed "s/[.]p.*//;" ../cython/package-version.txt)')
sagemath-standard==esyscmd(`printf $(sed "s/[.]p.*//;" ../sagelib/package-version.txt)')
1 change: 1 addition & 0 deletions pkgs/sagemath-brial/sage
11 changes: 11 additions & 0 deletions pkgs/sagemath-brial/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python

# PEP 517 builds do not have . in sys.path
import os
import sys
sys.path.insert(0, os.path.dirname(__file__))

from sage_setup import sage_setup

sage_setup(['sagemath-brial'],
required_modules=('m4ri', 'libpng'))
120 changes: 120 additions & 0 deletions pkgs/sagemath-brial/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# To build and test in the tox environment:
#
# ./sage -sh -c '(cd pkgs/sagemath-brial && tox -v -v -v -e sagepython)'
#
# To test interactively:
mkoeppe marked this conversation as resolved.
Show resolved Hide resolved
#
# pkgs/sagemath-brial/.tox/sagepython/bin/python
#
[tox]
envlist =
sagepython-sagewheels-nopypi-norequirements

requires =
# Auto-provision a modern tox.
# [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance
# Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1
tox>=4.2
tox<4.14.1

[pkgenv]
# Environment in which to build the sdist.
# https://tox.wiki/en/latest/upgrading.html#packaging-environments
passenv =
# Variables set by .homebrew-build-env
CPATH
LIBRARY_PATH
PKG_CONFIG_PATH
# Parallel build
SAGE_NUM_THREADS
SAGE_NUM_THREADS_PARALLEL
MAKEFLAGS
# SAGE_VENV only for referring to the basepython or finding the wheels
sagepython, sagewheels: SAGE_VENV
# Location of the wheels
sagewheels: SAGE_SPKG_WHEELS

setenv =
# We supply pip options by environment variables so that they
# apply both to the installation of the dependencies and of the package
sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels}
nopypi: PIP_NO_INDEX=true

[testenv]
deps =
!norequirements: -rrequirements.txt

extras = test

passenv = {[pkgenv]passenv}

setenv = {[pkgenv]setenv}
# Sage scripts such as sage-runtests like to use $HOME/.sage
HOME={envdir}
# Stop 'sage -t --installed' from picking up doc installed in SAGE_LOCAL
SAGE_DOC=/doesnotexist
KNOWN_TEST_FAILURES={toxinidir}/known-test-failures.json
# See src/bin/sage-env
PYDEVD_DISABLE_FILE_VALIDATION=1

allowlist_externals =
bash

commands =
# Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package.
{envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.all__sagemath_brial; import sage.rings.polynomial.pbori'

[testenv:.tox]
# Allow access to PyPI for auto-provisioning a suitable tox version
passenv =
setenv = PIP_NO_INDEX=false

[testenv:.pkg-sagepython]
# Environment in which to build the sdist.
# inherits from [pkgenv] - https://tox.wiki/en/latest/upgrading.html#packaging-environments
basepython = {env:SAGE_VENV}/bin/python3

[testenv:.pkg-sagepython-sagewheels-nopypi]
passenv = {[pkgenv]passenv}
SAGE_VENV
SAGE_SPKG_WHEELS

setenv = {[pkgenv]setenv}
PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels}
PIP_NO_INDEX=true

basepython = {env:SAGE_VENV}/bin/python3

[testenv:.pkg-sagepython-sagewheels-nopypi-editable]
config_settings_build_editable =
editable_mode = strict


[testenv:sagepython]
basepython = {env:SAGE_VENV}/bin/python3
package_env = .pkg-sagepython

[testenv:sagepython-sagewheels-nopypi]
basepython = {env:SAGE_VENV}/bin/python3
package_env = .pkg-sagepython-sagewheels-nopypi

[testenv:sagepython-sagewheels]
basepython = {env:SAGE_VENV}/bin/python
package_env = .pkg-sagepython

[testenv:sagepython-norequirements]
basepython = {env:SAGE_VENV}/bin/python3
package_env = .pkg-sagepython


[testenv:sagepython-sagewheels-nopypi-norequirements]
basepython = {env:SAGE_VENV}/bin/python3
package_env = .pkg-sagepython-sagewheels-nopypi

[testenv:sagepython-sagewheels-nopypi-editable]
basepython = {env:SAGE_VENV}/bin/python3
package_env = .pkg-sagepython-sagewheels-nopypi-editable
package = editable
deps = -r requirements-editable.txt
config_settings_build_editable =
editable_mode = strict
Loading
Loading