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

issues with python setup.py install #19

Closed
rc opened this issue Mar 2, 2017 · 3 comments
Closed

issues with python setup.py install #19

rc opened this issue Mar 2, 2017 · 3 comments

Comments

@rc
Copy link

rc commented Mar 2, 2017

Hello,

first, thank you for making this package available. I managed to get the tests running in the pymatsolver directory without problems, using the instructions in the README,rst (not using anaconda). There are, however, some issues, when trying to use the python setup.py install command.

  1. This does not build/install the MUMPS wrappers. (I could make and copy them manually, but...).
  2. The tests directory is installed into .../python/dist-packages directly (on ubuntu, this is site-packages) and not into .../python/dist-packages/pymatsolver.
@rowanc1
Copy link
Member

rowanc1 commented Mar 4, 2017

Hi @rc. Thanks for the comment.

I have had trouble with the setup.py file, especially since there is no guarantee that the target machine will have mumps installed.

Here I have explicitly separated out the mumps step:
https://github.com/rowanc1/pymatsolver/blob/master/.travis.yml#L34

This is not ideal. Do you have any suggestions for a work around? I am still a bit of a novice on the setup.py and making it work across all of the different environments. I also don't want the install to fail if Mumps is not installed.

Regarding the tests, I have been following:
https://github.com/audreyr/cookiecutter-pypackage

Which puts the tests in the top level directory. I am not sure why it would copy the tests directory over to the site-packages folder. Do you see anything incorrect in my setup.py? It is possible that I need to be more explicit about the inclusion of the pymatsolver directory.

Might be worth following some more of the conventions in our finite volume package:
https://github.com/simpeg/discretize/blob/master/setup.py#L45

It will take me a bit of time to get back around to this repo. If you have experience in these areas I am absolutely up for some PR help! :)

@rc
Copy link
Author

rc commented Mar 13, 2017

As for mumps, I have no particular idea, how this could be conveniently handled. I am just (sort of) starting with mumps.

Regarding the tests, I am using numpy.distutils instead of the plain distutils, and there you could use something like:

config.add_data_dir(('pymatsolver/tests', 'tests'))

which would put the tests folder contents into pymatsolver/tests when installed.

Not sure how to do that with the plain distutils, maybe https://docs.python.org/2/distutils/setupscript.html#installing-additional-files could help.

@jcapriot
Copy link
Member

Took a long time to address this one, Indeed the setup.py was finding and installing a "tests" package. This has been address in #38

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

No branches or pull requests

3 participants