Skip to content
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

Build system fixes #87

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Xiretza
Copy link

@Xiretza Xiretza commented Jun 4, 2022

While packaging fasm for the AUR, I came across a bunch of problems that I hope I'll be able to fix upstream here so others can benefit from the fixes too. These changes shouldn't change anything about the "intended" build workflow, but allow distro packages to build the package according to packaging standards.

Signed-off-by: Xiretza <xiretza@xiretza.xyz>
Signed-off-by: Xiretza <xiretza@xiretza.xyz>
This fixes builds with `setup.py develop`/`pip install -e`.

build_ext.run() unsets build_ext.inplace before running
build_extension(), and only restores it before calling
copy_extensions_to_source(). Because the cmake extension has to know the
real install directory in build_extension(), we need to compute it
before calling build_ext.run() and then retrieve it in build_extension().

Signed-off-by: Xiretza <xiretza@xiretza.xyz>
super().run() already builds all the extensions

Signed-off-by: Xiretza <xiretza@xiretza.xyz>
Signed-off-by: Xiretza <xiretza@xiretza.xyz>
With external (distro) gtest, this avoids an error along the lines of
"DSO missing from command line".

Signed-off-by: Xiretza <xiretza@xiretza.xyz>
@Xiretza
Copy link
Author

Xiretza commented Jun 11, 2022

I believe I have tamed the setuptools monster. I have to say this whole "embedding cmake in setup.py" approach is quite cursed.

@jleightcap
Copy link

Ah, I'm packaging this in nixpkgs and was slowly re-inventing the work you had done here. I'll just point at your branch since this hasn't received any feedback...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants