setup.py and/or project.toml missing when performing Acquire portable creation
Following the deployment guide for Acquire here I have had a few issues that I was able to work around. However, when performing the final build step I am met with the following error:
`Using pip 22.3.1 from /home/user/.cache/pyoxidizer/python_distributions/python.ddf27f962f0a/python/install/lib/python3.10/site-packages/pip (python 3.10) ERROR: Directory '/home/user/.local/lib/python3.10/site-packages/dissect/target' is not installable. Neither 'setup.py' nor 'pyproject.toml' found. error[PYOXIDIZER_PYTHON_EXECUTABLE]: calling pip install
Caused by:
error running pip
--> ./pyoxidizer.bzl:241:30
|
241 | exe.add_python_resources(exe.pip_install(["/home/user/.local/lib/python3.10/site-packages/dissect/target", "acquire"]))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PythonExecutable.pip_install()
error: calling pip install`
I have tried using pip install dissect -t ~/customdir/ among other options but through all the research I have done up to this point I believe there needs to be one or both of these files. Unfortunately, I am not experienced enough with Python development to say for sure. Searching for alternative guides on deploying portable acquire have not returned any useful results either at this time.
In this case, you are trying to use pip to install something that is already installed in your site packages. Aka something that was already installed by pip. So it errors because the file(s) that tells pip how to install it cannot be found.
In your case you want to use the sources already available in your environment. So exe.pip_install isn't what you want to use.
In this case you can use read_virtualenv to look for information inside the environment you want to install the sources from.
other than that, it is always a good idea to look at the documentation of pyoxidizer
Or, use the following PR which is still awaiting review which will replace the deployment guide once merged. It contains a ready-made PyOxidizer configuration and CI to build binaries: https://github.com/fox-it/acquire/pull/109