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

0.12.0.0 - Expects version_info to always be defined #151

Closed
Athanasius opened this issue Sep 20, 2022 · 6 comments
Closed

0.12.0.0 - Expects version_info to always be defined #151

Athanasius opened this issue Sep 20, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@Athanasius
Copy link

Athanasius commented Sep 20, 2022

Before migrating EDMarketConnector over to the new freeze() API I decided to check if our old setup.py would work with 0.12.0.0.

It yields:

...
  File "C:\Users\Athan\Documents\Devel\EDMarketConnector\venv\lib\site-packages\py2exe\runtime.py", line 364, in build_exe
    if self.options.version_info:
AttributeError: 'Namespace' object has no attribute 'version_info'

As this is against our legacy setup.py, we only have version=.

https://github.com/py2exe/py2exe/blob/master/docs/migration.md implies that you only need to change to version_info when migrating to the new freeze() API. So, this would appear to be a breaking change.

@albertosottile
Copy link
Member

Yes, that was the assumption, but now I realized that I inadvertently killed the processing of the older attributes. it probably does not help that I stopped testing the setup.py interface in CI. I will prepare a patch release ASAP.

@albertosottile albertosottile added the bug Something isn't working label Sep 20, 2022
@Athanasius
Copy link
Author

Athanasius commented Sep 20, 2022

In fact I can't seem to find a way to specify this version_info that works:

  1. Put it inside the py2exe of options={...} -> error: error in setup script: command 'py2exe' has no such option 'version_info'.
  2. Put it in options={...}, but outside the py2exe dictionary ->
    ...\py2exe\runtime.py", line 364, in build_exe
        if self.options.version_info:
    AttributeError: 'Namespace' object has no attribute 'version_info'
    
  3. Pass version_info={...} in setup() call -> that same Namespace error.

Ah, I see you just replied above. I'll await the patch then :)

@albertosottile
Copy link
Member

To be clear, there will be no way to use version_info with setup. I just intend to restore the older behavior of setup for the time being, and then delete it with the rest of the setup code in the next major.

@albertosottile
Copy link
Member

Upon further inspection of the old code and of the previous builds of Syncplay (my reference software frozen with py2exe), it appears the version options were simply ignored before... Therefore, I will just patch the code to function as before (working with setup.py when no version attribute is specified).

@albertosottile
Copy link
Member

Fixed in 0.12.0.1. Thanks for having spotted this so quickly. Unfortunately, I had to drop tests for the deprecated API as I simply cannot afford to double the CI execution times. Let's hope this patch is enough to fix the old use cases and that we can now start moving forward to the new API.

@Athanasius
Copy link
Author

0.12.0.1 confirmed as working for EDMarketConnector's python setup.py py2exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants