-
Notifications
You must be signed in to change notification settings - Fork 12
Development environment change #11
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
base: master
Are you sure you want to change the base?
Conversation
Just to get it right, basically your PR adds support for building e.g. LUI against a Panda3D version which was locally built and not installed on your system? |
@tobspr yes exactly. However, you'll notice that there are more changes. This is because I didn't realize that some of my files got blown away before I forked and pushed them. I did my original editing and testing from within panda_LUI. the I'm working on redoing them. The discussion of why this is really important is under the panda3d issues list. There is also a PR pending there ( that is indirectly related to this ) and has to do with python virtualenv development that may depend on modules that conflict with one another and thus should never be installed into the system libraries. A short tl;dr on it is basically that macos gets really messed up if you replace the system python. Most python developers will therefore use homebrew to install open source tools, python included, into a non-system location (usually /usr/local with the framework in /user/local/Frameworks/). The default panda builds and installs place the headers and includes into either the system /Library or user ~/Library paths. This is ok as far as it goes, being a stable build. When working with modules, especially custom modules, however one must keep various projects in mind. An unstable .dylib or .so in a system path can break everything system-wide. Thus most python developers use a virtualenv where any given project is actually linking panda from ~/.virtualenvs/<project_name>/lib/python/site-packages/panda3d . This location does not, however, contain non-wheel dynamic libraries or includes/headers. Thus using |
based control of error handling
merged commits from master and tested. |
I am a bit unhappy with this PR since it has so many changes which are unrelated (For example the logging). This makes it hard to track what it actually does .. |
Yes, the changes are also helpful on windows. Specifically in these situations:
Wheel installations (virtual environments) are extensively used by python developers due to the need to develop against specific module versions. Each virtual environment depends on a very explicit install of modules (usually) and this is doubly true for people developing third-party modules with c/c++ extensions. As to the logging, check it out now. I added a couple of custom handlers that should make things appear identical to before, but retaining the functionality of modular logging and redirection (a best-practices for all python modules). The log formatter isn't required, it's just makes python developers very unhappy when support modules call the print function directly. The logger supports INFO (default) VERBOSE (custom) ERROR and WARN loglevels as well as log redirection by level to files. |
Examples:No express loglevel
Clean build, debugging enabled:
Notice that the logging format is set to output the module name along with messages. It can also be configured to output timestamps and other information. |
That is right, but wheel builds are not generally supported since they do not include the panda3d headers. So building against a wheel build is not possible, until wheel builds which also include the headers are available.
The libraries and headers will be found on windows, since you run it via the python provided by the panda3d sdk, which is installed at the same location. Or do I misunderstand that?
I am not sure what you mean here. If panda does not have the required features (e.g. freetype, eigen) then you also can't link against it.
I am also not sure what you mean here. Could you explain? I am not against the logging, I am just saying that it messes up the PR so that its hard to track the actual changes. |
This pull request is in keeping with the overall virtual environment/multiple sources requirements of heavy development.
When working with panda3d and modules developers may need or wish to try out features within a python virtual environment.
They may recompile panda from source (as I do) with new flags and then wish to have those dynamic libraries available within a virtual environment rather than a system library.
This change merely adds allowance for building (not installing) against a panda source/build location.
In my test code, I have the envvar
LOCAL_PANDA_BUILD=~/src/panda3d/built
Tested with panda_LUI on Mac OSX. In this source base, the variable must come in as
-DLOCAL_PANDA_BUILD:STRING=<value of envvar>