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

Doesn't work on py2 anymore.... #16

Closed
ChrisBarker-NOAA opened this issue Dec 18, 2018 · 8 comments · Fixed by #17
Closed

Doesn't work on py2 anymore.... #16

ChrisBarker-NOAA opened this issue Dec 18, 2018 · 8 comments · Fixed by #17

Comments

@ChrisBarker-NOAA
Copy link

nbsphinx version 0.4.* uses the "nonlocal" keyword -- and will not run on python2

This recipe is set to

noarch: python

So it is building for py2 and py3 -- apparently it will import in py2, and thus pass the tests, but not actually run.

The source setup.py has:

    'Programming Language :: Python',
    'Programming Language :: Python :: 3',

I can't remember how to suppress py2 building with noarch, but it can be done :-)

@kmuehlbauer
Copy link
Contributor

@ChrisBarker-NOAA Thanks for spotting this. I'll take care of this within the next two hours.

In noarch you can suppress py2k by specifying python >= 3.6 in the build/host/run sections. It is mentioned in the cf-docs somewhere.

@kmuehlbauer kmuehlbauer mentioned this issue Dec 18, 2018
5 tasks
@mgeier
Copy link

mgeier commented Dec 18, 2018

Thanks y'all for your packaging efforts!

I just want to confirm that nbsphinx is not meant to be used with Python 2.
In fact, Sphinx itself needs at least Python 3.5, so anything below that doesn't make sense for nbsphinx.

@kmuehlbauer
Copy link
Contributor

@mgeier Thanks for the confirmation. Hope that we have now fixed everything.

@mgeier
Copy link

mgeier commented Dec 18, 2018

I just realized that I've been releasing universal wheels up to now, but those should be Python-3-only, too, I guess.

This will take care of if for future releases: spatialaudio/nbsphinx#268

@ChrisBarker-NOAA
Copy link
Author

Hmm -- not really the place for it, but the tools (both wheel building and conda packages) really should make it hard, rather than easy, to do this! (this being accidentally making a py2 package for a code that does not support py2)

@mgeier
Copy link

mgeier commented Dec 18, 2018

@ChrisBarker-NOAA In this case it's actually my fault. I've added a setup.cfg file to automatically generate "universal" wheels mostly without thinking, because I've added the same thing to other modules before (which actually want to be "universal").

The default for bdist_wheel is to create non-universal wheels.

I don't know about the conda process.

@ChrisBarker-NOAA
Copy link
Author

The default for conda is to build both. "noarch" actually means no specific OS/processor architecture, AND no specific Python version :-(

@mgeier
Copy link

mgeier commented Jan 7, 2019

FYI, I'll re-enable Python 2 support in the next release, see spatialaudio/nbsphinx#274 and spatialaudio/nbsphinx#275.

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 a pull request may close this issue.

3 participants