From 1812ed866656c3d73a451c021d7cced6bc33632f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 10 Feb 2024 17:39:21 -0800 Subject: [PATCH 1/4] pkgs/sagemath-standard: Use pyproject.toml separate from SAGE_ROOT/src/pyproject.toml --- .gitignore | 2 ++ ...project.toml => pyproject-monolithic.toml} | 0 .../pyproject-monolithic.toml.m4 | 1 + pkgs/sagemath-standard/pyproject.toml.m4 | 30 ++++++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) rename pkgs/sagemath-standard/{pyproject.toml => pyproject-monolithic.toml} (100%) create mode 120000 pkgs/sagemath-standard/pyproject-monolithic.toml.m4 mode change 120000 => 100644 pkgs/sagemath-standard/pyproject.toml.m4 diff --git a/.gitignore b/.gitignore index 43f58abcafe..0dce3b882ff 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ /src/pyproject.toml /src/Pipfile /src/Pipfile.lock +/src/pyproject.toml /Pipfile /Pipfile.lock @@ -223,6 +224,7 @@ build/bin/sage-build-env-config /pkgs/sagemath-categories/pyproject.toml /pkgs/sagemath-environment/pyproject.toml /pkgs/sagemath-repl/pyproject.toml +/pkgs/sagemath-standard/pyproject.toml /pkgs/sagemath-objects/requirements.txt /pkgs/sagemath-bliss/requirements.txt /pkgs/sagemath-coxeter3/requirements.txt diff --git a/pkgs/sagemath-standard/pyproject.toml b/pkgs/sagemath-standard/pyproject-monolithic.toml similarity index 100% rename from pkgs/sagemath-standard/pyproject.toml rename to pkgs/sagemath-standard/pyproject-monolithic.toml diff --git a/pkgs/sagemath-standard/pyproject-monolithic.toml.m4 b/pkgs/sagemath-standard/pyproject-monolithic.toml.m4 new file mode 120000 index 00000000000..25dbae84866 --- /dev/null +++ b/pkgs/sagemath-standard/pyproject-monolithic.toml.m4 @@ -0,0 +1 @@ +../../src/pyproject.toml.m4 \ No newline at end of file diff --git a/pkgs/sagemath-standard/pyproject.toml.m4 b/pkgs/sagemath-standard/pyproject.toml.m4 deleted file mode 120000 index 25dbae84866..00000000000 --- a/pkgs/sagemath-standard/pyproject.toml.m4 +++ /dev/null @@ -1 +0,0 @@ -../../src/pyproject.toml.m4 \ No newline at end of file diff --git a/pkgs/sagemath-standard/pyproject.toml.m4 b/pkgs/sagemath-standard/pyproject.toml.m4 new file mode 100644 index 00000000000..7065ba1468c --- /dev/null +++ b/pkgs/sagemath-standard/pyproject.toml.m4 @@ -0,0 +1,29 @@ +[build-system] +# Minimum requirements for the build system to execute. +requires = [ + "sage_setup[autogen]", + # Some version of sage-conf is required. + # Note that PEP517/518 have no notion of optional sage_spkg dependencies: + # https://github.com/pypa/pip/issues/6144 + esyscmd(`sage-get-system-packages install-requires-toml \ + sage_conf \ + setuptools \ + wheel \ + sage_setup \ + cypari \ + cysignals \ + cython \ + gmpy2 \ + jinja2 \ + jupyter_core \ + numpy \ + pkgconfig \ + pplpy \ + memory_allocator \ + ')] +build-backend = "setuptools.build_meta" + +[tool.conda-lock] +platforms = [ + 'osx-64', 'linux-64', 'linux-aarch64', 'osx-arm64' +] From 04906e46fbc5e6858d0deea8033d61ca88c3f9c9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 10 Feb 2024 17:58:49 -0800 Subject: [PATCH 2/4] pkgs/sagemath-standard: Use pyproject.toml separate from SAGE_ROOT/src/pyproject.toml (fixup) --- src/MANIFEST.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MANIFEST.in b/src/MANIFEST.in index 07a135dbf07..5b2fe278ecd 100644 --- a/src/MANIFEST.in +++ b/src/MANIFEST.in @@ -7,6 +7,8 @@ prune sage_setup prune sage_docbuild prune doc +exclude pyproject-monolithic* + # # Most C and C++ files are generated by Cython and should not # be included in the sdist. From 32320ad9f487f86c69b752a3cb25146ed15a1ab9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 10 Feb 2024 17:48:20 -0800 Subject: [PATCH 3/4] pkgs/sagemath-standard: Make sagemath-environment a build-requirement instead of manipulating sys.path --- pkgs/sagemath-standard/pyproject.toml.m4 | 1 + pkgs/sagemath-standard/setup.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/sagemath-standard/pyproject.toml.m4 b/pkgs/sagemath-standard/pyproject.toml.m4 index 7065ba1468c..f96a5c18ca8 100644 --- a/pkgs/sagemath-standard/pyproject.toml.m4 +++ b/pkgs/sagemath-standard/pyproject.toml.m4 @@ -10,6 +10,7 @@ requires = [ setuptools \ wheel \ sage_setup \ + sagemath_environment \ cypari \ cysignals \ cython \ diff --git a/pkgs/sagemath-standard/setup.py b/pkgs/sagemath-standard/setup.py index 7f6318a0fa0..bf121ead51b 100755 --- a/pkgs/sagemath-standard/setup.py +++ b/pkgs/sagemath-standard/setup.py @@ -28,9 +28,6 @@ ### Set source directory ######################################################### -# PEP 517 builds do not have . in sys.path -sys.path.insert(0, os.path.dirname(__file__)) - import sage.env sage.env.SAGE_SRC = os.getcwd() from sage.env import * From 8a09d7c08378bd4118235b3f203d2b02e92cca9c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 10 Feb 2024 18:15:04 -0800 Subject: [PATCH 4/4] .gitignore: Remove dup --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0dce3b882ff..0e00d5965b4 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,6 @@ /src/pyproject.toml /src/Pipfile /src/Pipfile.lock -/src/pyproject.toml /Pipfile /Pipfile.lock