conda-forge / petsc4py-feedstock

A conda-smithy repository for petsc4py.
BSD 3-Clause "New" or "Revised" License
0 stars 15 forks source link

Add patch to install conf #3

Closed nehaljwani closed 7 years ago

nehaljwani commented 7 years ago

Patch obtained from https://github.com/hashdist/hashstack/blob/master/pkgs/petsc4py/petsc4py_install_conf.patch

Projects like https://github.com/erdc-cm/proteus depend on this.

conda-forge-linter commented 7 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

dalcinl commented 7 years ago

As the author of petsc4py, it was never my intention that this stuff gets installed. Is is subprime, untested code I accumulated over the years build and install petsc4py. Other projects should not not depend on this stuff. They should either build its own solution, or make a formal proposal (and patches with a more serious implementation) to petsc4py, I simply don't have the bandwidth to do it. I offer no support at all to that piece of code, it may change/go away at any time without deprecation notice.

@minrk The final decision is on you.

cekees commented 7 years ago

Hi @dalcinl. We can probably do that. I believe we only do this so we can do petsc4py.conf.petscconf import Extension as PetscExtension in our setup.py and build some extension modules that we want to build/link consistently with petsc4py and the underlying petsc.

dalcinl commented 7 years ago

@cekees Wouldn't be enough if petsc4py provides a way to users to get a dict with petsc_dir and petsc_arch keys? That way you can easily compute include and library paths to setup a regular distutils Extension class. Think of a petsc4py.get_config() function returning a dict. I can expose it returning the info already installed in the file <site-packages>/petsc4py/lib/petsc.cfg

cekees commented 7 years ago

I think that should work. It's been years, but I think I may have been reading petsc.cfg in our prior build system anyway. Shouldn't be too much trouble to build with the distutils Extension class.

dalcinl commented 7 years ago

@cekees Pushed petsc4py.get_config() to master. If you have any issues or want to extend it, let's discuss it elsewhere (e.g. open an issue in Bitbucket).

If you are OK with it, please close this PR.

minrk commented 7 years ago

I'm happy deferring to @dalcinl on matters regarding how petsc4py should be installed.

cekees commented 7 years ago

@nehaljwani I tested building proteus with hashdist with @dalcinl's latest commit on petsc4py master, and we can build without the patch, so you can close this. I'll push my change to your branch of proteus for the conda package.