Jump to content

Python 'pyupdater' Feedback


T3hGamerDK
 Share

Recommended Posts

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

"scripts" [OPTIONS] .. [TARGETS]

NOTE: So far I don't know how to print with colors on Windows, with the standard library.

update.py:

PyUpdater_update.py.png

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:

PyUpdater_backup.png

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:

{
    "name":     "DND",
    "tarfile":  "DND.tar.bz2",
    "instdir":  "projects#:ossep#DND",
    "depend":[
        "src#:ossep#lua"
    ]
}

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)

http://dl.dropbox.com/u/5579836/Pic/PyUpdater/PyUpdater_installscript_lua.png

Any feedback on this project would be nice :)

Here's a link! (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)

Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...