[AstroPy] ANN: Astropy v0.4 released

Derek Homeier derek at astro.physik.uni-goettingen.de
Fri Jul 18 09:33:59 EDT 2014


Hi Thomas,

>> I had a look at the new release and actually ran into a problem right away building it on OS X 10.9:
>> File "/scratch.noindex/fink.build/astropy-py34-0.4-1/astropy-0.4/ah_bootstrap.py", line 435, in _check_submodule_using_git
>>    stderr = stderr.decode(stdio_encoding)
>> TypeError: decode() argument 1 must be str, not None
> 
> We've got a known issue for the issue of incorrectly set environment
> variables (such as in the MacOS X terminal):
> 
> 
> http://docs.astropy.org/en/stable/known_issues.html#utf-8-locale-error-on-macos-x
> 
> I've now opened a pull request to add other errors such as the one above
> which are due to the same issue:
> 
>  https://github.com/astropy/astropy/pull/2760
> 
> Erik B. has also been working on a workaround that will try and get
> around issues of misconfigured locale variables. In the mean time, it
> makes sense to set these correctly as shown in the 'known issue' above,
> since this is an error that can occur with other packages, not just astropy.
> 
thanks indeed, confirms more or less my suspicions.
However in the case of the Fink build it was not the mangled LC_CTYPE from Terminal, but having no locale
settings at all, i.e. locale.getdefaultlocale() returning (None, None) rather than ValueError.
Forwarded this to the Fink developers’ list, but I think LC_* and LANG being all unset should be something
the setup ought to be able to handle, so this might remain just a temporary fix for astropy.

I could track the Python3.2/Python3.3 issues
>> 
>>  File "setup.py", line 8, in <module>
>>    import ah_bootstrap
>>  File "/scratch.noindex/fink.build/astropy-py33-0.4-1/astropy-0.4/ah_bootstrap.py", line 716, in <module>
>>    _main()
>>  File "/scratch.noindex/fink.build/astropy-py33-0.4-1/astropy-0.4/ah_bootstrap.py", line 713, in _main
>>    use_astropy_helpers(**kwargs)
>>  File "/scratch.noindex/fink.build/astropy-py33-0.4-1/astropy-0.4/ah_bootstrap.py", line 245, in use_astropy_helpers
>>    upgrade = _do_upgrade(dist, index_url)
>>  File "/scratch.noindex/fink.build/astropy-py33-0.4-1/astropy-0.4/ah_bootstrap.py", line 341, in _do_upgrade
>>    package_index = PackageIndex(index_url=index_url)
>>  File "/sw/lib/python3.3/site-packages/setuptools/package_index.py", line 269, in __init__
>>    Environment.__init__(self,*args,**kw)
>>  File "/sw/lib/python3.3/site-packages/pkg_resources.py", line 799, in __init__
>>    self.scan(search_path)
>>  File "/sw/lib/python3.3/site-packages/pkg_resources.py", line 829, in scan
>>    self.add(dist)
>>  File "/sw/lib/python3.3/site-packages/pkg_resources.py", line 849, in add
>>    dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
>> TypeError: unorderable types: str() < NoneType()

down to a seemingly broken PackageIndex in their their setuptools.package_index, which always raises the above
error whether you pass it a valid URL or nothing at all, but it’s apparently a bit non-deterministic if the _do_upgrade
is called - or it generally is when building from the tar ball, but not from the git repo.
I could solve this by adding
auto_upgrade = False
to setup.cfg.
Can you think of any objections against this solution (generally I think we don’t want any automatic downloads etc.
within a package build)?

Cheers,
							Derek




More information about the AstroPy mailing list