-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[question] pyinstaller to build an exe #14219
Comments
Hi @maitrey Thanks for your question. |
So my usecase is : I have a tool written in python, This tool is an application in the end distributed as an exe(consumer are different projects) for which we are using pyinstaller. To create the exe we like to use virtualenv and install the required pip packages. This is because so that all developers when making changes to the application use the exact same set of pip packages. We are using pyinstaller with --onefile . Our idea is to create an exe and make a conan package and consume it in projects. Are we wrong with our approach? |
But is it your application calling Conan under the hood, via the API or something? Or users will be calling Conan? If you are creating an exe of another tool, lets call it "mytool", you have just one The part of you creating a |
mytool will be build by calling : conan build . --user autosar --channel featurebringup . Yes i create a python application mytool.exe and consumers of mytool.exe are projects that call this application at build time. |
Ok, now I understand a bit better the flow. But the main problem would be creating and managing the virtualenv on the fly, if you can do it safely, then I don't see a strong reason against it. Note: there is some work, for 2.X roadmap to try to help in the creation of virtualenvs for Conan packages, maybe you want to have a look: #11601 |
Ah ok. I am exactly doing the way that you already mentioned, calling this in build() method:
However the requirements are getting installed not in the virtual environment but in the Python installation directory. |
I don't know enough about how it works, but I think it is not enough to launch scripts in the |
Hi @memsharded ,
And calling this script in the build method of the recipe:
This seems to work, many thanks! |
Sure, thanks for following up and the feedback! |
What is your question?
Dear Conan Folks,
My requirement is that I have a python tool that I need to build as installer. I would like to use virtualenv for it.
Is there a recommended approach that I could use?
I need to call the pyinstaller with --onefile buildspec
Could you please help me?
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: