-
Notifications
You must be signed in to change notification settings - Fork 36
Env vars for build paths #172
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
NixOS: @Sigmanificient @WeetHet @natsukium @3demax CommaAI: @maxime-desroches @incognitojam Instead of patching build.py you should now be able to set these variables before running it, then pkg-config won't be used at all. (Unless you want to use pkg-config, in which you can call it yourself, and put the output into these vars.) |
I don't see any issue In using pkg-config. If you would like to help us in building this library in nixpkgs you are better off applying our patch here, in upstream since it should not break other builds anyways and is overall more correct |
Repeating what I already said in the issue #169
|
And what I said on the Physac PR:
|
Considering this, I think it would be fine to just leave the patch in place as is. Nixpkgs does patching like that all the time.
We are doing the same thing as we do with a lot of other packages by devendoring system libraries. In this case we are lucky that the build process was already well designed for us enough that only such a small patch was required to do so
What would you prefer we put as the resulting package version? I'm ready to make a PR for that if you think claiming 5.5.0.2 is incorrect |
Couldn't we extend https://github.com/3demax/raylib-python-cffi/pull/1/files by having module_name resolution in env variable to not break on other system? Sorry, I arrived a bit late to the discussion 😅 def get_the_include_path(libname):
return subprocess.run([
'pkg-config',
'--variable=includedir',
os.environ.get("PKG_CONFIG_LIB_" + libname, 'raylib'),
text=True,
stdout=subprocess.PIPE).stdout.strip()
]) |
Environment variables you can set before build
RAYLIB_PLATFORM: Any one of: Desktop, SDL, DRM, PLATFORM_COMMA
RAYLIB_LINK_ARGS: Arguments to pass to the linker rather than getting them from pkg-config.
e.g.: -L/usr/local/lib -lraylib
RAYLIB_INCLUDE_PATH: Directory to find raylib.h rather than getting from pkg-config.
e.g.: /usr/local/include
RAYGUI_INCLUDE_PATH: Directory to find raygui.h
e.g.: /usr/local/include
GLFW_INCLUDE_PATH: Directory to find glfw3.h
e.g.: /usr/local/include/GLFW
PHYSAC_INCLUDE_PATH: Directory to find physac.h
e.g.: /usr/local/include
LIBFFI_INCLUDE_PATH:
e.g.: /usr/local/include