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

Add pykafka recipe #4091

Merged
merged 7 commits into from
Oct 9, 2017
Merged

Add pykafka recipe #4091

merged 7 commits into from
Oct 9, 2017

Conversation

mrocklin
Copy link
Contributor

@mrocklin mrocklin commented Oct 1, 2017

cc @emmett9001

Depends on #4090

See Parsely/pykafka#730

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/pykafka) and found it was in an excellent condition.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/pykafka) and found some lint.

Here's what I've got...

For recipes/pykafka:

  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/pykafka) and found it was in an excellent condition.

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 1, 2017

@emmett9001 I found that I needed to install gevent in order to import pykafka. Is this expected?

extra:
recipe-maintainers:
- mrocklin
- emmett9001
Copy link
Member

Choose a reason for hiding this comment

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

Are you ok being a maintainer, @emmett9001?

Choose a reason for hiding this comment

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

Yes I am!

@jakirkham
Copy link
Member

Just want to check with the other person to make sure they are ok maintaining this. Otherwise LGTM.

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 1, 2017

Just want to check with the other person to make sure they are ok maintaining this. Otherwise LGTM.

Yes, we're in conversation in Parsely/pykafka#730 . I haven't yet received a confirmation.

Also, what is the right thing to do if the package needs pkg_resources at runtime? Add a runtime dependency on setuptools?

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 2, 2017

It looks like we're not picking up the librdkafka library at build time. http://pykafka.readthedocs.io/en/latest/#using-the-librdkafka-extension

Is there a nice way to add conda's local include and lib directories to C_INCLUDE_PATH and LD_LIBRARY_PATH? Is this typically done in a build.sh script or is there some more standard approach?


requirements:
build:
- python
Copy link
Member

Choose a reason for hiding this comment

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

Please add toolchain.

@jakirkham
Copy link
Member

Also, what is the right thing to do if the package needs pkg_resources at runtime? Add a runtime dependency on setuptools?

Yes.

Is there a nice way to add conda's local include and lib directories to C_INCLUDE_PATH and LD_LIBRARY_PATH? Is this typically done in a build.sh script or is there some more standard approach?

Adding toolchain above should fix it.

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 2, 2017

This recipe has grown somewhat more complex. Does it still meet the requirements of noarch: python?

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 2, 2017

It looks like we're still not able to see the librdkafka library. I'm not sure if this is at build time or at runtime though.

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 2, 2017

Failing at build time

pykafka/rdkafka/_rd_kafkamodule.c:11:32: fatal error: librdkafka/rdkafka.h: No such file or directory

@jakirkham
Copy link
Member

Does it still meet the requirements of noarch: python?

If it is compiling stuff, would say no.

build:
- python
- setuptools
- toolchain
Copy link
Member

Choose a reason for hiding this comment

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

Please add librdkafka here too if it is needed for the build.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah ah! Of course. Now I feel a bit silly. Thanks @jakirkham !

Copy link
Member

Choose a reason for hiding this comment

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

np

- python
- setuptools
- toolchain
- librdkafka # [not win]
Copy link
Member

Choose a reason for hiding this comment

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

Normally for libraries that are linked to, we pick some sort of pinning so the stack remains consistent and things don't break when a new version comes out. Based on the API/ABI report, it looks like librdkafka breaks on patch versions sometimes. Though 0.9.4 and 0.9.5 seem ok. Given this, it seems reasonable to change this to librdkafka 0.9.4|0.9.5. Thoughts on this?

cc @conda-forge/librdkafka

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I'm pinned at 0.9.4 here; this works for me.

I'd argue it's important to keep all of the libraries that depend on librdfakfa on the same pin so they are interchangable. Is there a non-manual way to do this other than a global conda-forge pin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hrm, at runtime I would expect conda itself to figure this out. I'm not sure how feasible it is to use pykafka with a different librdkafka from which it was built.

@emmettbutler
Copy link

@mrocklin gevent is still required as of 2.6.0, but 2.7.0.dev1 removes the dependency.

@emmettbutler
Copy link

How does conda-forge handle development versions? I've been doing pre-release versions for a while (with .dev on the end of the version number), and I know setuptools automatically ignores these versions during pip install. Moving forward, should I also do conda-forge pre-release versions this way?

@@ -0,0 +1,60 @@
{% set name = "pykafka" %}
{% set version = "2.6.0" %}
{% set sha256 = "19e4a802b00e28c3203fcfd80ca440b13faecb8e58171e9685a044cf87dae93e" %}

Choose a reason for hiding this comment

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

Where on PyPI is this SHA available?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 2, 2017

How does conda-forge handle development versions? I've been doing pre-release versions for a while (with .dev on the end of the version number), and I know setuptools automatically ignores these versions during pip install. Moving forward, should I also do conda-forge pre-release versions this way?

I honestly never do dev releases on conda-forge. But then again I rarely do dev releases. I don't have much to provide here. @jakirkham generally knows best practices.

@mrocklin gevent is still required as of 2.6.0, but 2.7.0.dev1 removes the dependency.

OK, good to know.

From my perspective this PR is good to go.

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 4, 2017

Is there anything else here that needs to be resolved?

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 8, 2017

Ping

- python
- setuptools
- toolchain
- librdkafka 0.9.4|0.9.5 # [not win]
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add this pinning to our list of pinnings?

@jakirkham
Copy link
Member

Sorry @mrocklin. Got a bit swamped.

Would like us to add the librdkafka pinning to our list of pinnings. Otherwise this should be good to go.

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 8, 2017

Would like us to add the librdkafka pinning to our list of pinnings. Otherwise this should be good to go.

I'm not sure I understand the intent here or the format of that document. I'm happy to submit a PR that follows that pattern though. What happens if we update librdkafka on conda-forge (which is a few versions old at the moment).

@jakirkham
Copy link
Member

So we try to keep all pinnings the same throughout conda-forge. That way, one can confidently install and use various packages from conda-forge without running into dependency conflicts.

ATM we pin build and run the same (though that may change in the future). The package name is listed on the left and on the right is the pinning that we are using in the org. The comment is there to note what defaults is pinning a package to (if known or if it exists in defaults).

Hope that helps. If you have more questions, please feel free to ask. :)

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 8, 2017

Ah, so all conda-forge recipes are pinned to the exact same version? How/when does the community decide to bump these pinned versions?

mrocklin added a commit to mrocklin/conda-forge.github.io that referenced this pull request Oct 8, 2017
@jakirkham
Copy link
Member

Yeah we try our best to do so. Though we haven't equipped the linter to enforce this and some recipes lag (though the pinning bot should help here). So there could be some exceptions. That said, the goal is to keep everything in lockstep.

Normally someone in the community feels a need to have a newer version and they PR a version bump to the webpage repo. Then we try to discuss with relevant parties to see if that works for everyone affected. Though we may go ahead if some people are slow to reply.

@jakirkham jakirkham merged commit 523caef into conda-forge:master Oct 9, 2017
@jakirkham
Copy link
Member

Thanks @mrocklin.

@mrocklin
Copy link
Contributor Author

mrocklin commented Oct 9, 2017

Thank you for shepherding this along @jakirkham

@mrocklin mrocklin deleted the pykafka branch October 9, 2017 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants