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

Add needs_nox parsing to specify minimum version #99

Closed
dhermes opened this issue Aug 22, 2018 · 7 comments · Fixed by #388
Closed

Add needs_nox parsing to specify minimum version #99

dhermes opened this issue Aug 22, 2018 · 7 comments · Fixed by #388

Comments

@dhermes
Copy link
Collaborator

dhermes commented Aug 22, 2018

The current switch from 0.19.1 to >= 2018 will probably cause some breakage and it may be useful to specify

needs_nox = "2018.7.31"

much in the same way Sphinx supports a

needs_sphinx = "1.0"
@dhermes dhermes changed the title Add needs_nox parsing to Specify minimum version Add needs_nox parsing to specify minimum version Aug 22, 2018
@theacodes
Copy link
Collaborator

Where does needs_nox need to go?

@dhermes
Copy link
Collaborator Author

dhermes commented Aug 22, 2018

In nox.py; needs_sphinx goes in docs/conf.py. (Maybe NEEDS_NOX to be PEP8 friendly?)

@theacodes
Copy link
Collaborator

Interesting. What would be our behavior if the version wasn't satisfied?

(Also, keep in mind I'm planning on s/nox.py/noxfile.py so we can support python -m nox).

@dhermes
Copy link
Collaborator Author

dhermes commented Aug 22, 2018

What would be our behavior if the version wasn't satisfied?

Similar to what Sphinx does? At c64cc8e, the diff

diff --git a/docs/conf.py b/docs/conf.py
index ab3d6ac..bd8d482 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -28,7 +28,7 @@ sys.path.insert(0, os.path.abspath('.'))
 # -- General configuration ------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+needs_sphinx = '1.8.0'
 
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

yields the following

$ nox -s docs
...
nox > cd docs
nox > sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v1.6.2
making output directory...

Sphinx version error:
This project needs at least Sphinx v1.8.0 and therefore cannot be built with this version.
nox > Command sphinx-build -b html -d _build/doctrees . _build/html failed with exit code 1
nox > Session docs failed.

(Also, keep in mind I'm planning on s/nox.py/noxfile.py so we can support python -m nox).

Yay!

@theacodes
Copy link
Collaborator

Sounds reasonable.

@cjolowicz
Copy link
Collaborator

I'd be interested in picking this up.

@theacodes
Copy link
Collaborator

theacodes commented Feb 15, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants