Skip to content

Conversation

@repagh
Copy link
Member

@repagh repagh commented Jul 11, 2018

After checking out the updated Slycot, I found that Windows builds were not working for me. Tried hunting down the differences, but could not get sufficient control over the Fortran side of the build process with numpy/setuptools. So I ended up implementing a pretty large change in the build system, using scikit-build to replace the numpy/setuptools based build system.

scikit-build wraps setuptools, and combines with CMake for the Fortran and C side of the builds. This enables more fine-grained control over the Fortran compilation, and selection of appropriate build generators. For Windows this uses NMake and Flang, for Linux this uses gnu make and fortran, for Mac it combines gfortran with clang and again gnu make.

Note: somehow the commit messages got mixed up? I did a merge+squash on a new branch, had proper messages locally, but here I have a bunch of old messages???

commit be8cdfa (HEAD -> build-with-scikit-build, origin/build-with-scikit-build)
Author: Rene van Paassen Rene.vanPaassen@gmail.com
Date: Wed Jul 11 22:24:49 2018 +0200

Add a comment on the many manual selections needed for Windows build.

commit 2ee5339
Author: Rene van Paassen Rene.vanPaassen@gmail.com
Date: Wed Jul 11 22:14:55 2018 +0200

Conversion to building with scikit-build. Uses cmake for better
autodetection of available libraries (openblas/lapack)

- deleted Slycot/slycot/setup.py
- CMakeLists.txt in Slycot and Slycot/slycot
- adapted Slycot/setup.py

* Windows build needs specification of generator, e.g.
  python setup.py build -G "NMake Makefiles"
* OSX and Linux builds select proper generator automatically

repagh and others added 14 commits June 5, 2018 00:56
- corrected transform.pyf, to not allocate zero-dim matrices
- added tests for td04ad, one static, one checked against Octave with
  a transfer function set.
and works for 'C' as well as 'R'
added a few tests
use conda-supplied compilers in meta.yaml
fix flags for build on osx, specifically conda has python symbols in
executable, needs -undefined dynamic_lookup
autodetection of available libraries (openblas/lapack)

- deleted Slycot/slycot/setup.py
- CMakeLists.txt in Slycot and Slycot/slycot
- adapted Slycot/setup.py

* Windows build needs specification of generator, e.g.
  python setup.py build -G "NMake Makefiles"
* OSX and Linux builds select proper generator automatically
Copy link
Member

@murrayrm murrayrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small things.

- openblas >=0.3.0
- libflang # [win]
- libgfortran # [not win]
- libgfortran # [not win]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why extra spaces?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dunno. Editing on windows gives me that stuff sometimes.... Will remove them.

- lapack
- libflang # [win]
- libgfortran # [not win]
- libgfortran # [not win]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why extra spaces?

@murrayrm
Copy link
Member

Travis CI failed. Looks like it can't find skbuild.

Will try this out on my local machine when I get a chance (probably weekend, soonest).

@repagh
Copy link
Member Author

repagh commented Jul 13, 2018

I forgot that I used pip to install a recent scikit-build.

I see people are now working on a new release of scikit-build for conda-forge. I think it is best to pick things up when that happened.

@moorepants
Copy link
Contributor

It may work if you just add pip install scikit-build here: https://github.com/python-control/Slycot/blob/master/.travis.yml#L67

repagh and others added 9 commits August 14, 2018 23:36
- conda builds now work
- uses an ugly hack to get around lack of recent scikit-build in conda-forge
- use NMake as build type
- Win only works with openblas
- hack running vcvarsall again
- use CMAKE 3.12 policy recognizing BLAS_ROOT, LAPACK_ROOT
- generate the version.py through cmake
- remove/clean dependencies from installing scikit-build, in build.sh
- correct the suffix used for the dll on mac osx
@repagh
Copy link
Member Author

repagh commented Aug 21, 2018

Closing, superseded by PR #38

@repagh repagh closed this Aug 21, 2018
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.

3 participants