quick build option?

27 views
Skip to first unread message

woodri...@gmail.com

unread,
Nov 20, 2017, 1:54:36 PM11/20/17
to scikit-build
Is there a way to "quick" build for development, i.e., don't run cmake, but do a make install from the build directory, assuming that it's done cmake once before?

A workflow like:
$ python setup.py build
$ cd _skbuild/cmake-install
$ ... do some testing ...
$ cd ../..
$ python setup.py --please-just-run-make-install-without-cmake build

The reason that I ask is that AFAIK, some files won't get copied unless I do python setup.py build. I tried going into _skbuild\cmake-build and doing the make install manually, but then it didn't copy some files correctly. For instance, I had an __init__.py in a testing directory that did not get refreshed correctly unless I did a full setup.py build. This is because build_py will copy the python files into setuptools\lib, but not into the _skbuild\cmake-install, which only seems to happen if you do a full build.

Jean-Christophe Fillion-Robin

unread,
Nov 20, 2017, 2:00:56 PM11/20/17
to woodri...@gmail.com, scikit-build
Hi Jon,

You could give the "--skip-cmake" option.

To better help you, would you be able to share a pointer to your project ?

Thanks
Jc




--
You received this message because you are subscribed to the Google Groups "scikit-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-build+unsubscribe@googlegroups.com.
To post to this group, send email to scikit...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scikit-build/8b98284d-ec51-4084-834f-0295f9d4b2d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

woodri...@gmail.com

unread,
Nov 20, 2017, 2:16:28 PM11/20/17
to scikit-build
It's not quite ready yet, so I'm unable to share it at the moment, but that seems to have worked.

I tried that before, but I didn't see the message about copying the __init__.py files, so I didn't think it was working correctly. That message does appears if you do the full build, but now I do see that the updated files did get correctly copied into _skbuild/cmake-install.

$ python setup.py build
$ cd _skbuild/cmake-build
$ make install
$ cd ../..
$ python setup.py --skip-cmake build

I'll double check again, but that workflow seems to be working for me. Thanks!

On Monday, November 20, 2017 at 12:00:56 PM UTC-7, Jean-Christophe Fillion-Robin wrote:
Hi Jon,

You could give the "--skip-cmake" option.

To better help you, would you be able to share a pointer to your project ?

Thanks
Jc



On Mon, Nov 20, 2017 at 1:54 PM, <woodri...@gmail.com> wrote:
Is there a way to "quick" build for development, i.e., don't run cmake, but do a make install from the build directory, assuming that it's done cmake once before?

A workflow like:
$ python setup.py build
$ cd _skbuild/cmake-install
$ ... do some testing ...
$ cd ../..
$ python setup.py --please-just-run-make-install-without-cmake build

The reason that I ask is that AFAIK, some files won't get copied unless I do python setup.py build. I tried going into _skbuild\cmake-build and doing the make install manually, but then it didn't copy some files correctly. For instance, I had an __init__.py in a testing directory that did not get refreshed correctly unless I did a full setup.py build. This is because build_py will copy the python files into setuptools\lib, but not into the _skbuild\cmake-install, which only seems to happen if you do a full build.

--
You received this message because you are subscribed to the Google Groups "scikit-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-build...@googlegroups.com.

To post to this group, send email to scikit...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scikit-build/8b98284d-ec51-4084-834f-0295f9d4b2d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jean-Christophe Fillion-Robin

unread,
Nov 20, 2017, 2:19:26 PM11/20/17
to woodri...@gmail.com, scikit-build
Hi Jon,

Glad it works for you.

As a side note, we will soon do a new release of scikit-build. It will includes the following changes:

http://scikit-build.readthedocs.io/en/latest/changes.html#next-release

as well as an improved support for macOS:

https://github.com/scikit-build/scikit-build/pull/259

Thanks
Jc

To unsubscribe from this group and stop receiving emails from it, send an email to scikit-build+unsubscribe@googlegroups.com.

To post to this group, send email to scikit...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

woodri...@gmail.com

unread,
Nov 20, 2017, 2:28:30 PM11/20/17
to scikit-build
Nope. I take that back, it didn't work.

The __init__.py did not get correctly copied. I went back and deleted the _skbuild directory and did this.

$ python setup.py build
... edit test_cmake/test/__init__.py ...

$ python setup.py --skip-cmake build
$ diff _skbuild/cmake-install/test_cmake/test/__init__.py test_cmake/test/__init__.py
... differences between the two ...

Jean-Christophe Fillion-Robin

unread,
Nov 20, 2017, 2:35:48 PM11/20/17
to woodri...@gmail.com, scikit-build
Hi Jon,

Are you able to reproduce the problem using this sample project (or a modified version):

https://github.com/scikit-build/scikit-build/tree/master/tests/samples/hello

Thanks
Jc



To unsubscribe from this group and stop receiving emails from it, send an email to scikit-build+unsubscribe@googlegroups.com.

To post to this group, send email to scikit...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

woodri...@gmail.com

unread,
Nov 20, 2017, 2:37:21 PM11/20/17
to scikit-build
This is what happens if I did make install from the cmake-build:
... stuff ...
-- Up-to-date: C:/Users/209118/msys2/home/209118/npcuda-example/_skbuild/cmake-install/include/vtkm-1.1/vtkm/io/reader/VTKUnstructuredGridReader.h
-- Up-to-date: C:/Users/209118/msys2/home/209118/npcuda-example/_skbuild/cmake-install/include/vtkm-1.1/vtkm/io/reader/VTKDataSetReader.h
-- Up-to-date: C:/Users/209118/msys2/home/209118/npcuda-example/_skbuild/cmake-install/include/vtkm-1.1/vtkm/io/writer/VTKDataSetWriter.h

This is what happens if I do a setup.py --skip-cmake build:
running build
running build_py
copied 2 files

This is what happens if I do a full setup.py build:
-- Up-to-date: C:/Users/209118/msys2/home/209118/npcuda-example/_skbuild/cmake-install/include/vtkm-1.1/vtkm/io/reader/VTKUnstructuredGridReader.h
-- Up-to-date: C:/Users/209118/msys2/home/209118/npcuda-example/_skbuild/cmake-install/include/vtkm-1.1/vtkm/io/reader/VTKDataSetReader.h
-- Up-to-date: C:/Users/209118/msys2/home/209118/npcuda-example/_skbuild/cmake-install/include/vtkm-1.1/vtkm/io/writer/VTKDataSetWriter.h

copying test_cmake\__init__.py -> _skbuild\cmake-install\test_cmake\__init__.py
copying test_cmake\test\__init__.py -> _skbuild\cmake-install\test_cmake\test\__init__.py

running build
running build_py
copying _skbuild\cmake-install\test_cmake\__init__.py -> _skbuild\setuptools\lib\test_cmake
copying _skbuild\cmake-install\test_cmake\test\__init__.py -> _skbuild\setuptools\lib\test_cmake\test
copied 2 files
running build_ext

The thing that is missing between the two is:

copying test_cmake\__init__.py -> _skbuild\cmake-install\test_cmake\__init__.py
copying test_cmake\test\__init__.py -> _skbuild\cmake-install\test_cmake\test\__init__.py

That does not happen if I tell it to skip cmake, and doing build_py doesn't copy them into the correct place.

woodri...@gmail.com

unread,
Nov 20, 2017, 2:49:39 PM11/20/17
to scikit-build
Yes.

$ python setup.py build
... edit bonjour/__init__.py

$ cd _skbuild/cmake-build
$ make install
$ cd ../..
$ python setup.py --skip-cmake build
$ diff _skbuild/cmake-install/bonjour/__init__.py bonjour/__init__.py
... differences ...

woodri...@gmail.com

unread,
Nov 20, 2017, 2:54:20 PM11/20/17
to scikit-build
Also, if it makes any difference, I am running on Windows with nmake (and jom as well). I see the same problem with both.

It seems that there is an extra step that is missing where the files get copied to the correct place at the end of cmake, but doesn't happen if you skip cmake.

I really want an option that builds given the current build directory in _skbuild, but don't run cmake again.

Jean-Christophe Fillion-Robin

unread,
Nov 21, 2017, 1:22:46 AM11/21/17
to woodri...@gmail.com, scikit-build
Hi Jon,

Thanks for the detailed feedback. This topic should address the issue you reported: https://github.com/scikit-build/scikit-build/pull/269

After adding tests, it will be integrated (most likely next week)

Thanks
Jc

--
You received this message because you are subscribed to the Google Groups "scikit-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-build+unsubscribe@googlegroups.com.

To post to this group, send email to scikit...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

woodri...@gmail.com

unread,
Nov 21, 2017, 11:27:25 AM11/21/17
to scikit-build
Thanks!


On Monday, November 20, 2017 at 11:22:46 PM UTC-7, Jean-Christophe Fillion-Robin wrote:
Hi Jon,

Thanks for the detailed feedback. This topic should address the issue you reported: https://github.com/scikit-build/scikit-build/pull/269

After adding tests, it will be integrated (most likely next week)

Thanks
Jc
On Mon, Nov 20, 2017 at 2:54 PM, <woodri...@gmail.com> wrote:
Also, if it makes any difference, I am running on Windows with nmake (and jom as well). I see the same problem with both.

It seems that there is an extra step that is missing where the files get copied to the correct place at the end of cmake, but doesn't happen if you skip cmake.

I really want an option that builds given the current build directory in _skbuild, but don't run cmake again.

--
You received this message because you are subscribed to the Google Groups "scikit-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-build...@googlegroups.com.

To post to this group, send email to scikit...@googlegroups.com.

Jean-Christophe Fillion-Robin

unread,
Feb 22, 2018, 4:22:41 AM2/22/18
to woodri...@gmail.com, scikit-build
Hi Jon,

The support for an improved "--cmake-skip" command line option was just integrated. It will be available with the next release of scikit-build.


Thanks
Jc

To unsubscribe from this group and stop receiving emails from it, send an email to scikit-build+unsubscribe@googlegroups.com.

To post to this group, send email to scikit...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages