space-physics / msise00

NRL MSISE-00 atmospheric model-- in Python and Matlab
https://ccmc.gsfc.nasa.gov/pub/modelweb/atmospheric/msis/
MIT License
47 stars 22 forks source link

"build" directory NOT located in virtual environment directory #7

Closed danielk333 closed 5 years ago

danielk333 commented 5 years ago

Doing

source my/env/bin/activate
git clone https://github.com/scivision/msise00
cd msise00
pip install .
python -c "import msise00; msise00.build()"

Will create an installed package that only works from the "msise00" since base.py looks for the "build" directory relative the executed file base.py#22

At least this is my understanding of the code from a quick glance as

file is the pathname of the file from which the module was loaded

Also it should be noted that this probably only occurs because I did NOT do pip install -e ..

It maybe is more intuitive (and useful) if the pip-install command created the drivers and placed them in "my/env/lib/python3.7/site-packages/msise00/build".

This behavior also renders inter-package dependability impossible since one cannot add things like

dependency_links=['git+https://github.com/scivision/msise00#egg=msise00']

to a setup.py in another project.

scivision commented 5 years ago

Thank you, this is a definite error on our part. We will fix this shortly. Thanks for noting this!

scivision commented 5 years ago

Hi @danielk333 there is a new release v1.4.0. The handling of data_files and the MSISE00 Fortran executable has been improved for and testing has been added for msise00 in virtual environments. I hope it will work. Please reopen the issue if it doesn't. Thanks!