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

pip install -e fails with compile error #352

Closed
ctb opened this issue Mar 29, 2014 · 6 comments
Closed

pip install -e fails with compile error #352

ctb opened this issue Mar 29, 2014 · 6 comments
Assignees
Milestone

Comments

@ctb
Copy link
Member

ctb commented Mar 29, 2014

The command:

pip install -e git+https://github.com/ged-lab/khmer.git@master#egg=khmer

fails with:

khmer/_khmermodule.cc:17:20: fatal error: khmer.hh: No such file or directory

on ami-c17ec8a8, which admittedly is an old Ubuntu install. I did upgrade pip to the latest version first, however.

@mr-c
Copy link
Contributor

mr-c commented Mar 29, 2014

On Sat, Mar 29, 2014 at 11:09 AM, C. Titus Brown
notifications@github.comwrote:

pip install -e git+https://github.com/ged-lab/khmer.git@master#egg=khmer

Confirmed on Ubuntu 12.04.4 LTS

This is a Setuptools / distutils issue with how they handle command options
of dependent commands. That pip command calls setup.py develop which
executes the build_ext command. When setup.py build_ext is called the
options specified in setup.cfg "[build_ext]" stanza are correctly
incorporated; this is not the case when the build_ext command is executed
by the develop command. I ran into this with the nosetests command recently.

This appears to be due to the fact that we extend the setuptools
'build_ext' to ensure that zlib & bzip's are configured & compiled. When I
disable the override all goes correctly.

I can work around this by moving the include directories back into setup.py
from setup.cfg. A better fix would clean up several issues I've been
experiencing.

mr-c added a commit that referenced this issue Mar 29, 2014
This workaround disables the ability to override the include directory list via
setup.cfg
mr-c added a commit that referenced this issue Mar 29, 2014
This workaround disables the ability to override the include directory list via
setup.cfg
mr-c added a commit that referenced this issue Mar 29, 2014
This workaround disables the ability to override the include directory list via
setup.cfg
@mr-c
Copy link
Contributor

mr-c commented Mar 29, 2014

  1. Subclassing the distutils version of build_ext instead of the setuptools version doesn't solve the problem

  2. It appears that the subclassing is the problem. Even an empty subclass (which should silently pass through to distutils or setuptools) gives the same symptoms.

@mr-c
Copy link
Contributor

mr-c commented Mar 29, 2014

#353 now includes a monkeypatch to fix the real problem
The Distribution.reinitialize_command() method implies that you get the same command that Distribution.get_command_obj() give you but fails to set options that were supplied in config files or on the command line like get_command_obj() does.

@ctb
Copy link
Member Author

ctb commented Mar 29, 2014

On Sat, Mar 29, 2014 at 12:14:54PM -0700, Michael R. Crusoe wrote:

#353 now includes a monkeypatch to fix the real problem
The Distribution.reinitialize_command() method implies that you get the same command that Distribution.get_command_obj() give you but fails to set options that were supplied in config files or on the command line like get_command_obj() does.

Should we file this as a bug report in Python?

C. Titus Brown, ctb@msu.edu

@mr-c
Copy link
Contributor

mr-c commented Mar 30, 2014

@ctb Yes. Likely it won't be fixed there (as it does change behavior); setuptools would be a good place to include the monkeypatch.

mr-c added a commit that referenced this issue Mar 30, 2014
Distribution.reinitialize_command implies that you get the same command
that get_command_obj() but fails to set options that were supplied in
config files or on the command line like Distribution.get_command_obj()
does.

This includes a monkeypatch to fix this issue.
mr-c added a commit that referenced this issue Mar 30, 2014
Distribution.reinitialize_command implies that you get the same command
that get_command_obj() but fails to set options that were supplied in
config files or on the command line like Distribution.get_command_obj()
does.

This includes a monkeypatch to fix this issue.
@mr-c
Copy link
Contributor

mr-c commented Mar 30, 2014

pip install -e git+https://github.com/ged-lab/khmer.git@fix/build_ext-cfg-workaround#egg=khmer works for me

@mr-c mr-c added this to the 1.0 release milestone Mar 30, 2014
@mr-c mr-c self-assigned this Mar 30, 2014
mr-c added a commit that referenced this issue Mar 30, 2014
@mr-c mr-c closed this as completed Mar 30, 2014
mr-c added a commit that referenced this issue Apr 1, 2014
Distribution.reinitialize_command implies that you get the same command
that get_command_obj() but fails to set options that were supplied in
config files or on the command line like Distribution.get_command_obj()
does.

This includes a monkeypatch to fix this issue.
mr-c added a commit that referenced this issue Apr 1, 2014
mr-c added a commit that referenced this issue Apr 2, 2014
Distribution.reinitialize_command implies that you get the same command
that get_command_obj() but fails to set options that were supplied in
config files or on the command line like Distribution.get_command_obj()
does.

This includes a monkeypatch to fix this issue.
mr-c added a commit that referenced this issue Apr 2, 2014
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

2 participants