Skip to content

Temporary fix for #1112 - #1116

Merged
embray merged 2 commits into
astropy:masterfrom
embray:issue-1112-temp
May 20, 2013
Merged

embray merged 2 commits into
astropy:masterfrom
embray:issue-1112-temp

Conversation

@embray

@embray embray commented May 20, 2013

Copy link
Copy Markdown
Member

This is the temporary fix discussed in #1112 that gets around the issue by simply including the (small) generated files in the repository for now.

This includes the code for regenerating the files if the grammars for the parsers ever change, for example. Though in order to regenerate these files it's necessary for the developer to delete the old ones first.

This solution is mostly for use in the v0.2.x branch so that we can get this fixed and get 0.2.2 released. #1112 should remain open so we can work on a better long-term solution.

embray added 2 commits May 19, 2013 14:24
…hen running 'astropy.test()' py.test creates this .cache directory. I normally just run setup.py test so I didn't notice this before.
…s to the repository so we don't have to worry about whether or not they get installed. Take code for generating them out of the setup_package modules. Later we can worry about details of how to generate these, (or at least make it easy to regenerate if any changes are made to the parsers).
@mdboom

mdboom commented May 20, 2013

Copy link
Copy Markdown
Contributor

This seems like a fine solution.

I think the a good and simple long term solution (I can also think of good and complex long term solutions) would be to:

  1. If we're in build mode, never import the file, always generate it. Make sure the setup_package.py files import and instantiate enough to get the parser files generated.
  2. If we're not in build mode, always import the file, and raise an ImportError if it's missing.

That sort of fits in with how other things (Cython files, for example) work.

@embray

embray commented May 20, 2013

Copy link
Copy Markdown
Member Author

Yeah, I agree with this in general. The problem right now is that you can't 'generate' it in build mode without importing those modules, and that won't work on Python 3. Not unless this is a special step that only occurs after the build_py step and the 2to3'd files have been built. I guess that could be done, but it seems suboptimal.

@embray

embray commented May 20, 2013

Copy link
Copy Markdown
Member Author

Alright, with Travis passing I'm going to go ahead and merge this. Need to get in one more round of test builds on Jenkins then we'll finally be good to move forward with the release I think.

embray added a commit that referenced this pull request May 20, 2013
@embray
embray merged commit fb63ec8 into astropy:master May 20, 2013
@embray
embray deleted the issue-1112-temp branch May 20, 2013 21:49
embray added a commit that referenced this pull request May 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants