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

Misc/python-config.sh.in: ensure sed invocations only match beginning of strings #67096

Open
peko mannequin opened this issue Nov 20, 2014 · 2 comments
Open

Misc/python-config.sh.in: ensure sed invocations only match beginning of strings #67096

peko mannequin opened this issue Nov 20, 2014 · 2 comments
Labels
build The build process and cross-build

Comments

@peko
Copy link
Mannequin

peko mannequin commented Nov 20, 2014

BPO 22907
Files
  • 0001-Misc-python-config.sh.in-ensure-sed-invocations-only.patch: patch fixing issue
  • 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 = None
    created_at = <Date 2014-11-20.13:00:52.944>
    labels = ['build']
    title = 'Misc/python-config.sh.in: ensure sed invocations only match beginning of strings'
    updated_at = <Date 2014-11-20.13:00:52.944>
    user = 'https://bugs.python.org/peko'

    bugs.python.org fields:

    activity = <Date 2014-11-20.13:00:52.944>
    actor = 'peko'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Cross-Build']
    creation = <Date 2014-11-20.13:00:52.944>
    creator = 'peko'
    dependencies = []
    files = ['37234']
    hgrepos = []
    issue_num = 22907
    keywords = ['patch']
    message_count = 1.0
    messages = ['231427']
    nosy_count = 1.0
    nosy_names = ['peko']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue22907'
    versions = ['Python 3.4']

    @peko
    Copy link
    Mannequin Author

    peko mannequin commented Nov 20, 2014

    The build/real prefix handling using sed breaks if build != real and the
    standard include / lib directories are used ($prefix/include and $prefix/lib).

    E.G.

    prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include".

    If this gets installed with make DESTDIR="/foo" install, then we end up with prefix_real = prefix = "/foo/usr" as expected, but
    includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because of the double sed invocation (prefix is already expanded). Work around it by ensuring we only match the beginning of the string.

    @peko peko mannequin added the build The build process and cross-build label Nov 20, 2014
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @vfazio
    Copy link
    Contributor

    vfazio commented Feb 13, 2024

    Is this already resolved via 14086cf?

    arnout pushed a commit to buildroot/buildroot that referenced this issue May 9, 2024
    Patches 0004 and 0009 relied upon environment variables that were used
    to drive custom logic in distutils when executed by an external Python
    interpreter. This issue should have been mostly addressed upstream [0],
    but even if that was not the case, distutils is no longer a supported
    installation method for packages to use for installation as of 09de823.
    As such, there shouldn't be a need to continue to patch it as setuptools
    vendors its own distutils that supercedes the one provided by Python.
    
    Patches 0010 and 0026 (see [1] [2] [3]) can be removed due to a fix
    introduced in 3.7 [4].
    
    Patch 0028 can be dropped since commit 3fed424 removed the dependency
    on a host provided python to build host-python3.
    
    [0] python/cpython@9731330
    [1]: python/cpython#67096
    [2]: python/cpython#75894
    [3]: python/cpython#66338
    [4]: python/cpython@14086cf
    
    Signed-off-by: Vincent Fazio <vfazio@gmail.com>
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant