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

_sysconfigdata.py is installed in an arch-independent directory #62283

Closed
automatthias mannequin opened this issue May 28, 2013 · 3 comments
Closed

_sysconfigdata.py is installed in an arch-independent directory #62283

automatthias mannequin opened this issue May 28, 2013 · 3 comments

Comments

@automatthias
Copy link
Mannequin

automatthias mannequin commented May 28, 2013

BPO 18083
Nosy @doko42, @ncoghlan, @davidmalcolm
Dependencies
  • bpo-23968: rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)
  • Superseder
  • bpo-23968: rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)
  • 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 2021-10-20.10:27:14.597>
    created_at = <Date 2013-05-28.16:34:53.774>
    labels = ['expert-installation']
    title = '_sysconfigdata.py is installed in an arch-independent directory'
    updated_at = <Date 2021-10-20.10:27:14.597>
    user = 'https://bugs.python.org/automatthias'

    bugs.python.org fields:

    activity = <Date 2021-10-20.10:27:14.597>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-10-20.10:27:14.597>
    closer = 'iritkatriel'
    components = ['Installation']
    creation = <Date 2013-05-28.16:34:53.774>
    creator = 'automatthias'
    dependencies = ['23968']
    files = []
    hgrepos = []
    issue_num = 18083
    keywords = []
    message_count = 3.0
    messages = ['190225', '190256', '267351']
    nosy_count = 5.0
    nosy_names = ['doko', 'ncoghlan', 'Arfrever', 'dmalcolm', 'automatthias']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '23968'
    type = None
    url = 'https://bugs.python.org/issue18083'
    versions = ['Python 3.3']

    @automatthias
    Copy link
    Mannequin Author

    automatthias mannequin commented May 28, 2013

    _sysconfigdata.py is installed into ${prefix}/lib/pythonX.Y/_sysconfigdata.py which is an architecture-independent directory, as opposed to a path starting with e.g. ${libdir}, which is architecture-dependent. But _sysconfigdata.py contains architecture-dependent information, which breaks some installation, specifically Solaris multi-arch.

    A fix would be to move it to an architecture-dependent directory, but this probably requires some discussion.

    -----------------------------------------------------------------------

    Original question on the mailing list:
    http://mail.python.org/pipermail/python-list/2013-May/647197.html

    I'm looking into creating a 32/64-bit Python (2.x and/or 3.x) package
    for Solaris. The specificity of that package is that I need to include
    both 32-bit and 64-bit binaries in it. The exact way in which the
    32/64 support is done is described at [1].

    There currently is a Python package that I maintain, which is 32-bit only[2].

    I have made an attempt to build a 64-bit package, and my findings are
    that the ${prefix}/lib/pythonX.Y/_sysconfigdata.py file contains
    system-specific information. Note that it's not ${libdir}/pythonX.Y -
    that would have worked, because I'm specifying different ${libdir}
    directories when running the 32-bit and 64-bit builds. The Python
    installer specifically uses ${prefix}/lib/pythonX.Y. For the most part
    is fine, because most of files in there are not architecture-specific,
    and it would be quite good to share them among the 32-bit and 64-bit
    binaries at runtime. The problem is that some files differ. I've
    described it some more at [3].

    Ideally, I'd make _sysconfigdata.py return/set different values
    depending on the Python runtime that reads it. Something like:

    if we're 64-bit:
      set values for the 64-bit platform
    else:
      set values for the 32-bit platform

    It's a similar approach to how we currently handle C header files. See
    the 'Development packages' section in [1] for more information.

    The problem is that it would involve somewhat intrusive patching of
    the Python source code, and in long term that means maintainability
    issues.

    @doko42
    Copy link
    Member

    doko42 commented May 28, 2013

    Did Solaris adopt MultiArch? ;-P Nice!

    So what I did for the Debian and Ubuntu builds is:

    • to rename plat-linux to plat-<multiarch-tuple>
      (or plat-<gnu triplet>)

    • and install it there.

    Note that IN.py is another architecture dependent file which differs at least on several linux architectures.

    @ncoghlan
    Copy link
    Contributor

    ncoghlan commented Jun 5, 2016

    bpo-23968 moves _sysconfigdata.py to an arch dependent directory

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants