ronaldoussoren / py2app

py2app is a Python setuptools command which will allow you to make standalone Mac OS X application bundles and plugins from Python scripts.
Other
349 stars 35 forks source link

Why Mac OS X is launching the previous version of my application compilated with Py2App? #458

Open gauthierbuttez opened 2 years ago

gauthierbuttez commented 2 years ago

ENVIRONMENT:

Mac OS X Catalina 10.15

Python 3.10

Something very weird is going on!

I am developing a software for Mac OS X with Python.

I am freezing my code with Py2App which produce MySoftware.app

For testing, I launch my app with the command :

open /Applications/MySoftware.app/Contents/MacOS/MySoftware

Which display its version number. For example 0.003

Then, I made some changes, and update the version number displayed by the application. For example 0.004

I recompile the code and get a new application MySoftware.app

I stored the different versions in a folder "DISTRIBUTIONS" which contains 2 folders for my 2 versions:

DISTRIBUTIONS/dist_MAC_003
DISTRIBUTIONS/dist_MAC_004

Here is the weird stuff happening:

If I just freshly compilated with Py2app the 004 version, it displays 004 version when I execute the 004. But it displays 004 version also when I execute the 003. It supposes to display 003. So I recompilated the 003 version with Py2app, and when I execute the 003, it display 003. It is fine. But when then I execute the 004, it displays 003!!!

So I cleared cache with these commands:

rm -rf ~/Library/Caches/
rm -rf /Library/Caches/
rm -rf /System/Library/Caches

It didn't change anything.

I restarted my MAC, and same issue.

It seems that the compilation done with Py2App (with Pycharm Terminal) is saying to Mac OS X which program to run! It is very weird. Anyone has any idea about this kind of issue?