-
Notifications
You must be signed in to change notification settings - Fork 42
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
Make pip installable, migration to pyscaffold, f2py extensions #14
Comments
I never used I guess that the best way to go with Fortran extensions is |
|
I think I found the solution! In an old mailing list entry it was stated that when
the latter would use |
How is that different from using only |
in that case you will not have the ability to let |
I have pushed the work I have done so far to the pipinstall branch. Note that not all extensions are build correctly yet. This is very much a work in progress (WIP). I hope that by next weekend things are starting to fall into places. I do not have a Windows environment setup for testing yet, so I can only cover the Linux tests for the time being. @pbrod please let me know if the changes I have made so far are not in line with the direction you had in mind. |
@davidovitch I think this is a very good start. If possible I would like to keep pyscaffold because the setup script get much tidier than with only using distutils. In addition as you mentioned it will automatically keep track of the versions in a very clean way. Automatic versioning will simplify the release cycle. |
@pbrod, I see you've also tried to compile the extensions with one interface file and several module/object dependencies. I am still clueless as to how to solve this, so I've posted a question on the NumPy mailing list here. I've also bumped into complicated_build, but I am not sure I understand exactly what it does or how it could help. |
I discovered that the fortran files had tabulators' (\t) and they are a source for compilation errors, so I replaced those with spaces. What I find strange is that I am not able to even compile the test_fimod.f, test_rind71mod.f or test_rindmod.f on my windows 7 machine. I suspect there is something wrong with my fortran installation. When I compile mvnprd, cov2mod and rindmod I get the following error: Found executable C:\Users\pab\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe However, I am able to compile mvn.pyf and mvndst.f into mvn.pyd without errors. I will try to change fortran installation and see if that helps. |
A possible solution is to try Cython and Fortran 2003 ISO C bindings. |
Thanks to this reply on the Numpy mailing list we now have an example from Scipy here that does exactly what we are after. I've updated
ImportError: python2.7/site-packages/wafo/mvnprdmod.so: undefined symbol: __epsmod_MOD_eps |
Test results on my machine (Linux 64-bit): >>> import wafo
fig import only supported on Windows
fig import only supported on Windows
wafo/gaussian.py:19: UserWarning: mvnprdmod not found. Check its compilation.
warnings.warn('mvnprdmod not found. Check its compilation.')
>>> wafo.test(label='full')
# clip output
----------------------------------------------------------------------
Ran 3095 tests in 290.862s
FAILED (KNOWNFAIL=17, SKIP=7, errors=27, failures=8) At least two failures are due to the If the current branch also builds on Windows I am +1 for merging into master and continue the development over there. I propose to start tackling the failed tests from the master branch. Note that I can also successfully create a wheel package (that includes the compiled extensions) as follows:
|
@pbrod I would like to propose to merge this into the master, and continue to fix issues from there. What are you thoughts on this? Do you prefer I fix some of the issues first, or can I just go ahead with it? |
It looks good to me, so just go ahead and merge into master. (For me the fortran builds crashes on both branches). The most important issue is to get the build chain for the fortran modules I have put much effort into this but have not succeded. On 14 January 2016 at 16:58, David Verelst [email protected] wrote:
|
I've merged the |
I've had an issue with my virtual environment. When using a miniconda environment as follows:
Build install wafo... >>> import wafo
fig import only supported on Windows
python2.7/site-packages/wafo/gaussian.py:19: UserWarning: mvnprdmod not found. Check its compilation.
warnings.warn('mvnprdmod not found. Check its compilation.')
fig import only supported on Windows
>>> wafo.test(label='full') Which returns in the end:
So that is consistent with the situation as before merging the pip-install branch into master. There's still more to be done, especially fixing the build on Windows. I have access to a Windows machine so I could also give it a try at some point... @pbrod when reading up on the build situation on Windows, I learned that is somewhat messy based on the following resources:
|
@davidovitch Just to provide a few more data points. I tried to build the I guess that is related with the fact that the On Windows, using I will test with |
@pbrod @ocefpaf I am trying to get a new setup.py file up and running with
pyscaffold
, and the re-organized file structure as we discussed in PR #10. This all works fine until I need to compile the extensions with f2py.pyscaffold
works fine withsetuptools
, but does not seem to be supported bynumpy.distutils
which is required in order to built the f2py extensions.So what I have now is either:
setuptools
+pyscaffold
- f2py extensionsnumpy.distutils
+ f2py extensions -pyscaffold
(=manual package configuration)I have looked at
scipy
andpandas
for inspiration, but they all go around withoutpyscaffold
. Does anyone of you have any experience with this or useful tips?The text was updated successfully, but these errors were encountered: