Skip to content

Include .c files in repo. #1805

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

Closed
twiecki opened this issue Aug 23, 2012 · 7 comments
Closed

Include .c files in repo. #1805

twiecki opened this issue Aug 23, 2012 · 7 comments
Labels
Build Library building on various platforms
Milestone

Comments

@twiecki
Copy link
Contributor

twiecki commented Aug 23, 2012

pip install git+https://github.com/pydata/pandas.git

does currently not work because the .pyx files are not being cythonized (not sure why). An easy fix is to include .c files in the git repo which should make it easier for people to deploy.

I used a simple try: import cython in setup.py that cythonizes if cython is installed and uses the .c files otherwise:

https://github.com/hddm-devs/hddm/blob/develop/setup.py#L4

@wesm
Copy link
Member

wesm commented Aug 23, 2012

I don't want to include the .c files in the repo because of the diff noise. @minrk do you know what could be wrong?

@minrk
Copy link
Contributor

minrk commented Aug 23, 2012

I might. @twiecki - do you have vanilla setuptools or distribute?

I encountered this or similar in pyzmq, where old-style setuptools will actually explicitly convert all your .pyx extensions back to .c if pyrex is not importable. my workaround. distribute doesn't have this problem.

I can confirm on my system that a virtualenv created with setuptools cannot run the install above, but one with distribute instead can, so it's probably the same issue.

@twiecki
Copy link
Contributor Author

twiecki commented Aug 23, 2012

@minrk Yes, it's in a virtualenv. Not sure what it was created with (used virtualenvwrapper), it might have both actually.

@minrk
Copy link
Contributor

minrk commented Aug 23, 2012

Try this, then:

pip install git+https://github.com/minrk/pandas.git@badsetuptools

@minrk
Copy link
Contributor

minrk commented Aug 23, 2012

(if it works, I'll do a PR)

@twiecki
Copy link
Contributor Author

twiecki commented Aug 23, 2012

@minrk: yes, that did the trick

cythoning pandas/src/generated.pyx to pandas/src/generated.c

Thanks!

On Thu, Aug 23, 2012 at 2:34 PM, Min RK [email protected] wrote:

(if it works, I'll do a PR)


Reply to this email directly or view it on GitHubhttps://github.com//issues/1805#issuecomment-7979354.

minrk added a commit to minrk/pandas that referenced this issue Aug 23, 2012
setuptools (not distribute) will replace '.pyx' extensions with '.c'
if *pyrex* is not importable.  This checks if that happened,
and reverses it if so.

closes pandas-dev#1805
@minrk
Copy link
Contributor

minrk commented Aug 23, 2012

See #1806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants