sagemath/sage

Fix sagemath-standard sdist

Closed this issue · 17 comments

./bootstrap && ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-nopypi-norequirements)' fails in 9.8.beta5 because the sdist is broken


  cimport cython
  from sage.algebras.fusion_rings.poly_tup_engine cimport (
  ^
  ------------------------------------------------------------

  sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx:12:0: 'sage/algebras/fusion_rings/poly_tup_engine.pxd' not found

We fix this by

  • updating MANIFEST
  • unconditionally running the module finder in pkgs/sagemath-standard/setup.py

We make the same change also in pkgs/sagemath-objects/setup.py (by symlink, this also affects sagemath-categories).

Depends on #34859

CC: @kwankyu @kiwifb

Component: distribution

Author: Matthias Koeppe

Branch/Commit: e229436

Reviewer: François Bissey

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

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

00deebepkgs/sagemath-objects/setup.py: Run finder also for sdist, egg_info, dist_info

Author: Matthias Koeppe

Description changed:

--- 
+++ 
@@ -11,3 +11,11 @@
 
 ```
 
+We fix this by 
+- updating MANIFEST
+- unconditionally running the module finder in pkgs/sagemath-standard/setup.py
+
+We make the same change also in pkgs/sagemath-objects/setup.py (by symlink, this also affects sagemath-categories).
+
+
+

Dependencies: #34859

Changed commit from 00deebe to e229436

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

39bd748src/sage/dynamics/arithmetic_dynamics/projective_ds.py: Remove unused import of typing_extensions
e229436Merge #34859
comment:6

So no more sdist specific code in setup.py so simplification and make sure stuff is properly included in the manifest.

I am wondering if it is possible to first use a global include and then prune some of the files that are collected by that global include. I am just thinking we should explicitly list as few files as we can. It is a risk, because someone will forget to include them in the manifest when they create a new one - or delete one.

comment:7

Yes, that's what the MANIFEST.in is doing. We do have to distinguish between the Cython-generated C/C++ files and actual C/C++ source files. Adding new such files is a relatively rare event

comment:8

I am very much in automation these days. While it is relatively short, maintaining this list by hand is a hazard. Which is why this ticket add 3 explicit files to MANIFEST.in. I am going to fill that under ideas to develop.

For the rest it looks good to me but I see #34859 has not been reviewed yet.

comment:9

I hope to switch from setuptools to meson-python in #34630; then we can revisit this question.

comment:10

Replying to François Bissey:

I see #34859 has not been reviewed yet.

Now the dependency has been reviewed

comment:11

Let's move on then.

Reviewer: François Bissey

comment:12

Thanks!