robertwb / issues-import-test

0 stars 0 forks source link

Adding one library to .pxd file adds all libraries #998

Open robertwb opened 9 years ago

robertwb commented 9 years ago

After making this one-line change in some .pxd file:

diff --git a/src/sage/libs/gmp/types.pxd b/src/sage/libs/gmp/types.pxd
index 204f490..b6eca5e 100644
--- a/src/sage/libs/gmp/types.pxd
+++ b/src/sage/libs/gmp/types.pxd
@@ -1,3 +1,5 @@
+# distutils: libraries = gmp
+
 from libc.stdio cimport FILE

 cdef extern from "gmp.h":

all files depending on src/sage/libs/gmp/types.pxd are now linked to ''all'' libraries in Sage. For example, sage/graphs/asteroidal_triples.c changed from

/* Generated by Cython 0.22 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "libraries": [           "csage"
        ](
), 

to

/* Generated by Cython 0.22 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "libraries": [           "gmp", 
            "csage", 
            "flint", 
            "gmpxx", 
            "m", 
            "stdc++", 
            "ntl", 
            "singular", 
            "readline", 
            "mpfr", 
            "pari", 
            "modulardecomposition", 
            [... a lot more ...](
)

while I just wanted

    "distutils": {
        "libraries": [           "gmp",
            "csage"
        ](
), 

Migrated from http://trac.cython.org/ticket/845

robertwb commented 9 years ago

@jdemeyer changed I'm working on a fix, pull request soon.

robertwb commented 9 years ago

@jdemeyer changed See https://github.com/cython/cython/pull/381