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

New python buildsystem #96

Merged
merged 3 commits into from
Apr 22, 2019
Merged

Conversation

jokva
Copy link

@jokva jokva commented Apr 17, 2019

Replace the setuptools based build system with scikit-build [1].
Scikit-build is an upstream python-cmake integration package that
effectively enables building the extension code with cmake, rather than
setuptools.

The big problem with setuptools is developer experience, as it's pretty
clunky and behaves quite differently from what you would expect with a
more sophisticated build system for C++ code. By moving that
responsibility to cmake and having skbuild invoke it, the extension code
can use all of cmake for defines, compiler flags and even extension
specific dependencies, without having to manually do discovery logic and
configuration (essentially what cmake already does) in python.

The CI definitions have been updated to reflect the changes in
behaviour. There is a bug in the current upstream release 0.9.0 that
makes appveyor break, but a change [2] is proposed upstream. For now,
appveyor uses the jokva/scikit-build fork.

For cmake .. && make && make install users, this patch should have
little effect, but in all the new build system gives greater opportunity
to tune and configure the compilation of the python extension.

[1] https://scikit-build.readthedocs.io/en/latest
[2] scikit-build/scikit-build#400

Closes #46

@jokva jokva added the review label Apr 17, 2019
@jokva jokva force-pushed the new-python-buildsystem branch from 2512cbd to 46dbdc5 Compare April 21, 2019 17:20
jokva added 2 commits April 21, 2019 21:10
By having this path easily available to parts of the makefiles, which is
very useful useful for figuring out dlisio_DIR for build-time exports.
Export the build tree targets (dependencies, dlisio and
dlisio-extension).

The main motivation is that any language bindings driven by cmake can
discover and link against libraries in the build tree. This enables a
lot more comfortable development situation, and has little effect on
complexity of the makefiles.
@jokva jokva force-pushed the new-python-buildsystem branch 3 times, most recently from ef4eac6 to e5fd587 Compare April 22, 2019 10:07
Replace the setuptools based build system with scikit-build [1].
Scikit-build is an upstream python-cmake integration package that
effectively enables building the extension code with cmake, rather than
setuptools.

The big problem with setuptools is developer experience, as it's pretty
clunky and behaves quite differently from what you would expect with a
more sophisticated build system for C++ code. By moving that
responsibility to cmake and having skbuild invoke it, the extension code
can use all of cmake for defines, compiler flags and even extension
specific dependencies, without having to manually do discovery logic and
configuration (essentially what cmake already does) in python.

The CI definitions have been updated to reflect the changes in
behaviour. There is a bug in the current upstream release 0.9.0 that
makes appveyor break, but a change [2] is proposed upstream. For now,
appveyor uses the jokva/scikit-build fork.

For cmake .. && make && make install users, this patch should have
little effect, but in all the new build system gives greater opportunity
to tune and configure the compilation of the python extension.

[1] https://scikit-build.readthedocs.io/en/latest
[2] scikit-build/scikit-build#400
@jokva jokva force-pushed the new-python-buildsystem branch from e5fd587 to f17221f Compare April 22, 2019 10:10
@jokva jokva merged commit a129069 into equinor:master Apr 22, 2019
@jokva jokva deleted the new-python-buildsystem branch April 22, 2019 12:39
@jokva jokva removed the review label Apr 22, 2019
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.

Improve buildsystem for python extension
1 participant