Closed rsignell-usgs closed 8 years ago
@DanRamage had a near identical issue, but with paegan. Maybe he can explain?
Anyway, nothing's changed at all here from a packaging setup.
Here's my google group post: As an FYI, during my clean/build/install I hit an error on paegan. I got an error of: "ImportError: cannot import name version" I noticed it was trying to access some python modules not in my virtualenv, but in the System directories. I'm running OS X. I used pip to uninstall then install paegan, and that worked.
Perhaps let's get people's environment info such as OS, python version, other to see if there is commonality?
Me: Python 2.7.1 OS X: 10.7.5
I'm on Python 2.7.6, OS X 10.9.1.
Python 2.7.6, Linux 64
I think there are two issues here. The first being Ian said he had to remove a line from setup.py to build. That line is just pulling the contents of requirements.txt file into setup.py. Easier than duplicating the requirements in two places. Not sure why this would ever error, but I've also never built anything on Wakari. Maybe Wakari doesn't meet one of the requirements?
The second issue is @rsignell-usgs and @DanRamage are having issues with import [paegan|pyoos].__version__
. A few versions ago I moved from putting the version directly in the setup.py file and including it in the __init__.py
file for each package. Both probably have multiple versions of pyoos or paegan installed, and when they install a new version, it is checking the old version for __version__
, which may not exist. Uninstalling all versions before installing a new version should fix this.
Kyle,
I went back and looked at the original message from the Continuum support system, and Ian actually said: " tweaked setup.py, removed "tests" from the testing regime". I wasn't quite sure what this meant, but the error I was having in Wakari when I typed "conda build pyoos" was this:
And so I tried commenting out that one line in the `./pyoos/meta.yaml' file so that it looked like this:
then the package built. So Wakari users can now just do:
conda install -c rsignell pyoos
to get pyoos and all it's dependencies installed.
I don't really know what I'm doing there in the meta.yaml
file. It would be great if either @kwilcox or @daf took a look at http://conda.pydata.org/docs/build.html and did it right. I pushed all my conda-recipes so far to https://github.com/ioos/conda-recipes, hoping that other IOOS folks might join in (@emiliom, nudge, nudge)
@rsignell-usgs, you already added me to the conda-recipes repo, so what's the nudge? Maybe I got added by default b/c someone who thought I was smarter and had more time than I do made me an admin a while ago ... I've never built a conda recipe, so you're the pro here. Also, for the last 3-4 months I've stayed away from trying to build paegan and pyoos on anything but a new, clean, finely controlled wakari env. As I reported on the pyoos list (https://groups.google.com/d/msg/pyoos/jX6SWm5ISyQ/ClWK5ZdU8LAJ), I was able to create a new Wakari env with pyoos 0.6, using the steps I've been following for a while (https://github.com/ioos/ipython-notebooks/blob/master/creating_wakari_environments.md). I tested it and life is good.
For my issue, are there any hard coded paths in the paegan setup? I'm not sure how doing a pip install differs from the pyoos build/install.
@DanRamage your issue can be resolved by uninstalling and re-installing the pyoos
and/or paegan
. It shouldn't happen in the future. Most of the conversation in this issue has revolved around building a Conda package for Pyoos which is an entirely different issue.
@kwilcox Yes I know how to resolve the issue as I posted above. I noticed that paegan's setup.py process when building/installing pyoos seemed to be trying to pull files from the OS X installed python directories and not using the virtualenv environment paths.
This is fixed in #49. Pyoos no longer import itself at build time.
Ping @daf remember your question here.?
This is the kind of confusion that happens when the module needs to import itself inside setup.py
. There are other patterns besides the one I used. The most common is to add a version.py
and call it via a execfile
inside setup.py
. (But I like the one I used better.)
https://github.com/asascience-open/pyoos/blob/master/setup.py#L35
I get
when I try to build on Wakari