-
Notifications
You must be signed in to change notification settings - Fork 703
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
Combine python/setup.py.in into setup.py #783
Conversation
@@ -46,10 +46,10 @@ get CMake, and Mercurial with either homebrew or macports: | |||
brew install cmake hg # Using homebrew. | |||
sudo port install cmake mercurial # Using macports. | |||
|
|||
On **Windows**, see :ref:`windows-cpp-install`. | |||
On **Windows**, see [documentation](http://dynet.readthedocs.io/en/latest/install.html#windows-support). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work with .rst files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the bit I removed? I suppose, as it came from the .rst documentation. But this is Markdown...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK we'll see, if it bugs I'll correct it after the pr is merged
Thanks a lot for this! It seems to be breaking the build in my environment. Attached are the cmake and make log files noted here: The actual error I'm getting is when doing the Python cmake:
Any ideas here? |
Apparently |
a1c5fd6
to
e607bd7
Compare
@neubig Fixed this issue. Could you try again please? |
@danielhers Thanks! I took a look at this now. A couple questions:
|
@neubig I suppose you are doing the "manual" installation. If you do If you are doing the manual installation, you still need to run
Note that
|
@danielhers Thanks for the clarification! I am indeed following the manual install instructions, because I need them as a developer (and also because I need CUDA, which is not supported with pip at the moment AFAIK). I tried the manual install instructions again in a clean environment and followed the instructions word-for-word. It looks like pip is still pulling Eigen a second time and recompiling everything when I run
I imagine we could fix this by either fixing the directions to use the latest version of Eigen in the first place (which might cause bugs for people when the latest version of Eigen breaks), or modifying setup.py to use the version specified in the manual installation instructions. But it might be worth considering using a release version of Eigen like this commit, which would solve the problem and also remove the dependency on mercurial: #608 What do you think? |
It just checks if the eigen directory exists, and if so, skips cloning it, so it doesn't matter what version it is. How did you specify the |
I didn't. I just followed the manual installation directions exactly. |
So it has no way to know that you are using a non-standard eigen path... |
By the way, installing with CUDA should also be possible now by giving |
Quoted from my previous post: I tried the manual install instructions again in a clean environment and followed the instructions word-for-word. To re-phrase: I stopped using a custom install path, and ran the entire manual install instructions, which include cloning Eigen to a local directory. If necessary, I can create a log with all the commands I ran and the result. Would this be useful? |
I see now, sorry I misunderstood before. Seems like the build directory when using the command I wrote in the instructions isn't what it's supposed to be. I'll check why. |
Thanks! I'm also trying to create a log file that shows what happens just in case this is an environment specific thing. And yes, I think good documentation about how to install with CUDA and how to specify environmental variables would be very useful for the average user. |
I haven't tested the CUDA installation with pip yet, it's just in theory that it should work. I'll update the docs after testing it. |
ddea312
to
3e5f6e9
Compare
Seems like it was cloning eigen again since it really didn't find it inside |
da1e5fd
to
affe752
Compare
All the CMake variables are now passed as environment variables. This simplifies the installation and will allow easily creating binary distributions, which can be uploaded to PyPI. Fix setup.py invocation in Travis CI manual installation.
Since python/setup.py.in was removed, the top setup.py needs to be run to install the Python bindings, but to avoid re-building the whole project, the same build directory should be supplied.
This works when using DYLD_LIBRARY_PATH, which is now done anyway.
Apparently `cmake -E env` is only available from version 3.1.
@neubig Fixed, now it installs only once. And I enabled testing for pip on OSX as a bonus :) |
Great, thanks! I'm still having some trouble though... Perhaps this is resulting from a slightly old build environment using cmake? Here are three logs.
I'm out of time to debug now, but if you have any ideas I may be able to try them later today or tonight. One idea I had was to read test-dynet-absolute.txt |
It's not enough to give it to |
I hope it's better now. Sorry you had to go through the trouble of debugging this. |
Great, it's working for me now. Will merge. |
Simplify Python installation process by combining the generated
setup.py
into the top one, using environment variables to pass information fromcmake
. Should allow fixing #657 now that the Cython extensions are created by the mainsetup.py
.