Skip to content

Removed hard coded c extentions lib/include paths #5

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

Merged
merged 2 commits into from
Jun 1, 2016

Conversation

johnistan
Copy link
Contributor

With packaging systems like conda users need to be able to specify the location of librdkafka.

If users have compiled librdkafka to a non standard location you can build with:

CPLUS_INCLUDE_PATH=/path/to/include LIBRARY_PATH=/path/to/lib $PYTHON setup.py install

@ghost
Copy link

ghost commented May 26, 2016

Hey @jofusa,
thank you for your Pull Request.

It looks like you haven't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement here.

Once you've signed reply with [clabot:check] to prove it.

Appreciation of efforts,

clabot

@johnistan
Copy link
Contributor Author

[clabot:check]

@ewencp
Copy link
Contributor

ewencp commented May 26, 2016

@edenhill This seems ok to me. Any reason we included them explicitly?

@edenhill
Copy link
Contributor

The main reason is that manual installs of librdkafka will be placed in /usr/local, so defaulting to that location allows seemless building both for package-installed librdkafka (e, g, deb or rpm, which resides in /usr and is automatically picked up by compiler and linker) as well as manual installers of librdkafka.

@jofusa Are these default paths conflicting with conda?

@johnistan
Copy link
Contributor Author

It does. Conda places conda version of librdkafka into you personal env directory. Which is located in your home directory. The build script looks like:

CPLUS_INCLUDE_PATH=$PREFIX/include LIBRARY_PATH=$PREFIX/lib $PYTHON setup.py install

With $PREFIX being set by conda.

@johnistan
Copy link
Contributor Author

I should add that with these two lines removed I have this package built with conda.

@ewencp
Copy link
Contributor

ewencp commented May 27, 2016

@edenhill On Mac this works fine w/ this patch -- it still picks up the /usr/local version.

@johnistan
Copy link
Contributor Author

thoughts on this? This is forcing me to build from a private fork instead of the release tar.

@edenhill
Copy link
Contributor

edenhill commented Jun 1, 2016

@ewencp That wont be true on Linux though.

Lets go ahead with removing the explicit include and lib dirs, but add a line like this to the build section of the README:

If librdkafka is installed in a non-standard location provide the include and library directories by CPLUS_INCLUDE_PATH=/path/to/include LIBRARY_PATH=/path/to/lib python setup.py ...

@johnistan
Copy link
Contributor Author

Sounds good will add to the pr.

On Wed, Jun 1, 2016, 12:32 PM Magnus Edenhill notifications@github.com
wrote:

@ewencp https://github.com/ewencp That wont be true on Linux though.

Lets go ahead with removing the explicit include and lib dirs, but add a
line like this to the build section of the README:

If librdkafka is installed in a non-standard location provide the include
and library directories by CPLUS_INCLUDE_PATH=/path/to/include
LIBRARY_PATH=/path/to/lib python setup.py ...


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAw3neRnWTlywGSBr4LcolmkaREEYFoHks5qHdBOgaJpZM4In5yk
.

@johnistan
Copy link
Contributor Author

added docs

@edenhill
Copy link
Contributor

edenhill commented Jun 1, 2016

Looks good to me.
@ewencp ?

@ewencp
Copy link
Contributor

ewencp commented Jun 1, 2016

Yup, LGTM

@edenhill edenhill merged commit 46a4e20 into confluentinc:master Jun 1, 2016
@edenhill
Copy link
Contributor

edenhill commented Jun 1, 2016

Thanks @jofusa!

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

Successfully merging this pull request may close these issues.

3 participants