tomoyanonymous / homebrew-flatcam

Unofficial homebrew formula to install flatcam(http://flatcam.org) on macOS
26 stars 8 forks source link

ArgumentError: virtualenv_create's without_pip is deprecated starting with Python 3.12 #24

Closed CONSULitAS closed 8 months ago

CONSULitAS commented 8 months ago

Both flatcam-beta and flatcam-evo (and I think flatcam will do the same) throw ArgumentError: virtualenv_create's without_pip is deprecated starting with Python 3.12

I guess this could be solved here:

https://github.com/tomoyanonymous/homebrew-flatcam/blob/adbcbd3b13964c4067df24a2e1a6ee489ce74e6c/flatcam-evo.rb#L18

by just changing the line to

virtualenv_create(libexec, "python3")

Any other ideas @tomoyanonymous?

Thanks in advance!

$ brew install flatcam-evo
==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Fetching tomoyanonymous/flatcam/flatcam-evo
==> Cloning https://bitbucket.org/marius_stanciu/flatcam_beta.git
Cloning into '/Users/hi345gr/Library/Caches/Homebrew/flatcam-evo--git'...
Updating files: 100% (1187/1187), done.
==> Checking out branch Beta_8.995
Already on 'Beta_8.995'
Your branch is up to date with 'origin/Beta_8.995'.
==> Installing flatcam-evo from tomoyanonymous/flatcam
Error: An exception occurred within a child process:
  ArgumentError: virtualenv_create's without_pip is deprecated starting with Python 3.12
tomoyanonymous commented 8 months ago

hmm, without_pip argument was just added on my last PR to install pip explicitly. https://github.com/tomoyanonymous/homebrew-flatcam/issues/21

But soon it became deprecated after python 3.12

https://github.com/Homebrew/brew/commit/b42256d28677ba1f3ebf43e685c964f69c0e9dbe#diff-c99565c0a4b657cb600a09b977ca98a92c7ce90d014628a4cec578a9e4e17b3bR146-R154

I will take a look more in this weekend.

tomoyanonymous commented 8 months ago

I just pinned dependent python version to 3.11

https://github.com/tomoyanonymous/homebrew-flatcam/commit/055468d025b7f7cd2addc93b4504657ad4508a94

Could you try brew reinstall flatcam-evo ?

This will not be work when the minimum dependent python version became newer than 3.12 but easy solution for now...

CONSULitAS commented 8 months ago

@tomoyanonymous

Thanks, seems to work (only after brew cleanup). Got a warning, but the app seems to work well.

brew reinstall flatcam-evo 
==> Fetching tomoyanonymous/flatcam/flatcam-evo
==> Cloning https://bitbucket.org/marius_stanciu/flatcam_beta.git
Updating /Users/hi345gr/Library/Caches/Homebrew/flatcam-evo--git
==> Checking out branch Beta_8.995
Already on 'Beta_8.995'
Your branch is up to date with 'origin/Beta_8.995'.
HEAD is now at d583bb8c - Film Plugin: fixed error on generation of positive film with punched holes due of the aperture of type "REG" (copper plane / region)
==> Reinstalling tomoyanonymous/flatcam/flatcam-evo 
==> python3.11 -m venv --system-site-packages /usr/local/Cellar/flatcam-evo/8.9.95/libexec
==> /usr/local/Cellar/flatcam-evo/8.9.95/libexec/bin/pip install -r requirements.txt
==> chmod +x /usr/local/Cellar/flatcam-evo/8.9.95/libexec/flatcam.py
==> chmod +x /usr/local/Cellar/flatcam-evo/8.9.95/bin/flatcam-evo
Warning: Could not fix ../../g_macosxi_64/opt_prod/lib/libmimerapi.dylib in /usr/local/Cellar/flatcam-evo/8.9.95/libexec/lib/python3.11/site-packages/PyQt6/Qt6/plugins/sqldrivers/libqsqlmimer.dylib
🍺  /usr/local/Cellar/flatcam-evo/8.9.95: 26,217 files, 919.3MB, built in 4 minutes 51 seconds
==> Running `brew cleanup flatcam-evo`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
kilometers commented 6 months ago

I'm curious, why did you not also pin the python version in flatcam.rb?

tomoyanonymous commented 6 months ago

no specific reason... Actually, I have been not tested a build consistency of vanilla flatcam recently. There is no reason to persist with leaving flatcam because there is no degradation in Beta or Evo version from vanilla. However it is still officially official and original flatcam, I'm just keeping with it.