Skip to content

distutils support for swig is under par #40827

Closed

Description

@sjoerdmullender
BPO 1016626
Nosy @sjoerdmullender, @theller, @tarekziade, @akitada, @zooba

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/tarekziade'
closed_at = <Date 2021-02-03.18:19:35.326>
created_at = <Date 2004-08-26.09:11:49.000>
labels = ['3.7', 'type-bug', 'library']
title = 'distutils support for swig is under par'
updated_at = <Date 2021-02-03.18:19:35.326>
user = 'https://github.com/sjoerdmullender'

bugs.python.org fields:

activity = <Date 2021-02-03.18:19:35.326>
actor = 'steve.dower'
assignee = 'tarek'
closed = True
closed_date = <Date 2021-02-03.18:19:35.326>
closer = 'steve.dower'
components = ['Distutils']
creation = <Date 2004-08-26.09:11:49.000>
creator = 'sjoerd'
dependencies = []
files = []
hgrepos = []
issue_num = 1016626
keywords = []
message_count = 8.0
messages = ['60555', '60556', '60557', '60558', '60559', '60560', '81410', '386346']
nosy_count = 6.0
nosy_names = ['sjoerd', 'theller', 'tarek', 'akitada', 'Jeff.Laughlin', 'steve.dower']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue1016626'
versions = ['Python 3.1', 'Python 2.7', 'Python 3.2', 'Python 3.4', 'Python 3.5', 'Python 3.6', 'Python 3.7']

Activity

  1. sjoerdmullender commented on Aug 26, 2004

    @sjoerdmullender
    MemberAuthor

    To my delight there is support for swig built into
    distutils. However a few problems exist with the support.

    • there is no way to specify any extra flags to the
      swig command (I need -I/usr/include -DHAVE_LONG_LONG);
    • swig generates two files, the XXX_wrap.c file which
      is turned into a _XXX.so file, and a XXX.py file.
      distutils only deals with the XXX_wrap.c file.

    I have no suggested fix for these problems, but
    problems they are.

    (Python from CVS HEAD on Fedora Core 2).

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Aug 26, 2004
  3. sjoerdmullender commented on Oct 15, 2004

    @sjoerdmullender
    MemberAuthor

    Logged In: YES
    user_id=43607

    Part of the problem described here (the extra options that
    need to be given to swig) is solved by [ 1046644 ] improving
    distutils swig support (2). However, the other part is
    still a problem.

  4. sjoerdmullender commented on Oct 15, 2004

    @sjoerdmullender
    MemberAuthor

    Logged In: YES
    user_id=43607

    I just came up with a possible solution:

    In command/build.py change the order of the
    build.sub_commands list and put the entry for build_ext
    before build_py.

    The question is, does this cause a problem for anybody?

  5. theller commented on Oct 15, 2004

    @theller

    Logged In: YES
    user_id=11105

    Haven't read the original problem (I don't use swig myself),
    but if changing the order of the sub_commands list than it
    can as well be done in the setup script by installing a
    custom build command.

  6. sjoerdmullender commented on Oct 15, 2004

    @sjoerdmullender
    MemberAuthor

    Logged In: YES
    user_id=43607

    Hmm, you can't really call that "decent swig support" then,
    can you?
    If this "solution" were properly documented (in a place one
    would notice when trying to create a setup.py to do swig!)
    then it wouldn't be too much of a problem, but I wouldn't
    know where that would be.

    So, if my change doesn't cause any detrimental effects I'd
    much rather see it fixed that way.

  7. theller commented on Oct 15, 2004

    @theller

    Logged In: YES
    user_id=11105

    Hmm, you can't really call that "decent swig support"
    then, can you?

    Of course not ;-)

    And I have setup scripts myself which would be more happy
    with this change, anyway, because they need the extensions
    built with build_ext to generate python modules.

    So, personally, I'm +1 on this change (but what does this
    count).

  8. akitada commented on Feb 8, 2009

    akitadamannequin
    Mannequin

    Same with bpo-2624?

  9. self-assigned this
    on Feb 8, 2009
  10. self-assigned this
    on Feb 8, 2009
  11. zooba commented on Feb 3, 2021

    @zooba
    Member

    Distutils is now deprecated (see PEP-632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

    If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools

  12. transferred this issue fromon Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.7 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions