News for hackers. Stuff that matters.
Re:What the Heck Is Pyproject.toml? by harikb on Wednesday April 01, 2020 @07:48PM (#22754783)
I teach Python to some middle school kids. Pip vs Pip3 and PYTHONPATH wasted entirety of two class sessions.

By the way, Python should go beyond Go. It should single binary the someone can install without root privileges. The fact that I have hundreds of Chromebooks at my school and I can’t use any of them - school IT, correctly, doesn’t want me mucking with advanced settings.

Re:What the Heck Is Pyproject.toml? by brettcannon on Wednesday April 01, 2020 @07:57PM (#22754845)
People would love to see that happen, but it requires time and effort from people to build such a solution. Some people are trying, e.g. https://pyoxidizer.readthedocs.io/ and https://briefcase.readthedocs.io/ as well as stalwarts like PyInstaller and such.

But as I said, it takes time and effort and there's only so much of that when it's being done by volunteers in their evenings and weekends.

And as an aside, I would suggest teaching them `python -m pip` over `pip3`: https://snarky.ca/why-you-should-use-python-m-pip/.

Re:What the Heck Is Pyproject.toml? by harikb on Thursday April 02, 2020 @12:48AM (#22756287)
Thanks for the link. About the lack of resources problem though, I have a few points to make.

I think one of the unfortunate things that happened is indeed the arrival of new languages. Go, Rust, Swift, whatever is taking away a bunch of senior developers to work on those. Even though Python is still "most wanted" and "most popular", imho that does not reflect the reality among senior developers who are capable of taking on large tasks like this.

Sometimes the frustration expressed by package management has more to do with build dependencies rather than the distribution itself. Like a library that has a C dependency. In this context, the world of Go is equally messy, when CGO is involved. Luckily in their case, most people do rewrite libraries in Pure Go.

Re:What the Heck Is Pyproject.toml? by judge2020 on Wednesday April 01, 2020 @11:39PM (#22756003)
Thanks for the links - pyoxidizer looks promising with some good docs and being built on rust (but it won't work with QT's PySide2 likely until the next major release[0]), while briefcase looks to have been tailored to "beeware" usage and is lacking any standalone usage information. Hoping both these work out, PyInstaller works but other options would be welcomed.

0: https://github.com/indygreg/PyOxidizer/issues/228#issuecomme...

Re:What the Heck Is Pyproject.toml? by j88439h84 on Thursday April 02, 2020 @12:31AM (#22756212)
I really hope the PSF can help the community move toward Poetry. It's a game changer relative to all the alternatives.
Re:What the Heck Is Pyproject.toml? by jedieaston on Wednesday April 01, 2020 @09:30PM (#22755399)
For that scenario (if you can’t use the Linux container on Chrome OS, which works even without flipping the devmode switch), repl.it is fantastic. It builds a fully working python (or C, or Java, or even a polyglot one that’s just Linux) environment, automatically deals with dependencies (if you type import pandas and it’s not installed, it gets installed), has synchronous collaboration and can even auto grade work with unit tests (at least, it was in beta last I checked). It’s the holy grail of learn- to-code software and it kicked butt in the class I used it in.
Re:What the Heck Is Pyproject.toml? by sauldcosta on Thursday April 02, 2020 @11:06AM (#22759841)
You and your students can get access to a few online coding tools designed to help with this via the GitHub Student Developer Pack and the GitHub Teacher Toolbox (https://education.github.com), all for free.

Our online coding tool (and entire course library) is included in the Pack. https://next.tech/github-students and https://next.tech/github-teachers if you'd like to take a look.

Re:What the Heck Is Pyproject.toml? by Zanni on Thursday April 02, 2020 @03:31AM (#22756956)
Have you tried PythonAnywhere? [1] Should be a good fit for Chromebooks, assuming you've got decent internet in your class room.

[1] https://www.pythonanywhere.com/details/education

Re:What the Heck Is Pyproject.toml? by zo1 on Thursday April 02, 2020 @08:55AM (#22758374)
If you're working with new/inexperienced developers on disparate and various systems, please use a proper IDE like PyCharm that holds a developer's hand along the way. I'm not saying this because of preference (which I'll admit I have), but from a practical perspective. I've seen it first-hand countless times when someone new comes to Python. Especially "bootcamp" style developers that think they can do everything in VSCode. Don't mess around with custom, hand-rolled setups, you'll waste so much time as you've experienced.
Re:What the Heck Is Pyproject.toml? by nicoburns on Thursday April 02, 2020 @05:34AM (#22757444)
You could consider teaching JavaScript is you want to use Chromebooks. They have built in support...
Re:What the Heck Is Pyproject.toml? by hermitdev on Thursday April 02, 2020 @01:19AM (#22756437)
One can easily install Python without root. You have to build from source and use the --prefix option to, say, install under $HOME. Also helpful to avoid the system Python which usually lags far behind on systems like RHEL.
Re:What the Heck Is Pyproject.toml? by thw0rted on Friday April 10, 2020 @04:42AM (#22831143)
> "easily"... "build from source"...

You think the school IT department won't let the GP install Python but will let them install a compiler toolchain? The benchmark for "easy" is you download one binary and run it in userspace. Add any additional steps and you can't use that word anymore.

Re:What the Heck Is Pyproject.toml? by lucasverra on Thursday April 02, 2020 @01:40AM (#22756524)
Why not just repl.it web ide ?
Re:What the Heck Is Pyproject.toml? by takeda on Thursday April 02, 2020 @01:16AM (#22756420)
It already has that, if you create setup.cfg you can generate wheel package which can be installed with all dependencies using a single command.