niess / python-appimage

AppImage distributions of Python
https://python-appimage.readthedocs.io/en/latest/
GNU General Public License v3.0
170 stars 24 forks source link

in-tree-build raising exception with app build #40

Closed mrf345 closed 2 years ago

mrf345 commented 2 years ago

Hello, While trying python-appimage build app appdir/ --python-version 3.7 I got an exception, my pip version is 20.0.2

Exception

Traceback (most recent call last):
  File "/home/mrf3/Projects/FQM/.venv/bin/python-appimage", line 8, in <module>
    sys.exit(main())
  File "/home/mrf3/Projects/FQM/.venv/lib/python3.8/site-packages/python_appimage/__main__.py", line 105, in main
    command.execute(*command._unpack_args(args))
  File "/home/mrf3/Projects/FQM/.venv/lib/python3.8/site-packages/python_appimage/commands/build/app.py", line 248, in execute
    system(('./AppDir/AppRun', '-m', 'pip', 'install', '-U', in_tree_build,
  File "/home/mrf3/Projects/FQM/.venv/lib/python3.8/site-packages/python_appimage/utils/system.py", line 42, in system
    raise RuntimeError(err)
RuntimeError: DEPRECATION: In-tree builds are now the default. pip 22.1 will enforce this behaviour change. A possible replacement is to remove the --use-feature=in-tree-build flag.


Thanks so much for the awesome package!

niess commented 2 years ago

@mrf345 in-tree-build seems to be the default now for the pip version shipped with the AppImages. I.e. the experimental flag --use-feature=in-tree-build is no more needed. Therefore I changed the behaviour of your no-tree-build flag to in-tree-build flag. It forces using in-tree-build for older versions of pip, that support it as an experimental feature.

In practice, it means that you should not need any specific in-tree-build related flag now. Expect if you want to disable in-tree-builds? In which case I would need to add the corresponding pip flag. Which I don't yet know?

mrf345 commented 2 years ago

@niess your change makes perfect sense. Not sure if there's a flag to do that or if it will ever be needed. Thanks for the heads-up!