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

many distutils tests fail when run from the installed location #61952

Closed
doko42 opened this issue Apr 16, 2013 · 10 comments
Closed

many distutils tests fail when run from the installed location #61952

doko42 opened this issue Apr 16, 2013 · 10 comments
Labels
tests Tests in the Lib/test dir

Comments

@doko42
Copy link
Member

doko42 commented Apr 16, 2013

BPO 17752
Nosy @Yhg1s, @doko42, @ronaldoussoren, @ned-deily, @merwok, @hynek
Files
  • issue17752.diff
  • 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 = None
    closed_at = <Date 2014-05-07.21:51:18.035>
    created_at = <Date 2013-04-16.10:49:34.775>
    labels = ['tests']
    title = 'many distutils tests fail when run from the installed location'
    updated_at = <Date 2014-05-07.21:51:18.033>
    user = 'https://github.com/doko42'

    bugs.python.org fields:

    activity = <Date 2014-05-07.21:51:18.033>
    actor = 'doko'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-05-07.21:51:18.035>
    closer = 'doko'
    components = ['Tests']
    creation = <Date 2013-04-16.10:49:34.775>
    creator = 'doko'
    dependencies = []
    files = ['35164']
    hgrepos = []
    issue_num = 17752
    keywords = ['patch']
    message_count = 10.0
    messages = ['187068', '216514', '216552', '216618', '218026', '218031', '218034', '218048', '218067', '218083']
    nosy_count = 7.0
    nosy_names = ['twouters', 'doko', 'ronaldoussoren', 'ned.deily', 'eric.araujo', 'python-dev', 'hynek']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue17752'
    versions = ['Python 2.7']

    @doko42
    Copy link
    Member Author

    doko42 commented Apr 16, 2013

    many distutils tests fail when run from the installed location, either depending on the 'srcdir' macro, files not installed ('xxmodule.c'), or needing write permissions in the installed location.

    @doko42 doko42 added the tests Tests in the Lib/test dir label Apr 16, 2013
    @Yhg1s
    Copy link
    Member

    Yhg1s commented Apr 16, 2014

    Matthias, I think this is already fixed for Python 3.3 and later (at least.) There may still be problems in 2.7, but I'm not sure if it's worth fixing them there. Can you see if you still have problems, and if so, show us how to reproduce them? (Is it just 'python -m test.regrtest'? Is it just test_distutils or also other tests?)

    @doko42
    Copy link
    Member Author

    doko42 commented Apr 16, 2014

    three are still failing with 3.4:

    cc-4.9.real: error: /tmp/tmpdjxmlia5/xx.cpython-34m.so: No such file or directory
    gcc-4.9.real: error: /tmp/tmp4zpi6ktg/foo.cpython-34m.so: No such file or directory
    gcc-4.9.real: error: build/lib.linux-x86_64-3.4/xx.cpython-34m.so: No such file or directory
    test test_distutils failed -- multiple errors occurred; run in verbose mode for details
    1 test failed:
    test_distutils

    test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase)
    test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase)
    test_record_extensions (distutils.tests.test_install.InstallTestCase)

    The reason here is that the xx module is not found (where should it be installed in the installed testsuite?).

    @merwok
    Copy link
    Member

    merwok commented Apr 16, 2014

    The xx module is built by the unit tests IIRC.

    @doko42
    Copy link
    Member Author

    doko42 commented May 6, 2014

    so the issue here is that -L -o <file> is passed to the compiler, and -o is interpreted as the library dir, and <file> as an input file.

    To robustify, change distutils/tests/support.py to not include empty directory names.

    To fix, change configure.ac (RUNPATH) not to unconditionally end the environment variables with an empty directory.

    adding Ronald, Darwin is the only platform having quotes around this. Is this really needed/wanted?

    @ned-deily
    Copy link
    Member

    The quotes that you removed around the DYLD_FRAMEWORK_PATH step are not needed, at least until the rest of configure.ac and Makefile.pre.in support paths with spaces et al. However, you missed removing the single quotes around the DYLD_LIBRARY_PATH step here:

    RUNSHARED='DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}'

    Otherwise, the patch LGTM; I tested it with --enable-framework and --enable-shared configs on OS X.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 7, 2014

    New changeset faef1da30c6d by doko in branch '2.7':

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 7, 2014

    New changeset 7d1929cc08dd by doko in branch '3.3':

    New changeset 01e933cb1de9 by doko in branch '3.4':

    New changeset c0bcf1383d77 by doko in branch 'default':

    @merwok
    Copy link
    Member

    merwok commented May 7, 2014

    For future fixes, please note that 3.3 is in security mode.

    Can this issue be closed?

    @doko42
    Copy link
    Member Author

    doko42 commented May 7, 2014

    yes, noted myself (too late), and informed Georg about it. Closing for now.

    @doko42 doko42 closed this as completed May 7, 2014
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants