PreTeXtBook / pretext-cli

Command line interface for quickly creating, authoring, and building PreTeXt documents.
https://pretextbook.org
GNU General Public License v3.0
17 stars 18 forks source link

Minimum python version 3.6 #2

Closed StevenClontz closed 3 years ago

StevenClontz commented 4 years ago

If I recall, rbeezer/mathbook Python scripts require 3.4+. Is that the same range we want to support? If so, I'll set up https://github.com/pyenv/pyenv for 3.4 to ensure things run (e.g. the tests we need to write) on 3.4.

oscarlevin commented 4 years ago

That sounds right.

From: Steven Clontz notifications@github.com Sent: Tuesday, June 2, 2020 10:04 AM To: StevenClontz/pretext.py pretext.py@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [External][StevenClontz/pretext.py] Minimum python version (#2)

If I recall, rbeezer/mathbook Python scripts require 3.4+. Is that the same range we want to support? If so, I'll set up https://github.com/pyenv/pyenvhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpyenv%2Fpyenv&data=02%7C01%7Coscar.levin%40unco.edu%7Cb1316603e24149bca89408d8070e7ff4%7Cb4dce27cd088445499652b59a23ea171%7C0%7C0%7C637267106141296953&sdata=UEwnAPyFY6K7eI7FlY7s3Kfysn4QewAdMvYeQrbYlDA%3D&reserved=0 for 3.4 to ensure things run (e.g. the tests we need to write) on 3.4.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FStevenClontz%2Fpretext.py%2Fissues%2F2&data=02%7C01%7Coscar.levin%40unco.edu%7Cb1316603e24149bca89408d8070e7ff4%7Cb4dce27cd088445499652b59a23ea171%7C0%7C0%7C637267106141296953&sdata=sAf9ecsBFA%2F%2F44%2BlCJonXa5%2FP1rwh4LlP7LBtTKh2VM%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABRUBFDN2IMX2LCBQSNY6XDRUUPFJANCNFSM4NQ3Q2FA&data=02%7C01%7Coscar.levin%40unco.edu%7Cb1316603e24149bca89408d8070e7ff4%7Cb4dce27cd088445499652b59a23ea171%7C0%7C0%7C637267106141306948&sdata=wS7DnFLgUC%2F15kiuhE90NVSSqHg34m2rWpl%2FfgV1ggU%3D&reserved=0. This message originated from outside UNC. Please use caution when opening attachments or following links. Do not enter your UNC credentials when prompted by external links.

StevenClontz commented 4 years ago

Since this post, I seem to recall reading in passing on pretext-dev that rbeezer/mathbook/pretext/pretext.py has at least one feature that requires Python 3.6+. Am I making this up @rbeezer?

rbeezer commented 4 years ago

subprocess.run() requires 3.6, iirc.

Nobody has complained yet. But some other variant from the subprocess module should be fine, so I intend to walk that one back.

On 7/1/20 7:36 PM, Steven Clontz wrote:

Since this post, I seem to recall reading in passing on pretext-dev that rbeezer/mathbook/pretext/pretext.py has at least one feature that requires Python 3.6+. Am I making this up @rbeezer https://github.com/rbeezer?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PreTeXtBook/pretext-cli/issues/2#issuecomment-652745086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOLM4SIK5JM77SCCSQXNNLRZPXBVANCNFSM4NQ3Q2FA.

StevenClontz commented 4 years ago

Looks like #41 would also require 3.6+ since Runestone does.

If in practice our users seem to have 3.6+ available, and if we're advocating a virtualenv workflow in some cases anyway, maybe just settling on support for 3.6+ makes sense.

Also, perhaps pretext-cli should be setting up virtualenv/Pipenv/Pyenv scaffolding upon pretext new. This would also address issues like #45 where pip-installed CLIs aren't available in PATH by default (since I think they would be available in a virtualenv regardless of platform). There's also https://github.com/pipxproject/pipx But these solutions might be circular: if I can't get pretext on a new user's PATH without extra configuration, and pipenv/pipx aren't in the standard library either, I'd have the same issue getting them on the user's PATH too. (Although pipx is brew installable on MacOS...)

rbeezer commented 3 years ago

Committed to 3.6, though practical minimum is 3.5 now.

See https://github.com/rbeezer/mathbook/issues/1479

StevenClontz commented 3 years ago

In 0466896cdaba6262f66f31c62959436e0553b884 I've documented pyenv/pipenv package management that fixes development with Python 3.6.12.

oscarlevin commented 3 years ago

I don't really understand what you did in the last commit, but trying the readme documentation failed. No file .python-version on the first step.

StevenClontz commented 3 years ago

That's my fault: it was gitignored. I'll fix it later this afternoon when I'm back at the desk

oscarlevin commented 3 years ago

I'll go ahead and close this and open a new issue to address the readme development documentation. Pyenv doesn't work on windows; there must be a simpler way to do this validation step.