pythonqt-creatorpyside6

Add a python package to a PySide6 QtCreator project by .whl file


I have a custom python package that I created it is stored inside a .whl file and I would like to use it in my PySide6 QtCreator project; this package is only useful to me and I don't want to gum up PyPi with things that nobody else will ever use. I would like use this package in my project, but I don't know how to include my package in the project, or even install the package to the venv. My project will depend on the package, and I would also like it to be distributed with the qt project whenever I share the code with anyone else. What is the recommended/default way to do this or is there even a recommended way to do this in the first place?

Update: is it possible to commit the whl file to the repository and then include it in the requirements file? If so it will work decently well with QtCreator.


Solution

  • I looked into it, and it turns out that I can commit my .whl file to the repository, and then add it to the requirements.txt file. After this I click the Build button

    picture of the build button (it looks like a hammer)

    and the .whl file will automatically be installed and used in the pyside project from now on. The .whl file doesn't appear in the file browser for QtCreator, but if I use the terminal, I can add it to the repo. I can't install it using pip in the terminal, because the terminal can't access the venv, that is why I have to use the build button.