Skip to content

Commit

Permalink
Fixed to build/install succesfully for python 2.7 or python 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
noahbaxter committed Jun 7, 2018
1 parent 79d046d commit 4ef5c1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 5 additions & 1 deletion python/pymei/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from sys import version_info

from _libmei import *
if version_info.major >= 3:
from ._libmei import *
else:
from _libmei import *
11 changes: 8 additions & 3 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
longdesc = """ Python Bindings for LibMEI. """

if sys.platform == "darwin":
link_args = ["-framework", "mei"]
libraries = ["boost_python-mt"]
link_args = ["-F", "/Library/Frameworks","-framework", "mei"]
if sys.version_info.major == 2:
libraries = ["boost_python27-mt"]
elif sys.version_info.major == 3:
libraries = ["boost_python36-mt"]
else:
libraries = ["boost_python-mt"]
library_dirs = []
runtime_library_dirs = []
include_dirs = []
Expand Down Expand Up @@ -61,4 +66,4 @@
),
],
test_suite="pymei_testsuite"
)
)

3 comments on commit 4ef5c1a

@ahankinson
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you did this without going through the pull request you have opened?

@noahbaxter
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The master branch is currently unable to build the mei.framework because of missing header files #103, but the develop branch can. So I thought it would make more sense to have the develop be fully installable instead of fixing the python bindings for a branch without a buildable mei.framework.

This commit fixes #104

@Derickho94
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to run python setup.py build but Im getting an error.
"NameError: name 'libraries' is not defined"
can someone help me fix this? im trying to get the libmei. im using windows 10.

Please sign in to comment.