8000 Python Wheel includes PYC files and should not · Issue #913 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content
  • Insights
  • Python Wheel includes PYC files and should not #913
    @jkugler

    Description

    @jkugler

    We are trying to use the tool virtualenv-tools to build a deployable packages.

    We are creating our virtualenv with Python 3.11 and when virtualenv-tools tries to unmarshal the PYC files, it of course fails, because the bytecode does not match.

    According to the wheel spec (https://packaging.python.org/en/latest/specifications/binary-distribution-format/)

    Wheel, being an installation format that is intended to work across multiple versions of Python, does not generally include .pyc files.

    and

    Wheel archives do not need to include .pyc and are less tied to a specific Python version or implementation.

    So, while including PYCs is not explicitly prohibited, it is apparently not best practice nor recommended. According to the maintainer of virtualenv-tools, apparently it is wrong. :) See: Yelp/virtualenv-tools#29

    Could we get another wheel without the PYC files? I would be happy to submit a PR, but this appears to be a build issue, and the repo doesn't contain that information.

    Thanks!

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      No labels
      No labels

      Type

      No type

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        0