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

Changed to setuptools to use 2to3. #27

Merged
merged 1 commit into from Feb 19, 2014
Merged

Changed to setuptools to use 2to3. #27

merged 1 commit into from Feb 19, 2014

Conversation

ocefpaf
Copy link
Contributor

@ocefpaf ocefpaf commented Feb 5, 2014

Hi, I'm packaging windspharm for OpenSUSE 13.1 and, because this OpenSUSE release uses python3 as default, I made two simple changes in your setup.py.

Those changes to allow for a py3k package and they should not break anything for python2 (I tested only with python 2.7).

-Filipe

ps: Thanks for windspharm

@ajdawson
Copy link
Owner

ajdawson commented Feb 5, 2014

Hi Filipe, thanks for the PR. This switches to using setuptools. I'm not too familiar with this, can you explain what other effects this might have?

@ajdawson ajdawson self-assigned this Feb 5, 2014
@ajdawson
Copy link
Owner

ajdawson commented Feb 5, 2014

Also you'd need a Python3 version of pyspharm in order for this to work. That might be a little more tricky...

@ocefpaf
Copy link
Contributor Author

ocefpaf commented Feb 5, 2014

It should not have any side-effect besides adding setuptools as a dependency.

I got this approach from here, but I'm using setuptools instead of distribute because of this.

I'm not entirely sure if the switch use_2to3=True fails with distutils.core. I will test it here and, if you think it is more appropriate, send another PR.

ps: pyspharm is already py3k and packaged here

@ajdawson
Copy link
Owner

ajdawson commented Feb 5, 2014

It should not have any side-effect besides adding setuptools as a dependency.
I got this approach from here, but I'm using setuptools instead of distribute because of this.

OK I'm satisfied with this.

I'm not entirely sure if the switch use_2to3=True fails with distutils.core. I will test it here and, if you think it is more appropriate, send another PR.

I think it should be OK

ps: pyspharm is already py3k and packaged here

So an OpenSuse specific package? I'd like to make sure users on other OSes can use windspharm on Python3 too, but I just tried modifying pyspharm to build on Python3 and it seems trivial so I'm happy that this can be done relatively easily.

@ajdawson
Copy link
Owner

ajdawson commented Feb 5, 2014

The tests will currently not pass on Python3 I don't think, although this is mostly due to errors on my part (so thanks I guess!). I'll need to make a few modifications before this can be merged. Ideally I'd like to modify the test suite somewhat since it is currently having issues. Basically, if you run the tests with python3 it tries to use the source code that is not modified by 2to3 yet...

Are you working on a packaging deadline for OpenSuse? If so let me know and I'll try and get the necessary work done as quickly as I can.

@ocefpaf
Copy link
Contributor Author

ocefpaf commented Feb 5, 2014

No deadline since it already packaged :-)

I just converted your examples (rws_example.py and sfvp_example.py) to ipython notebook and forgot about the tests! Sorry.

What is your python2 goal? 2.4 to 2.7? I can help with that.

@ajdawson
Copy link
Owner

ajdawson commented Feb 5, 2014

I've made an experimental branch that uses six instead of 2to3, so that a single code base can be used (forgot to install six in the CI system though so the tests will fail 😒). If this works I think I'd prefer to use six rather than 2to3, then the testing problems disappear and bugs may be a bit more obvious and easier to fix in future.

What is your python2 goal? 2.4 to 2.7? I can help with that.

I'm not interested in supporting anything less than 2.6, ideally just 2.7 I think. It'd be nice to support 3.3 also, but I'm concerned about users needing to mess with pyspharm themselves in order to get things up and running. I think I'd be happy to add support for 3.3 to the codebase without making a specific mention of 3.3 support in the documentation. That way I won't mislead users into thinking we are fully 3.3 compatible, but for packagers like yourself that hard work is done provided you have access to a 3.3 compatible build of pyspharm.

@ocefpaf
Copy link
Contributor Author

ocefpaf commented Feb 5, 2014

I do agree that six is a better way. Let's close this PR then?

Thanks!

@ajdawson
Copy link
Owner

ajdawson commented Feb 5, 2014

I'll keep it open until #28 is confirmed working and good.

@ajdawson
Copy link
Owner

ajdawson commented Feb 5, 2014

By the way, I really appreciate you packaging windspharm for OpenSuse @ocefpaf. It is great to know that people really do use it! It is hard to tell if it is just me using my software or if others use it too!

@ocefpaf
Copy link
Contributor Author

ocefpaf commented Feb 6, 2014

My goal is to create a VM with up-to-date software for Atmospheric and Ocean Sciences that I can use with my students. I also packaged your eofs module. (Which, by the way, is on my list for a py3k review ;-).

Thanks for those packages.

@ajdawson ajdawson merged commit e6b5d67 into ajdawson:master Feb 19, 2014
@ocefpaf ocefpaf deleted the py3k branch February 19, 2014 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants