#29785 closed enhancement (fixed)

Move Extension options from src/module_list.py to "distutils:" directives in the individual files (part 3: Get rid of uname_specific)

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.2
Component: refactoring Keywords:
Cc: gh-kliem, fbissey, dimpase, mjo Merged in:
Authors: Matthias Koeppe Reviewers: Jonathan Kliem
Report Upstream: N/A Work issues:
Branch: 2ba1d7b (Commits, GitHub, GitLab) Commit: 2ba1d7b7087536784391480d54c42a06ead2a6dd
Dependencies: #29706 Stopgaps:

Status badges

Description (last modified by mkoeppe)

Follow-up from #29706.

We get rid of the use of uname_specific to define an Extension option in module_list, replacing it by use of cython_aliases.

Change History (15)

comment:1 Changed 18 months ago by mkoeppe

  • Dependencies set to #29706

comment:2 Changed 18 months ago by mkoeppe

  • Branch set to u/mkoeppe/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_3__get_rid_of_uname_specific_

comment:3 Changed 18 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Commit set to 0bd21a1f02ef0a74782f66aba621f40c3eb68467
  • Dependencies #29706 deleted
  • Status changed from new to needs_review

New commits:

0bd21a1src/module_list.py: Implement uname_specific flags using cython_aliases

comment:4 Changed 18 months ago by mkoeppe

  • Cc fbissey dimpase added

comment:5 Changed 18 months ago by mkoeppe

  • Cc mjo added

comment:6 Changed 18 months ago by gh-kliem

File "src/sage/env.py", line 384, in sage.env.cython_aliases
Failed example:
    sorted(cython_aliases().keys())
Expected:
    ['ARB_LIBRARY',
     'FFLASFFPACK_CFLAGS',
     'FFLASFFPACK_INCDIR',
     'FFLASFFPACK_LIBDIR',
     'FFLASFFPACK_LIBEXTRA',
     'FFLASFFPACK_LIBRARIES',
     'GIVARO_CFLAGS',
     'GIVARO_INCDIR',
     'GIVARO_LIBDIR',
     'GIVARO_LIBEXTRA',
     'GIVARO_LIBRARIES',
     'GSL_CFLAGS',
     'GSL_INCDIR',
     'GSL_LIBDIR',
     'GSL_LIBEXTRA',
     'GSL_LIBRARIES',
     'LINBOX_CFLAGS',
     'LINBOX_INCDIR',
     'LINBOX_LIBDIR',
     'LINBOX_LIBEXTRA',
     'LINBOX_LIBRARIES',
     'SINGULAR_CFLAGS',
     'SINGULAR_INCDIR',
     'SINGULAR_LIBDIR',
     'SINGULAR_LIBEXTRA',
     'SINGULAR_LIBRARIES']
Got:
    ['ARB_LIBRARY',
     'FFLASFFPACK_CFLAGS',
     'FFLASFFPACK_INCDIR',
     'FFLASFFPACK_LIBDIR',
     'FFLASFFPACK_LIBEXTRA',
     'FFLASFFPACK_LIBRARIES',
     'GIVARO_CFLAGS',
     'GIVARO_INCDIR',
     'GIVARO_LIBDIR',
     'GIVARO_LIBEXTRA',
     'GIVARO_LIBRARIES',
     'GSL_CFLAGS',
     'GSL_INCDIR',
     'GSL_LIBDIR',
     'GSL_LIBEXTRA',
     'GSL_LIBRARIES',
     'LINBOX_CFLAGS',
     'LINBOX_INCDIR',
     'LINBOX_LIBDIR',
     'LINBOX_LIBEXTRA',
     'LINBOX_LIBRARIES',
     'LINUX_NOEXECSTACK',
     'SINGULAR_CFLAGS',
     'SINGULAR_INCDIR',
     'SINGULAR_LIBDIR',
     'SINGULAR_LIBEXTRA',
     'SINGULAR_LIBRARIES']

and pyflakes warnings:

+src/sage/env.py:153: undefined name 'HOSTNAME'
+src/sage/env.py:162: undefined name 'SAGE_LOCAL'
+src/sage/env.py:163: undefined name 'SAGE_LOCAL'
+src/sage/env.py:164: undefined name 'SAGE_LOCAL'
+src/sage/env.py:165: undefined name 'SAGE_SHARE'
+src/sage/env.py:166: undefined name 'SAGE_LOCAL'
+src/sage/env.py:168: undefined name 'SAGE_LIB'
+src/sage/env.py:171: undefined name 'SAGE_ROOT'
+src/sage/env.py:171: undefined name 'SAGE_LIB'
+src/sage/env.py:172: undefined name 'SAGE_ROOT'
+src/sage/env.py:172: undefined name 'SAGE_DOC'
+src/sage/env.py:173: undefined name 'SAGE_ROOT'
+src/sage/env.py:174: undefined name 'SAGE_ROOT'
+src/sage/env.py:177: undefined name 'DOT_SAGE'
+src/sage/env.py:180: undefined name 'SAGE_SHARE'
+src/sage/env.py:181: undefined name 'SAGE_SHARE'
+src/sage/env.py:182: undefined name 'SAGE_SHARE'
+src/sage/env.py:183: undefined name 'SAGE_SHARE'
+src/sage/env.py:184: undefined name 'SAGE_SHARE'
+src/sage/env.py:185: undefined name 'SAGE_SHARE'
+src/sage/env.py:186: undefined name 'SAGE_SHARE'
+src/sage/env.py:187: undefined name 'SAGE_SHARE'
+src/sage/env.py:188: undefined name 'SAGE_SHARE'
+src/sage/env.py:189: undefined name 'SAGE_SHARE'
+src/sage/env.py:190: undefined name 'SAGE_SHARE'
+src/sage/env.py:191: undefined name 'SAGE_SHARE'
+src/sage/env.py:192: undefined name 'SAGE_SHARE'
+src/sage/env.py:193: undefined name 'SAGE_SHARE'
+src/sage/env.py:194: undefined name 'SAGE_SHARE'
+src/sage/env.py:195: undefined name 'SAGE_SHARE'
+src/sage/env.py:251: undefined name 'SAGE_LOCAL'
+src/sage/env.py:272: undefined name 'SAGE_LOCAL'
+src/sage/env.py:299: undefined name 'DOT_SAGE'
+src/sage/env.py:300: undefined name 'UNAME'
+src/sage/env.py:316: undefined name 'UNAME'
+src/sage/env.py:365: undefined name 'SAGE_SRC'
+src/sage/env.py:365: undefined name 'SAGE_LIB'
+src/sage/env.py:367: undefined name 'SAGE_INC'
+src/sage/env.py:448: undefined name 'ARB_LIBRARY'
+
+found 39 pyflakes errors in the modified files

comment:7 Changed 18 months ago by mkoeppe

  • Dependencies set to #29706

comment:8 Changed 18 months ago by mkoeppe

The pyflakes warnings are ... flakes. These variables are injected into the globals dynamically.

comment:9 Changed 18 months ago by git

  • Commit changed from 0bd21a1f02ef0a74782f66aba621f40c3eb68467 to 2ba1d7b7087536784391480d54c42a06ead2a6dd

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

346bd88src/sage/modules: Move Extension options from src/module_list.py to distutils directives
70901easrc/sage/env.py (cython_aliases): Update doctest
eed920esrc/sage/tests: Move Extension options from src/module_list.py to distutils directives
0d25d1dsrc/sage/structure: Move Extension options from src/module_list.py to distutils directives
808f46asrc/sage/stats: Move Extension options from src/module_list.py to distutils directives
10f7542src/sage/schemes: Move Extension options from src/module_list.py to distutils directives
5867c05src/sage/modular/pollack_stevens/dist.pyx: Add missing distutils directives
c536daaRemove self-listing in distutils sources directive
b1b3787sage.env.cython_aliases: Fix for systems without zlib pc
2ba1d7bMerge branch 't/29706/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files' into t/29785/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_3__get_rid_of_uname_specific_

comment:10 Changed 18 months ago by mkoeppe

Merged in #29706, which makes the doctest more flexible

comment:11 Changed 18 months ago by mkoeppe

  • Description modified (diff)

comment:12 Changed 18 months ago by mkoeppe

Needs review

comment:13 Changed 18 months ago by gh-kliem

  • Reviewers set to Jonathan Kliem
  • Status changed from needs_review to positive_review

LGTM.

comment:14 Changed 18 months ago by mkoeppe

Thanks!

comment:15 Changed 18 months ago by vbraun

  • Branch changed from u/mkoeppe/move_extension_options_from_src_module_list_py_to__distutils___directives_in_the_individual_files__part_3__get_rid_of_uname_specific_ to 2ba1d7b7087536784391480d54c42a06ead2a6dd
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.