Skip to content

Instantly share code, notes, and snippets.

View fuzzy's full-sized avatar

Mike 'Fuzzy' Partin fuzzy

View GitHub Profile
/*
This file of course builds nothing, but is here to show you how a specfile
is written. It's pretty standard fare, nothing crazy or wildly different from
things like a rpm specfiles, or homebrew recipes (altho not in ruby).
Some rules to keep in mind:
1) All options are required.
2) Any value you have defined below, is available as a macro, there are other
@fuzzy
fuzzy / deps.py
Last active April 8, 2021 22:19
dependancy resolution, and poor mans circular dependancy detection.
#!/usr/bin/env python
import sys
class P(object):
def __init__(self, pkg, requires):
self.requires = requires
self.pkg = pkg
self.Required = 0
{
"packager": "Mike 'Fuzzy' Partin",
"email": "[email protected]",
"homepage": "http://www.python.org",
"package": "vim",
"version": "7.4.1724",
"license": "http://www.opensource.org/licenses/mit-license.html",
"source": "http://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2",
"patches": [
"http://ftp.vim.org/pub/vim/patches/7.4/7.4.001",
@fuzzy
fuzzy / gist:25262ee968b8cd07d78a5ff98e444474
Created April 8, 2016 20:00
playing with merging python dictionaries, non destructively
# This works fine
>>> a = {'foo': 'bar'}
>>> b = {'baz': 'qux'}
>>> c = a.copy()
>>> c.update(b)
>>> c
{'foo': 'bar', 'baz': 'qux'}
# This starts to show us some issues
{
"packager": "Mike 'Fuzzy' Partin",
"email": "[email protected]",
"homepage": "http://www.python.org",
"package": "slang",
"version": "2.3.0",
"license": "http://www.opensource.org/licenses/mit-license.html",
"source": "http://www.jedsoft.org/releases/slang/slang-2.3.0.tar.bz2"
}
{
"packager": "Mike 'Fuzzy' Partin",
"email": "[email protected]",
"homepage": "http://www.",
"package": "Nim",
"version": "devel",
"license": "http://www.opensource.org/licenses/mit-license.html",
"source": "https://github.com/nim-lang/Nim/archive/%version%.zip",
"configure": {
Usage: mvm command <opt> <...> <PACKAGESPEC>
disable Disable usage of a given package.
-g Disable in the global profile.
enable Enable a given package.
-g Enable in the global profile.
help Show this help screen.
list List installed or available packages.
-a Show available packages.
version Show the version.
{
"help": {
"help": "Show this help screen.",
"handler": "showHelp"
},
"version": {
"help": "Show the version.",
"handler": "showVersion"
},
"list": {
def _argParse(self, args):
if len(args) > 1:
if args[1] not in self.config.arguments.keys():
self.showHelp()
else:
# We really don't need the program name
args.pop(0)
# ok, we have a valid command, now let's see if we
# ./build.sh
npm http GET https://registry.npmjs.org/less
npm http 200 https://registry.npmjs.org/less
npm http GET https://registry.npmjs.org/less/-/less-2.6.0.tgz
npm http 200 https://registry.npmjs.org/less/-/less-2.6.0.tgz
npm http GET https://registry.npmjs.org/errno
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/image-size
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/mkdirp