Use pandas.version.short_version #1078

Closed
lemonlaug opened this Issue Sep 11, 2013 · 5 comments

Projects

None yet

2 participants

@lemonlaug

It appears that maybe there's a change in versioning going on in recent builds of pandas:

>>> import pandas.version
>>> pandas.version.version
''
>>> pandas.version.short_version
'0.12.0'

This is causing setup.py to fail.

@josef-pkt
Member

Thanks for reporting

What does pandas.version show with 0.12 ?

needs to be fixed for 0.5.1, and maybe made more robust.

@lemonlaug

Pandas does this:

from pandas.version import version as __version__

here:
https://github.com/pydata/pandas/blob/master/pandas/__init__.py#L21

Which means that pandas.__version__ also gives ''

I actually rooted around for a while trying to find pandas.version in that repository, and couldn't find it! pandas.version.__file__ in my locally installed version says it should be right there in /pandas, but it's not in github. Am I missing something obvious?

@josef-pkt
Member

How did you install pandas?
As far as I know (need to check), the version file is created automatically when creating a distribution file or when installing from a git checkout.
It's not in the repository. (same for statsmodels)

@josef-pkt
Member

https://github.com/pydata/pandas/blob/master/setup.py#L224
If pandas didn't write the correct version, then it's either a problem in pandas, or in the way you installed it.

The zip file of pandas 0.12 on pypi has version.py with version = '0.12.0'.
So this should be fine.

@lemonlaug

Yes, now I see how it's done in pandas' setup.py it looks likely this is something that was an idiosyncracy of my particular build and/or system.

Looks like they've been doing some work over there (https://github.com/pydata/pandas/commits/master/setup.py) so maybe this was an issue with my build that's since been resolved.

I updated to the latest build and now get

>>> pd.__version__
'0.12.0-384-g1f6f178'

which works fine with the pversion regex in statsmodels' setup.py.

Sorry for the false alarm!

@lemonlaug lemonlaug closed this Sep 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment