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

Install SAGE_SRC/ext/ in package data of sage package by setup.py, not SAGE_LOCAL/share/sage/ext/ by build/make/Makefile #21785

Closed
mkoeppe opened this issue Oct 30, 2016 · 73 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Oct 30, 2016

A lot of the stuff (not necessarily all) in $SAGE_SRC/ext belongs directly in the sage Python package--in particular any files that are needed for the package itself to function properly.

A model for that is sage.gaprc, a file required for the libgap module to work, which is installed in sage.libs.gap as "package data" as of #22626.

In this ticket, we install all of ext as package data of sage.

  • In a follow up ticket, if we identify any files in $SAGE_SRC/ext that aren't explicitly required from the package, we will move them to a more appropriate place.

Depends on #29233

CC: @jdemeyer @embray @kiwifb @slel @saraedum @isuruf @dimpase @jhpalmieri

Component: build

Author: Matthias Koeppe

Branch: fef5a5f

Reviewer: François Bissey

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

@mkoeppe mkoeppe added this to the sage-7.5 milestone Oct 30, 2016
@kiwifb
Copy link
Member

kiwifb commented Oct 30, 2016

comment:2

That would actually help me. I see extra potential to this for my jupyter kernel install woes as well (even if I know Jeroen doesn't see it that way).

@slel
Copy link
Member

slel commented Jul 3, 2019

comment:3

There was a reference to this ticket in a "sage-packaging" discussion:

@slel slel modified the milestones: sage-7.5, sage-8.9 Jul 3, 2019
@embray
Copy link
Contributor

embray commented Jul 4, 2019

comment:4

I would add, a lot of the stuff (not necessarily all) in $SAGE_SRC/ext might better belong directly in the sage Python package--in particular any files that are needed for the package itself to function properly. For example you can see in #22626 that I put sage.gaprc, a file required for the libgap module to work, in sage.libs.gap as "package data".

There are several files in $SAGE_SRC/ext that there's no reason to ever allow to be out of sync with the Python package, and that could be given the same treatment.

For files in $SAGE_SRC/ext in general, that aren't explicitly required from the package (are there any such files) it might be better to move out of src/ entirely?

@embray
Copy link
Contributor

embray commented Dec 30, 2019

comment:5

Ticket retargeted after milestone closed

@embray embray modified the milestones: sage-8.9, sage-9.1 Dec 30, 2019
@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 13, 2020

comment:7

setuptools experts: To move this ticket forward, should it go through #22655 (Support package_data-like of non-Python resource files in Python packages)?

@embray
Copy link
Contributor

embray commented Jan 14, 2020

comment:8

Something like it, yes, though I think maybe it can be simplified.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 16, 2020

comment:9

Erik, should discussion then take place on #22655 or here?

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 21, 2020

comment:10

Description adapted from embray's comment 4.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Installation of SAGE_SRC/ext/ in SAGE_LOCAL/share/sage/ext/ should be done by setup.py, not build/make/Makefile Install SAGE_SRC/ext/ in package data of sage package by setup.py, not SAGE_LOCAL/share/sage/ext/ by build/make/Makefile Jan 21, 2020
@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 21, 2020

Dependencies: #29062

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 21, 2020

Author: Matthias Koeppe

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 21, 2020

comment:13

Branch is on top of #29062.

Installation of the package data does not work yet... what am I missing?


New commits:

568afdcbuild/pkgs/python3/spkg-install: Install valgrind-python.supp directly in SAGE_LOCAL, not first in SAGE_SRC
ceb35bbsrc/bin/sage-valgrind: Find python.supp/python3.supp in SAGE_LOCAL/lib/valgrind or system directories
06a0226Move src/ext to src/sage/ext_data and install it as 'package_data'

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 21, 2020

Commit: 06a0226

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 22, 2020

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

1edc654src/setup.py [package_data]: List all ext_data subdirectories

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 22, 2020

Changed commit from 06a0226 to 1edc654

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 31, 2020

comment:16

@embray Also this ticket would need review.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 1, 2020

Changed commit from 1edc654 to 749928c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 1, 2020

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

95c8316Move src/ext to src/sage/ext_data and install it as 'package_data'
749928csrc/setup.py [package_data]: List all ext_data subdirectories

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 1, 2020

comment:18

Rebased on top of current #29062 (and 9.1.beta2)

@vbraun
Copy link
Member

vbraun commented Feb 22, 2020

comment:51

I made #29233 for the documentation build issue

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 22, 2020

Dependencies: #29233

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 22, 2020

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

0dc97dbClean src/doc/en/installation/*.txt in bootstrap-clean, not misc-clean
51e7f51Merge branch 't/29233/bootstrap____make_distclean_broken' into t/21785/install_sage_src_ext__in_package_data_of_sage_package_by_setup_py__not_sage_local_share_sage_ext__by_build_make_makefile

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 22, 2020

Changed commit from 50a5d25 to 51e7f51

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 22, 2020

comment:54

I don't know how to reproduce this error:

FileNotFoundError: [Errno 2] No such file or directory: '-p'

@kiwifb
Copy link
Member

kiwifb commented Feb 22, 2020

comment:55

Ic ouldn't reproduce it either. I suspect this is an incremental build issue.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 24, 2020

Changed commit from 51e7f51 to fef5a5f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 24, 2020

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

fef5a5fFileDocTestSource._test_enough_doctest doctest: Do not load .py files that are not a sage module

@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 24, 2020

comment:58

Found it, fixed. Needs review

@kiwifb
Copy link
Member

kiwifb commented Feb 26, 2020

comment:59

OK let's try it again.

@kiwifb
Copy link
Member

kiwifb commented Feb 29, 2020

comment:61

Could you check that .nodoctest files are properly installed in vanilla sage? Because vanilla sage runs doctests on original sage sources (while in sage-on-gentoo it is run on the install because the sources are not available at runtime) it may have been missed.

@kiwifb
Copy link
Member

kiwifb commented Feb 29, 2020

Changed commit from fef5a5f to none

@paulmasson
Copy link
Mannequin

paulmasson mannequin commented Mar 2, 2020

comment:62

This ticket messes up anyone with data in the old src/ext directory. Would have been nice to have some advance notice on sage-devel, you know?

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 2, 2020

comment:63

Let me know if you need help with resolving a merge conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants