Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building 0.6.0 #25

Closed
rsignell-usgs opened this issue Feb 20, 2014 · 13 comments
Closed

Building 0.6.0 #25

rsignell-usgs opened this issue Feb 20, 2014 · 13 comments

Comments

@rsignell-usgs
Copy link
Member

Ian Stokes from Continuum needed to remove this line from setup.py
| 3. I removed exactly one line from pyoos/setup/py:
|
| install_requires = reqs,
https://github.com/asascience-open/pyoos/blob/master/setup.py#L35

I get

  File "setup.py", line 7, in <module>
    from pyoos import __version__
ImportError: No module named pyoos

when I try to build on Wakari

@daf
Copy link
Member

daf commented Feb 20, 2014

@DanRamage had a near identical issue, but with paegan. Maybe he can explain?

Anyway, nothing's changed at all here from a packaging setup.

@DanRamage
Copy link

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

@daf
Copy link
Member

daf commented Feb 21, 2014

I'm on Python 2.7.6, OS X 10.9.1.

@rsignell-usgs
Copy link
Member Author

Python 2.7.6, Linux 64

@kwilcox
Copy link
Member

kwilcox commented Feb 23, 2014

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.

@rsignell-usgs
Copy link
Member Author

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:
2-23-2014 4-20-07 pm

And so I tried commenting out that one line in the `./pyoos/meta.yaml' file so that it looked like this:
2-23-2014 4-54-41 pm

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.

@rsignell-usgs
Copy link
Member Author

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)

@emiliom
Copy link
Contributor

emiliom commented Feb 23, 2014

@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.

@DanRamage
Copy link

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.

@kwilcox
Copy link
Member

kwilcox commented Feb 26, 2014

@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.

@DanRamage
Copy link

@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.

@ocefpaf
Copy link
Member

ocefpaf commented Nov 17, 2015

This is fixed in #49. Pyoos no longer import itself at build time.

@ocefpaf ocefpaf closed this as completed Nov 17, 2015
@ocefpaf
Copy link
Member

ocefpaf commented Nov 17, 2015

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.)

This issue was closed.
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

No branches or pull requests

6 participants