• Python3.1 'PyUpdater' feedback
    6 replies, posted
I've been working day-on/day-off on a little project written entirely in Python 3.1 I really liked the way that portage worked in Gentoo, and I had been having issues with keeping my package manager system cross platform (I wrote a simple system in bash). I decided: "Hey, why not try to replicate the way that it works on Gentoo, as a cross-platform system!" And so my journey began.. Although this system isn't as big or as perfect, stable or shiny as Gentoo's, it's certainly heading in the right direction. Currently, it relies entirely on the standard libraries in Python, and works on both Windows and Linux (tested). It consists of several elements, all of which are (somewhat) described in the README.html file. I'm using JSON setting files (.json) instead of XML files, as this is much faster and easier to do. It has a few "modules" which can be run as scripts like [code] "scripts" [OPTIONS] .. [TARGETS] [/code] [b]NOTE[/b]: So far I don't know how to print with colors on Windows, with the standard library. update.py: [img]http://dl.dropbox.com/u/5579836/Pic/PyUpdater/PyUpdater_update.py.png[/img] For each package downloaded (tar.gz or tar.bz2) a sha1 hash is used and saved as "tarfile".checksum. I'm not using version numbers here, if there's a new version, we pull it. backup.py: [img]http://dl.dropbox.com/u/5579836/Pic/PyUpdater/PyUpdater_backup.png[/img] There's also clean.py, which'll 'clean up' (wipe) either a selected package, or (if "all" is specified) checksums, working directory, backups and .pyc files) And compile.py, which'll look for either Makefiles or CMakeLists.txt files within' the install directory of the packages. There's still a lot of information missing in the README.html, and several features (hence the WIP tag) It reads packages in the form of: [code] { "name": "DND", "tarfile": "DND.tar.bz2", "instdir": "projects#:ossep#DND", "depend":[ "src#:ossep#lua" ] } [/code] The "tarfile" tag is downloaded by adding it to the settings file "mirror" tag (mirror+tarfile), unless the tarfile tag starts with http(s) or ftp. The "instdir" tag is where the project will be extracted to, and the #:ossep# is a variable. Currently it's the only variable supported :P "depend" is dependencies. MUST be another package (minus .json) If the dependencies is NOT installed, it'll be installed. Oh! And I forgot to mention the "installscript" tag! It's only ("officially") used in the src/lua.json (Lua 5.2 alpha sources) package. Install Scripts are just executables being run once everything is extracted. With the Lua package, I'm using it for compiling everything when it's ready, like this: (media tagged for longness) [media]http://dl.dropbox.com/u/5579836/Pic/PyUpdater/PyUpdater_installscript_lua.png[/media] Any feedback on this project would be nice :) Here's a [url="http://dl.dropbox.com/u/5579836/Code/pyUpdater.tar.bz2"]link[/url]! (Note: This link is ALWAYS the latest version I've uploaded) I decided to write this in Python 3.1 not only because it's cross-platform and easy to use, but also because others can give feedback on it quite fast, and learn from it as well (Although the code isn't well-commented)
You explained the details but you didn't explain what its purpose is
[QUOTE=TerabyteS;27711329]You explained the details but you didn't explain what its purpose is[/QUOTE] That's true, I'll put that in the OP.. I really liked the way that portage worked in Gentoo, and I had been having issues with keeping my package manager system cross platform (I wrote a simple system in bash). I decided: "Hey, why not try to replicate the way that it works on Gentoo, as a cross-platform system!" And so my journey began..
Using dropbox for source control. Heh
[QUOTE=Venice Queen;27718016]Using dropbox for source control. Heh[/QUOTE] As I wrote in both the OP and the README.html, you can use whatever http(s) or ftp service you like.
[QUOTE=T3hGamerDK;27718161]As I wrote in both the OP and the README.html, you can use whatever http(s) or ftp service you like.[/QUOTE] [quote]Here's a link! (Note: This link is ALWAYS the latest version I've uploaded)[/quote]
Yeah, I use dropbox for my projects. Haven't gotten around to a more "reliable" way, because I wanted it to work the same way that Gentoo's portage does. On a side note: I've added another package (called PyUpdater-docs) containing a Sphinx generated "readme". It just seemed neater. I'm also working on adding a system for checking what's currently installed and what isn't. WIP so far, but working on it!
Sorry, you need to Log In to post a reply to this thread.