Opened 6 years ago

Closed 2 years ago

#15039 closed enhancement (wontfix)

sage python library and automake

Reported by: felixs Owned by:
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: build Keywords:
Cc: jondo Merged in:
Authors: Felix Salfelder Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: u/felixs/15039 (Commits) Commit: d9894da7584240b558546f1e1601f2efbf1a1ae3
Dependencies: Stopgaps:

Description

I have chosen to implement the distribution independent build system with autotools. It turns out that two changes considerably simplify issues.

  • change the suffix for .pyx files that are intended to be compiled to c++ code. automake derives the build rules from this suffix, not from meta information.
  • don't use lib[a-z]*.pyx as the filenames for cython code. libtool will confuse the resulting plugins with shared libraries.

These changes are pretty small and can be tested/reviewed/merged independently.

Change History (6)

comment:1 Changed 6 years ago by jondo

  • Cc jondo added

comment:2 Changed 6 years ago by felixs

  • Branch set to u/felixs/15039
  • Commit set to 0b7148572731a70585f353107d78a3f3d45473cb
  • Status changed from new to needs_review

Unfortunately, cython needs to be patched to not unnecessarily break setup.py.

comment:3 follow-up: Changed 6 years ago by vbraun

  • Commit changed from 0b7148572731a70585f353107d78a3f3d45473cb to d9894da7584240b558546f1e1601f2efbf1a1ae3
  • Status changed from needs_review to needs_info

This obviously needs to be discussed with Cython upstream... The following thread seems relevant but doesn't end in a conclusion, and I don't know the current status there. IMHO we shouldn't modify Cython in a way that upstream won't ever merge.

http://thread.gmane.org/gmane.comp.python.cython.devel/14955/focus=14964


New commits:

d9894dapython-sage fix reference to libsagegap in permgroup.py doctest

comment:4 in reply to: ↑ 3 Changed 6 years ago by felixs

Replying to vbraun:

http://thread.gmane.org/gmane.comp.python.cython.devel/14955/focus=14964

this thread is relevant, but it's mostly about cython bug 655 (=writing out dependencies for builds involving cython).

this ticket patches cython (4 lines) to fix a different issue. commit @74c837c makes cythonize work on files with arbitrary extensions. and thus work after appending x to files containing cython code meant to be translated to c++. for sage, this patch is meant to facilitate a transition from distutils to a (make based) build system. it's simply allowing them to coexist (and is not required after a transition).

i expect that cython developers will merge this patch (or some variant), if they see flexibility as improvement (e.g. like Robert has merged the patch that unhardwires the debugger output path, https://github.com/cython/cython/pull/247). alternatives may exist of course, i didn't find them...

comment:5 Changed 2 years ago by jdemeyer

  • Milestone changed from sage-wishlist to sage-duplicate/invalid/wontfix
  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_info to positive_review

I think it's clear that there no plans at all to start using automake for the Sage library. Even if automake has its advantages, as far as I know every single Python project uses distutils or some variant.

comment:6 Changed 2 years ago by embray

  • Resolution set to wontfix
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.