MurpheyLab / trep

Trep: Mechanical Simulation and Optimal Control Software
https://murpheylab.github.io/trep/
GNU General Public License v3.0
18 stars 11 forks source link

trep headers not being properly installed #31

Closed jarvisschultz closed 9 years ago

jarvisschultz commented 9 years ago

On master branch right now (167141bfb8046e0ec8d2b4f13e7c5ae93f3c6252), the headers are not being installed correctly. I'm guessing that defaulting to setuptools instead of distutils (Lines 3-8) is somehow causing the install_headers key in cmd_options to be ignored.

This causes problems when trying to compile external libraries that depend on trep.

jarvisschultz commented 9 years ago

It seems that setuptools always ignores the install_headers target when running just install. Setting the --root or --single-version-externally-managed forces setuptools to run the install_headers target. This post on the distutils mailing list helped describe this.

Forcing users to run sudo python setup.py install_headers as part of the install process would be an option around this. Alternatively, we could override the default command that setuptools uses (see this page).

adwilson10 commented 9 years ago

Another option is to package the header files into the dist and provide a function such as trep.get_include() which can be used by extension packages. This seems to be how numpy handles it and would ensure that the headers are present independent of the installation method.

adwilson10 commented 9 years ago

This should be resolved with 9f621b7c9363c36b9ea2afc5400344e8d7c04ed9. A new functiontrep.get_include() should be used when building against the trep headers.