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

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

Closed
mkoeppe opened this issue Jun 3, 2020 · 18 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 3, 2020

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.

Depends on #29706

CC: @kliem @kiwifb @dimpase @orlitzky

Component: refactoring

Author: Matthias Koeppe

Branch/Commit: 2ba1d7b

Reviewer: Jonathan Kliem

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

@mkoeppe mkoeppe added this to the sage-9.2 milestone Jun 3, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 3, 2020

Dependencies: #29706

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 3, 2020

New commits:

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

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 3, 2020

Changed dependencies from #29706 to none

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 3, 2020

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 3, 2020

Commit: 0bd21a1

@kliem
Copy link
Contributor

kliem commented Jun 5, 2020

comment:6
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

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 7, 2020

Dependencies: #29706

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 7, 2020

comment:8

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

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 7, 2020

Changed commit from 0bd21a1 to 2ba1d7b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 7, 2020

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_

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 7, 2020

comment:10

Merged in #29706, which makes the doctest more flexible

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 12, 2020

comment:12

Needs review

@kliem
Copy link
Contributor

kliem commented Jun 13, 2020

Reviewer: Jonathan Kliem

@kliem
Copy link
Contributor

kliem commented Jun 13, 2020

comment:13

LGTM.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 13, 2020

comment:14

Thanks!

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

3 participants