You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix bug in failed configuration file generation warning #950
If I remove the decode for Python 3, I still get an error when generating the configuration file for an affiliated package. Running
python setup.py install --user
in the affiliated package template and with Python 3.2 gives:
generating default packagename.cfg file
Generation of default configuration item failed! Stdout and stderr are shown below.
Stdout:
Stderr:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Volumes/Raptor/Library/Python/3.2/lib/python/site-packages/astropy-0.3.dev3723-py3.2-macosx-10.8-x86_64.egg/astropy/config/configuration.py", line 627, in generate_all_config_items
package = get_loader(pkgornm).load_module(pkgornm)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/pkgutil.py", line 243, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/Volumes/Raptor/Dropbox/Code/development/Astropy/package-template/build/lib.macosx-10.8-x86_64-3.2/packagename/__init__.py", line 116, in <module>
config.configuration.update_default_config(__package__, config_dir)
File "/Volumes/Raptor/Library/Python/3.2/lib/python/site-packages/astropy-0.3.dev3723-py3.2-macosx-10.8-x86_64.egg/astropy/config/configuration.py", line 688, in update_default_config
if os.path.exists(cfgfn):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/genericpath.py", line 18, in exists
os.stat(path)
TypeError: Can't convert 'NoneType' object to str implicitly
This is actually a big issue, because combined with the decode issue, it means that affiliated packages cannot be installed with Astropy 0.2.1! So 0.2.2 may have to come sooner rather than later once this is fixed.
I'm not sure, but I think this wouldn't be a problem if the template package were using _ASTROPY_SETUP_ instead of _PACKAGE_SETUP_. I see no reason not to use the former in affiliated packages too.
@iguananaut - ah, I was wondering about that. I think that in that case I should change the package template to use _ASTROPY_SETUP_ - I didn't realize it would have implications at the time.
As for the original bug -- sorry, I had forgotten that setup_helpers.py is one of the files that doesn't get 2to3-d. I have a fix in #952. That doesn't address the affiliated package issue, though.
@embray Hello! am having the same issue and i have seen your comment about using ASTROPY_SETUP instead of PACKAGE_SETUP however i dont know how to change the template package settings to start using ASTROPY_SETUP. please advice.
Activity
astrofrog commentedon Apr 8, 2013
If I remove the
decodefor Python 3, I still get an error when generating the configuration file for an affiliated package. Runningin the affiliated package template and with Python 3.2 gives:
@eteq @iguananaut @mdboom - any ideas where this is coming from?
This is actually a big issue, because combined with the
decodeissue, it means that affiliated packages cannot be installed with Astropy 0.2.1! So 0.2.2 may have to come sooner rather than later once this is fixed.astrofrog commentedon Apr 8, 2013
The last error message affects Python 2.x and Python 3.x.
embray commentedon Apr 8, 2013
I'm not sure, but I think this wouldn't be a problem if the template package were using
_ASTROPY_SETUP_instead of_PACKAGE_SETUP_. I see no reason not to use the former in affiliated packages too.embray commentedon Apr 8, 2013
#867 might also be relevant here.
astrofrog commentedon Apr 8, 2013
@iguananaut - ah, I was wondering about that. I think that in that case I should change the package template to use
_ASTROPY_SETUP_- I didn't realize it would have implications at the time.mdboom commentedon Apr 8, 2013
As for the original bug -- sorry, I had forgotten that
setup_helpers.pyis one of the files that doesn't get2to3-d. I have a fix in #952. That doesn't address the affiliated package issue, though._PACKAGE_SETUP_ should be _ASTROPY_SETUP_ (as described in astropy/as…
_PACKAGE_SETUP_ should be _ASTROPY_SETUP_ (see astropy/astropy#950)
_PACKAGE_SETUP_ should be _ASTROPY_SETUP_ (see astropy/astropy#950)
_PACKAGE_SETUP_ should be _ASTROPY_SETUP_ (see astropy/astropy#950)
eteq commentedon Apr 15, 2013
So should we close this now, @astrofrog and @mdboom? Looks to me like #952 was supposed to fix it, right?
mdboom commentedon Apr 15, 2013
I think so. @astrofrog: as the OP, feel free to reopen if you discover it isn't resolved.
astrofrog commentedon Apr 15, 2013
@mdboom - ok, thanks! I think this all works for me now.
updated docs Makefile to reflect astropy
Merge package-template
ALL Package-Template comits
Initial commit of affiliated package template
Initial commit of affiliated package template
Initial commit of affiliated package template
Initial commit of affiliated package template
Add the affiliated package template
updated docs Makefile to reflect astropy
MjdMahasneh commentedon Sep 21, 2018
@embray Hello! am having the same issue and i have seen your comment about using ASTROPY_SETUP instead of PACKAGE_SETUP however i dont know how to change the template package settings to start using ASTROPY_SETUP. please advice.
pllim commentedon Sep 21, 2018
@MjdMahasneh , if you have problem with the package template, please open an issue at https://github.com/astropy/package-template . Also, the template now uses
cookiecutter.