sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.37k stars 462 forks source link

Distributions sagemath-{flint-arb,homfly,giac,gap}, add "sage_setup: distribution" to Cython modules #30666

Open mkoeppe opened 4 years ago

mkoeppe commented 4 years ago

Basically, we are making all external libraries optional, except for a minimal set of "core" libraries such as cysignals and gmpy2 (see #29865).

(from #30371): See #29705 under the items titled "Deploy mildly modularized distributions", "Further modularization" for a sketch of such distributions. Basically, one distribution for each major C/C++ library (such as sagemath-ntl) - but some libraries come in packs that would not make much sense to separate (such as sagemath-flint-arb-e_antic).

List of distributions:

To test:

In follow-up tickets:

This is preparation for Meta-ticket #29705 (Modularization) and #30371.

Depends on #31031 Depends on #34855 Depends on #34839

CC: @tobiasdiez @dimpase

Component: refactoring

Keywords: sd111

Author: Matthias Koeppe

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/30666

mkoeppe commented 1 year ago

Author: Matthias Koeppe

dimpase commented 1 year ago
comment:42

How are all these tags like # sage_setup: distribution = sagemath-gap processed?

mkoeppe commented 1 year ago
comment:43

They are processed by the functions in sage_setup.find, via sage.misc.package_dir.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Branch pushed to git repo; I updated commit sha1. New commits:

133e5b8Remove copy-pasted conda.txt files
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from 0f198ca to 133e5b8

mkoeppe commented 1 year ago
comment:45
sage -t --random-seed=146157697718740975867546676674797881386 sage/groups/perm_gps/partn_ref/data_structures.pyx
**********************************************************************
File "sage/groups/perm_gps/partn_ref/data_structures.pyx", line 1221, in sage.groups.perm_gps.partn_ref.data_structures.SC_test_list_perms
Failed example:
    for i in range(2,9):
        test_Sn_on_m_points(i,i,1,0)
Expected nothing
Got:
    ImportError: cannot import name n_is_prime
    Exception ignored in: 'sage.groups.perm_gps.partn_ref.data_structures.SC_is_giant'
    Traceback (most recent call last):
      File "<doctest sage.groups.perm_gps.partn_ref.data_structures.SC_test_list_perms[2]>", line 4, in test_Sn_on_m_points
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from 133e5b8 to 4c8f5b5

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Branch pushed to git repo; I updated commit sha1. New commits:

4c8f5b5src/sage/sets/disjoint_set.pyx: Remove obsolete -*- coding -*- line
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Branch pushed to git repo; I updated commit sha1. New commits:

2be77afpkgs/sagemath-flint-arb: Update description
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from 4c8f5b5 to 2be77af

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Branch pushed to git repo; I updated commit sha1. New commits:

a827f29pkgs/sagemath-giac: Update description
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from 2be77af to a827f29

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from a827f29 to 112e29e

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Branch pushed to git repo; I updated commit sha1. New commits:

112e29esrc/sage/groups/perm_gps/partn_ref/data_structures.pyx: In doctest support code, avoid use of FLINT
mkoeppe commented 1 year ago

Description changed:

--- 
+++ 
@@ -44,8 +44,10 @@

 To test:

+- `make SAGE_WHEELS=yes SAGE_CHECK=yes sagemath_flint_arb`
 - `make SAGE_WHEELS=yes SAGE_CHECK=yes sagemath_gap`
-
+- `make SAGE_WHEELS=yes SAGE_CHECK=yes sagemath_giac`
+- `make SAGE_WHEELS=yes SAGE_CHECK=yes sagemath_homfly`

 In follow-up tickets:
dimpase commented 1 year ago
comment:53

there are a number of files with m4 suffix, which does not seem to be m4 files. Should they rather get in suffux?

mkoeppe commented 1 year ago
comment:54

They are processed by m4, see build/pkgs/sagelib/bootstrap

dimpase commented 1 year ago
comment:55

Imho they should have .in suffix. Otherwise, looks OK.

mkoeppe commented 1 year ago
comment:56

The .in files in use with autotools are not processed by m4.

These .m4 files are processed by m4. For example, in setup.cfg.m4 you'll see the m4 macro call esyscmd.

dimpase commented 1 year ago
comment:57

ah, OK. I misunderstood what "processed" means in this context.

mkoeppe commented 1 year ago
comment:58

Thanks!

mkoeppe commented 1 year ago

Reviewer: Dima Pasechnik

kiwifb commented 1 year ago
comment:60

When I build the full sagelib with this ticket included (but I do not build those sub distribution yet) in sage-on-gentoo, building the documentation fails. After inspection, I have the sources installed for sage/libs/flint, sage/libs/arb etc, but none of compiled module are installed. Is there something I am missing or doing wrong?

mkoeppe commented 1 year ago
comment:61

Are you building from src/ or from pkgs/sagemath-standard/?

kiwifb commented 1 year ago
comment:62

src with the setup.py from sagemath-standard. This is when I build against develop or the Volker merging branch. The main reason I am starting from src in those cases, is that patch does not like links.

kiwifb commented 1 year ago
comment:63

I also delete src/sage_setup so it is not used instead of the installed one.

mkoeppe commented 1 year ago
comment:64

OK, that's something that I'll have to fix in pkgs/sagemath-standard/setup.py. Thanks for catching this

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Branch pushed to git repo; I updated commit sha1. New commits:

790c12bMerge tag '9.8.beta5' into t/30666/add__sage_setup__distribution__directives_to_all_cython_modules_needing_external_libraries
8b1cf25pkgs/sagemath-standard/setup.py: Include files marked as # sage_setup: distribution = sagemath-flint-arb etc.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from 112e29e to 8b1cf25

mkoeppe commented 1 year ago

Changed dependencies from #31031 to #31031, #34855

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Changed commit from 8b1cf25 to 1531fda

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 1 year ago

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

2b39b3dMerge #34858
c59622abuild/pkgs/sagemath*/spkg-src: Use build
7fc93d0build/pkgs/sagemath*/spkg-src: Use --skip-dependency-check
4940db4build/make/Makefile.in: Add targets SPKG-src for script packages
573fcfdbuild/make/Makefile.in: Move targets pypi-sdists, wheel, pypi-wheels here; use SPKG-sdist targets
88e18d0Merge #34855
0bd13acbuild/make/Makefile.in: Remove duplicate setting of PYPI_WHEEL_PACKAGES
f712d67Merge #34855
5fc1addbuild/pkgs/sagemath*/spkg-src: Use build
1531fdabuild/pkgs/sagemath_flint_arb/dependencies: Fix up
mkoeppe commented 1 year ago

Changed dependencies from #31031, #34855 to #31031, #34855, #34839

mkoeppe commented 1 year ago

Removed branch from issue description; replaced by PR #35663