diff --git a/build/pkgs/sagemath_coxeter3/SPKG.rst b/build/pkgs/sagemath_coxeter3/SPKG.rst new file mode 120000 index 00000000000..b4545b4bda6 --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/SPKG.rst @@ -0,0 +1 @@ +src/README.rst \ No newline at end of file diff --git a/build/pkgs/sagemath_coxeter3/bootstrap b/build/pkgs/sagemath_coxeter3/bootstrap new file mode 120000 index 00000000000..40542346a4e --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/bootstrap @@ -0,0 +1 @@ +../sagelib/bootstrap \ No newline at end of file diff --git a/build/pkgs/sagemath_coxeter3/dependencies b/build/pkgs/sagemath_coxeter3/dependencies new file mode 100644 index 00000000000..55f26dde8e1 --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/dependencies @@ -0,0 +1 @@ +$(PYTHON) sagelib coxeter3 | $(PYTHON_TOOLCHAIN) sage_setup cython pkgconfig diff --git a/build/pkgs/sagemath_coxeter3/distros/conda.txt b/build/pkgs/sagemath_coxeter3/distros/conda.txt new file mode 100644 index 00000000000..3ffe2eb8bfc --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/distros/conda.txt @@ -0,0 +1 @@ +sagemath-coxeter3 diff --git a/build/pkgs/sagemath_coxeter3/install-requires.txt b/build/pkgs/sagemath_coxeter3/install-requires.txt new file mode 100644 index 00000000000..52e4f34c240 --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/install-requires.txt @@ -0,0 +1,2 @@ +# This file is updated on every release by the sage-update-version script +sagemath-coxeter3 diff --git a/build/pkgs/sagemath_coxeter3/package-version.txt b/build/pkgs/sagemath_coxeter3/package-version.txt new file mode 120000 index 00000000000..c4540217bba --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/package-version.txt @@ -0,0 +1 @@ +src/VERSION.txt \ No newline at end of file diff --git a/build/pkgs/sagemath_coxeter3/spkg-install b/build/pkgs/sagemath_coxeter3/spkg-install new file mode 100755 index 00000000000..7ce202f09ae --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/spkg-install @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# From sage-spkg. +# For type=script packages, the build rule in build/make/Makefile sources +# sage-env but not sage-dist-helpers. +lib="$SAGE_ROOT/build/bin/sage-dist-helpers" +source "$lib" +if [ $? -ne 0 ]; then + echo >&2 "Error: failed to source $lib" + echo >&2 "Is $SAGE_ROOT the correct SAGE_ROOT?" + exit 1 +fi +cd src + +export PIP_NO_INDEX=true +export PIP_FIND_LINKS="file://$SAGE_SPKG_WHEELS" + +if [ "$SAGE_EDITABLE" = yes ]; then + # SAGE_ROOT/src/setup.py installs everything, nothing to do... + if [ "$SAGE_WHEELS" = yes ]; then + # ... except we build the wheel if requested + sdh_setup_bdist_wheel && sdh_store_wheel . + fi +else + if [ "$SAGE_WHEELS" = yes ]; then + # Modularized install via wheels + sdh_pip_install . + # else nothing to do in legacy direct installation. + fi +fi diff --git a/build/pkgs/sagemath_coxeter3/spkg-src b/build/pkgs/sagemath_coxeter3/spkg-src new file mode 100755 index 00000000000..8ae44f00fec --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/spkg-src @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# +# Script to prepare an sdist tarball for sagemath-coxeter3 +# This script is not used during build. +# +# HOW TO MAKE THE TARBALL: +# ./sage --sh build/pkgs/sagemath_coxeter3/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_coxeter3 + +cd src +python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_coxeter3/src b/build/pkgs/sagemath_coxeter3/src new file mode 120000 index 00000000000..a9a1c8ae443 --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/src @@ -0,0 +1 @@ +../../../pkgs/sagemath-coxeter3 \ No newline at end of file diff --git a/build/pkgs/sagemath_coxeter3/type b/build/pkgs/sagemath_coxeter3/type new file mode 100644 index 00000000000..134d9bc32d5 --- /dev/null +++ b/build/pkgs/sagemath_coxeter3/type @@ -0,0 +1 @@ +optional diff --git a/pkgs/sagemath-coxeter3/MANIFEST.in b/pkgs/sagemath-coxeter3/MANIFEST.in new file mode 100644 index 00000000000..8534471f1f2 --- /dev/null +++ b/pkgs/sagemath-coxeter3/MANIFEST.in @@ -0,0 +1,11 @@ +global-exclude *.c +global-exclude *.cpp + +global-exclude __pycache__ +global-exclude *.py[co] +global-exclude *.bak +global-exclude *.so +global-exclude *~ +prune .tox +prune build +prune dist diff --git a/pkgs/sagemath-coxeter3/README.rst b/pkgs/sagemath-coxeter3/README.rst new file mode 100644 index 00000000000..fbc6e64938a --- /dev/null +++ b/pkgs/sagemath-coxeter3/README.rst @@ -0,0 +1,32 @@ +============================================================================== + Sage: Open Source Mathematics Software: Graph (iso/auto)morphisms with coxeter3 +============================================================================== + +About SageMath +-------------- + + "Creating a Viable Open Source Alternative to + Magma, Maple, Mathematica, and MATLAB" + + Copyright (C) 2005-2022 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-coxeter3`` is a small +optional distribution for use with ``sagemath-standard``. + +It provides a Cython interface to the ``coxeter3`` library for the purpose +of computing graph (iso/auto)morphisms. diff --git a/pkgs/sagemath-coxeter3/VERSION.txt b/pkgs/sagemath-coxeter3/VERSION.txt new file mode 100644 index 00000000000..737bfe2c1d2 --- /dev/null +++ b/pkgs/sagemath-coxeter3/VERSION.txt @@ -0,0 +1 @@ +9.8.beta1 diff --git a/pkgs/sagemath-coxeter3/pyproject.toml.m4 b/pkgs/sagemath-coxeter3/pyproject.toml.m4 new file mode 100644 index 00000000000..aa4c23992be --- /dev/null +++ b/pkgs/sagemath-coxeter3/pyproject.toml.m4 @@ -0,0 +1,14 @@ +[build-system] +# Minimum requirements for the build system to execute. +requires = [ + esyscmd(`sage-get-system-packages install-requires-toml \ + setuptools \ + wheel \ + sage_setup \ + sagemath_environment \ + sagemath_standard \ + cython \ + gmpy2 \ + cysignals \ + ')] +build-backend = "setuptools.build_meta" diff --git a/pkgs/sagemath-coxeter3/requirements.txt.m4 b/pkgs/sagemath-coxeter3/requirements.txt.m4 new file mode 100644 index 00000000000..8b6ca03b0b9 --- /dev/null +++ b/pkgs/sagemath-coxeter3/requirements.txt.m4 @@ -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)') diff --git a/pkgs/sagemath-coxeter3/sage b/pkgs/sagemath-coxeter3/sage new file mode 120000 index 00000000000..e0da5daa6f2 --- /dev/null +++ b/pkgs/sagemath-coxeter3/sage @@ -0,0 +1 @@ +../../src/sage \ No newline at end of file diff --git a/pkgs/sagemath-coxeter3/setup.cfg.m4 b/pkgs/sagemath-coxeter3/setup.cfg.m4 new file mode 100644 index 00000000000..aad6b620681 --- /dev/null +++ b/pkgs/sagemath-coxeter3/setup.cfg.m4 @@ -0,0 +1,33 @@ +# -*- conf-unix -*- +[metadata] +name = sagemath-coxeter3 +version = file: VERSION.txt +description = Sage: Open Source Mathematics Software: Graph (iso/auto)morphisms with coxeter3 +long_description = file: README.rst +long_description_content_type = text/x-rst +license = GNU General Public License (GPL) v2 or later +author = The Sage Developers +author_email = sage-support@googlegroups.com +url = https://www.sagemath.org + +classifiers = + Development Status :: 6 - Mature + Intended Audience :: Education + Intended Audience :: Science/Research + License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) + Operating System :: POSIX + Operating System :: MacOS :: MacOS X + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: Implementation :: CPython + Topic :: Scientific/Engineering :: Mathematics + +[options] +python_requires = >=3.8, <3.12 +install_requires = + esyscmd(`sage-get-system-packages install-requires \ + sagelib \ + | sed "2,\$s/^/ /;"')dnl diff --git a/pkgs/sagemath-coxeter3/setup.py b/pkgs/sagemath-coxeter3/setup.py new file mode 100644 index 00000000000..639b1124e8a --- /dev/null +++ b/pkgs/sagemath-coxeter3/setup.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python + +from distutils import log +from setuptools import setup + +# Work around a Cython problem in Python 3.8.x on macOS +# https://github.com/cython/cython/issues/3262 +import os +if os.uname().sysname == 'Darwin': + import multiprocessing + multiprocessing.set_start_method('fork', force=True) + +# If build isolation is not in use and setuptools_scm is installed, +# then its file_finders entry point is invoked, which we don't need. +# Workaround from ​https://github.com/pypa/setuptools_scm/issues/190#issuecomment-351181286 +try: + import setuptools_scm.integration + setuptools_scm.integration.find_files = lambda _: [] +except ImportError: + pass + +# PEP 517 builds do not have . in sys.path +import sys +sys.path.insert(0, os.path.dirname(__file__)) + +if len(sys.argv) > 1 and (sys.argv[1] == "sdist" or sys.argv[1] == "egg_info"): + sdist = True +else: + sdist = False + +if sdist: + cmdclass = {} +else: + from sage_setup.excepthook import excepthook + sys.excepthook = excepthook + + from sage_setup.setenv import setenv + setenv() + + import sage.env + sage.env.default_required_modules = sage.env.default_optional_modules = () + + from sage_setup.command.sage_build_cython import sage_build_cython + from sage_setup.command.sage_build_ext import sage_build_ext + sage_build_cython.built_distributions = ['sagemath-coxeter3'] + + cmdclass = dict(build_cython=sage_build_cython, + build_ext=sage_build_ext) + +if sdist: + python_packages = [] + python_modules = [] + cython_modules = [] +else: + from sage_setup.find import find_python_sources + python_packages, python_modules, cython_modules = find_python_sources( + '.', ['sage'], distributions=['sagemath-coxeter3']) + + log.warn('python_packages = {0}'.format(python_packages)) + log.warn('python_modules = {0}'.format(python_modules)) + log.warn('cython_modules = {0}'.format(cython_modules)) + +setup( + cmdclass = cmdclass, + packages = python_packages, + py_modules = python_modules, + ext_modules = cython_modules, +)