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

Missing dependency in distutils build #49493

Closed
do3cc mannequin opened this issue Feb 13, 2009 · 14 comments
Closed

Missing dependency in distutils build #49493

do3cc mannequin opened this issue Feb 13, 2009 · 14 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@do3cc
Copy link
Mannequin

do3cc mannequin commented Feb 13, 2009

BPO 5243
Nosy @ncoghlan, @tarekziade, @merwok, @zooba, @dstufft, @tonybaloney
Files
  • dependency.patch: A Patch to fix the bug
  • test_install_lib.py: a rudimentary test case
  • test_install_lib.py
  • 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/merwok'
    closed_at = <Date 2021-02-03.18:11:00.096>
    created_at = <Date 2009-02-13.09:57:07.693>
    labels = ['type-bug', 'library']
    title = 'Missing dependency in distutils build'
    updated_at = <Date 2021-02-03.18:11:00.095>
    user = 'https://bugs.python.org/do3cc'

    bugs.python.org fields:

    activity = <Date 2021-02-03.18:11:00.095>
    actor = 'steve.dower'
    assignee = 'eric.araujo'
    closed = True
    closed_date = <Date 2021-02-03.18:11:00.096>
    closer = 'steve.dower'
    components = ['Distutils']
    creation = <Date 2009-02-13.09:57:07.693>
    creator = 'do3cc'
    dependencies = []
    files = ['13064', '13103', '13159']
    hgrepos = []
    issue_num = 5243
    keywords = ['patch']
    message_count = 14.0
    messages = ['81892', '81894', '82187', '82189', '82637', '94078', '94614', '115784', '128497', '128510', '138117', '138205', '341576', '386291']
    nosy_count = 8.0
    nosy_names = ['ncoghlan', 'tarek', 'eric.araujo', 'do3cc', 'alexis', 'steve.dower', 'dstufft', 'anthonypjshaw']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue5243'
    versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

    @do3cc
    Copy link
    Mannequin Author

    do3cc mannequin commented Feb 13, 2009

    When running the command install_lib, the command build_clib is not run.
    If a package contains clibs they can be dependencies for extension libs,
    at least that is stated in the module docstring of build_clib.

    In real life you can see it when trying to run the command install_lib
    on the current reportlab2.3.

    The patch provided needs do be applied in the distutils dir directly with

    patch install_lib.py dependency.patch

    As requested, I asked on the mailing list first, whether this really is
    a bug.
    http://mail.python.org/pipermail/distutils-sig/2009-February/010974.html

    I am half finished writing a test case, that I'll append to this ticket
    later.

    @do3cc do3cc mannequin added the stdlib Python modules in the Lib dir label Feb 13, 2009
    @do3cc do3cc mannequin assigned tarekziade Feb 13, 2009
    @do3cc do3cc mannequin added the type-bug An unexpected behavior, bug, or error label Feb 13, 2009
    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Feb 13, 2009

    be careful to write your test in distutils (setuptools is not part of
    Python)

    @do3cc
    Copy link
    Mannequin Author

    do3cc mannequin commented Feb 15, 2009

    The attached test works breaks without the patch and passes with the patch.

    I am not sure whether the test itself is written following best practice.
    I would be more than happy for a review, with hints what should be done
    better.

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Feb 16, 2009

    The patch looks good.

    Minor tweaks :

    • sys.path should be set to its initial state after the test
      (setUp/tearDown might be helpfull here)

    • ensure_finalized() should be called right before run()
      so it acts like the real call

    @do3cc
    Copy link
    Mannequin Author

    do3cc mannequin commented Feb 23, 2009

    Thank you, tarek

    The sys.path should have been obvious.

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Oct 15, 2009

    It looks like there's a missing part in the patch: get_outputs(), and
    get_inputs() should also return files created in build()

    Now something I don't understand is how reportlab distribution is doing
    to copy the compiled extensions when "install" is called.

    Could you point me please to the package so I can test that ?

    Thanks !

    @do3cc
    Copy link
    Mannequin Author

    do3cc mannequin commented Oct 28, 2009

    Hi Tarek,

    I think clib stuff is installed in the right python directory and the
    ext install step then just finds them.

    To reproduce the issue, run
    the "old" easy_install in a virtualenv.
    easy_install ReportLab
    It will then fail because of the missing library.

    I can also show it during Plone Conference, just look for me in irc.

    Thanks,

      Patrick
    

    @merwok merwok removed the stdlib Python modules in the Lib dir label Apr 20, 2010
    @merwok merwok added the stdlib Python modules in the Lib dir label Sep 7, 2010
    @merwok
    Copy link
    Member

    merwok commented Sep 7, 2010

    Adding back distutils1. This is a bug, not a feature.

    @alexis
    Copy link
    Mannequin

    alexis mannequin commented Feb 13, 2011

    Has the patch been applied on distutils(1/2) ?

    @merwok
    Copy link
    Member

    merwok commented Feb 13, 2011

    If we haven’t closed it, it’s because it has not been.

    @merwok
    Copy link
    Member

    merwok commented Jun 10, 2011

    > Now something I don't understand is how reportlab distribution is doing
    > to copy the compiled extensions when "install" is called.
    I think clib stuff is installed in the right python directory and the
    ext install step then just finds them.
    Yep, the install* commands just copy all files from the build dir to the install dir.

    The patch is straightforward and the test looks good. However, I worry about backward compatibility. For projects without C libs, this won’t change anything; for projects already having a workaround, what will happen? While this is clearly a bug, I’m not sure fixing the existing behavior is okay in distutils.

    For packaging (distutils2), I will commit this shortly.

    @merwok
    Copy link
    Member

    merwok commented Jun 12, 2011

    for projects already having a workaround, what will happen?
    I think I have the answer to my question: if build_clib is called twice, the registry in Distribution will know that it has run and won’t run it again. I’ll test manually and if I confirm, I will commit this change.

    @merwok merwok assigned merwok and unassigned tarekziade Jun 12, 2011
    @tonybaloney
    Copy link
    Mannequin

    tonybaloney mannequin commented May 6, 2019

    This issue has been open for some time, looking at the install_lib in master, there have been no changes to call 'build_clib' so the issue documented here would still apply.

    @zooba
    Copy link
    Member

    zooba commented Feb 3, 2021

    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

    @zooba zooba closed this as completed Feb 3, 2021
    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants