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

freeze.py fails to work. #76398

Closed
AraHaan mannequin opened this issue Dec 5, 2017 · 10 comments
Closed

freeze.py fails to work. #76398

AraHaan mannequin opened this issue Dec 5, 2017 · 10 comments
Labels

Comments

@AraHaan
Copy link
Mannequin

AraHaan mannequin commented Dec 5, 2017

BPO 32217
Nosy @pfmoore, @tjguk, @bitdancer, @zware, @zooba, @AraHaan, @csabella, @miss-islington
PRs
  • bpo-32217: Fixed freeze.py for Windows. #4719
  • [3.7] bpo-32217: Correct usage of ABI tags in freeze. (GH-4719) #12516
  • 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 2019-03-23.16:50:54.880>
    created_at = <Date 2017-12-05.02:15:01.820>
    labels = ['3.7', '3.8', 'OS-windows']
    title = 'freeze.py fails to work.'
    updated_at = <Date 2019-03-23.16:51:37.001>
    user = 'https://github.com/AraHaan'

    bugs.python.org fields:

    activity = <Date 2019-03-23.16:51:37.001>
    actor = 'cheryl.sabella'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-03-23.16:50:54.880>
    closer = 'cheryl.sabella'
    components = ['Demos and Tools', 'Windows']
    creation = <Date 2017-12-05.02:15:01.820>
    creator = 'Decorater'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32217
    keywords = ['patch']
    message_count = 10.0
    messages = ['307615', '307620', '307623', '307630', '307639', '307666', '307998', '338684', '338687', '338688']
    nosy_count = 8.0
    nosy_names = ['paul.moore', 'tim.golden', 'r.david.murray', 'zach.ware', 'steve.dower', 'Decorater', 'cheryl.sabella', 'miss-islington']
    pr_nums = ['4719', '12516']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue32217'
    versions = ['Python 3.7', 'Python 3.8']

    @AraHaan
    Copy link
    Mannequin Author

    AraHaan mannequin commented Dec 5, 2017

    It seems on my system installed python 3.6.0 when invoking python 3.6.3's freeze.py it seems to fail with this traceback:

    python ..\externals\cpython\Tools\freeze\freeze.py pyeimport.py
    Traceback (most recent call last):
      File "..\externals\cpython\Tools\freeze\freeze.py", line 491, in <module>
        main()
      File "..\externals\cpython\Tools\freeze\freeze.py", line 220, in main
        flagged_version = version + sys.abiflags
    AttributeError: module 'sys' has no attribute 'abiflags'

    @AraHaan AraHaan mannequin added the OS-windows label Dec 5, 2017
    @bitdancer
    Copy link
    Member

    Does the 3.6.0 freeze fail under 3.6.0, or the 3.6.3 freeze fail under 3.6.3? If not, there's no bug to report.

    @AraHaan
    Copy link
    Mannequin Author

    AraHaan mannequin commented Dec 5, 2017

    It seems to also give the same traceback when using the build from the latest commit on branch 3.6 as well as 3.6.0 when using the freeze.py from the clone as well (The way I tested it was manually patching the binaries in my my 3.6 install).

    @AraHaan
    Copy link
    Mannequin Author

    AraHaan mannequin commented Dec 5, 2017

    Seems that freeze.py was not updated since 3.6.0b2 and also fails like this in master as well. (specifically commit 10108a7) was last edit to the file in both the 3.6 and the master branch.

    Could it be that sys.abiflags was removed from the sys module and so freeze stopped working due to that?

    @AraHaan AraHaan mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life labels Dec 5, 2017
    @AraHaan
    Copy link
    Mannequin Author

    AraHaan mannequin commented Dec 5, 2017

    I have found an temporary fix for now after reading that abiflags is posix only.

    @AraHaan
    Copy link
    Mannequin Author

    AraHaan mannequin commented Dec 5, 2017

    python ..\externals\cpython\Tools\freeze\freeze.py pyeimport.py
    Error: needed directory E:\python360\lib\python3.6\config-3.6 not found
    Use ``..\externals\cpython\Tools\freeze\freeze.py -h'' for help

    Seems like freeze works now with no traceback. However on Windows I need to figure out how to make it actually work without make install because lack of make install on Windows.

    🤔 how can it know on Windows what the config to python could be?

    @AraHaan
    Copy link
    Mannequin Author

    AraHaan mannequin commented Dec 10, 2017

    After thinking about this, maybe a better aproach is to somehow make freeze when used on windows somehow read pyconfig.h

    @csabella
    Copy link
    Contributor

    New changeset a7987e7 by Cheryl Sabella (AraHaan) in branch 'master':
    bpo-32217: Correct usage of ABI tags in freeze. (GH-4719)
    a7987e7

    @miss-islington
    Copy link
    Contributor

    New changeset d93de02 by Miss Islington (bot) in branch '3.7':
    bpo-32217: Correct usage of ABI tags in freeze. (GH-4719)
    d93de02

    @csabella
    Copy link
    Contributor

    Thank you @Decorater for the report and PR.

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

    No branches or pull requests

    3 participants