-
Notifications
You must be signed in to change notification settings - Fork 366
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
Include standard data libraries in Python package #1237
Include standard data libraries in Python package #1237
Conversation
Add in a conventience function to return the library to the 'libraries' folder.
…ta building is not used.
@jstone-lucasfilm , this is follow-up to your suggestion to allow std libs to be part of the Python package. Seems useful to |
Thanks for putting this proposal together, @kwokcb, and I think this is a great direction for the future. I wonder if we might ultimately want the data libraries to be included in all MaterialX Python builds, rather than making this optional? I'm interested in thoughts from other developers on this question, and we may want to discuss this at a future MaterialX TSC meeting. |
Hi @jstone-lucasfilm , The pros I see are:
Cons are: In all, I think the pros out-weigh the cons (especially 1-3) , so I vote we not have an option at first, and then if there are issues |
We had a chance to discuss packaging of data libraries with MaterialX Python at today's MaterialX TSC meeting, and the idea had consistent support from the members of the TSC. Here are the full meeting notes for those who are interested: https://academysoftwarefdn.slack.com/archives/C0230LWBE2X/p1676403077275179 |
@kwokcb Taking this proposal forward, my sense is that we can safely remove the |
Simplify mxvalidate usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me, thanks @kwokcb, and I'll merge the feature so that it's included in the upcoming MaterialX 1.38.7.
Since the addition of #1237, we now create a python folder, with a copy of the stdlibs, even if we're not building python. This is at best redundant, and in my particular case, caused a problem in a downstream build script.
…ndation#1237) Package the standard definition libraries as part of the Python package. This removes the need for users to have to always search for the libraries, and the possibility to mistakenly use libraries which do not match the Python distribution.
…undation#1437) Since the addition of AcademySoftwareFoundation#1237, we now create a python folder, with a copy of the stdlibs, even if we're not building python. This is at best redundant, and in my particular case, caused a problem in a downstream build script.
Package the standard definition libraries as part of the Python package.
This removes the need for users to have to always search for the libraries, and the possibility to mistakenly use libraries which do not match the Python distribution.
MANIFEST.in
is included to add in thelibraries
folder ifsetuptools
is used instead ofdistutils.core
.getDefaultDataSearchPath()
will provide a default search path to find libraries.getDefaultDataLibraryFolders()
will return a list containing data library folder names.mxvalidate.py
script has been update use the new API withloadLibraries()
. The simplest usage would bethis one-liner: