6 ms·
Why should it generate a deb file? How is this useful on anything but Debian based systems? Why exe? How do you package libraries using this new tool you are e
by X-Istence 10y ago
Why should it generate a deb file? How is this useful on anything but Debian based systems?
Why exe? How do you package libraries using this new tool you are envisioning?
- sametmax 10y agoYou do package lib the same way as before, although cargo like dependency handling would be a nice thing. Especially for upgrades. But a good package manager should ALSO allow you to produce a: - a stand alone executable for most OS. - a standard package for major OS (msi, deb, snap, rpm, dmg, etc). Doing that right now with Python requires you to setup stuff like nuikta and the like. It works but it's much harder than it should be.
- snuxoll 10y agodebhelper pretty much automates the process of packaging any standard distutils or setuptools package, Red Hat distributions have templates for packaging Python libraries as well (and rpmdev-newspec python-mypackage will automatically generate an appropriate .spec file). Windows and OS X are always a pain in the ass, but that's more an issue of the platforms lacking in package management than anything else.
- sametmax 10y agoSee my point ? There is a way to do it, it's just a pain. Now pipenv centralize stuff we were doing anyway. We should have a tool to centralize those as well.
- snuxoll 10y agoI would hardly call it a pain, it takes me all of 3 minutes to write a .spec for most python packages and from there it's basically 'tito release'. Sure, if I wanted to package for debian-based distributions it'd take a little more time, but it's worth it to make a quality package that a distribution itself can decide to pick up (packagers love other people doing the work for them, though they won't refuse doing it themselves) with minimal effort.
- sametmax 10y ago3 minutes because you know how.
- snuxoll 10y agoAnd it took me all of 60 minutes to learn, packaging isn't anywhere near as hard as people make it out to be. If you can use a build system of your choosing to build and test your project, you can learn how to write an rpmspec or debian control file in under an hour.
- sametmax 10y agoIt took me months to learn the best practices to create a clean Python package. And nothing is particularly difficult. Just information to gather and sort out. Given deb/rpm are old systems with a lot of legacy, I seriously doubt your 60 minutes claim, even if it's infinity better than Python status quo. Which I doubt as well since all GNU standard are usually a spaghetti of past requirements mixed with FOSS politics.
- deleted 10y ago[deleted]
- snuxoll 10y agoMaking a typical python package for Fedora or EL: Do you have a setup.py? No, then it's not going to be on PyPi anyway so ignore the rest of this since you'll need to figure out how to package this special snowflake. 0. Run `yum install -y rpmdevtools mock` 1. Run `rpmdev-newspec python-mypackage`. 2. Run `python setup.py sdist` 3. Modify the .spec as appropriate to add dependencies the package requires as well as set the version correctly. 4. Run `mock -r fedora-25-x86_64 --buildsprm python-mypackage.spec` 5. Run `mock -r fedora-25-x86_64 --rebuild python-mypackage.f25.src.rpm` Done, there's your RPM, debian packaging is roughly as simple (I'm less a fan because of how they try to fudge a Makefile into an adequate tool for package building, but hey, most everything can be built automatically by dh so the average makefile is ~3 lines). The biggest problem with learning this is simply finding the right documentation, Fedora has some pretty great guides for new packagers on the wiki.