Old migration and modernization guide ===================================== Migration info for the old core package ======================================= Migrating to ll-core 0.3 ------------------------ Changes to namespaces --------------------- Functions will no longer will turned into staticmethods automatically, so you have to decorate them yourself. Migration info for ll-make ========================== Migrating to ll-make 1.0 ------------------------ Targets now have four action chains instead of one, so you have to rewrite your Target constructors. How the new call looks depends on the target itself. For example a simple copy operation might look like this: source = make.FileTarget(project, "foo", readaction=make.ReadAction()) target = make.FileTarget(project, "bar", convertaction=make.SelectMainAction(), writeaction=make.WriteAction()) target.dependOn(make.MainDep, source) Importing modules from other modules can now be done like this: from ll import make foo = make.currentproject["build/foo.py"].getdata() Furthermore if build/foo.py itself is generated by other actions, these actions will be executed before build/foo.py is imported. For this to work you need to use the correct action chains for your target: srcfoo = make.PythonTarget( project, "src/foo.py", readaction=make.ReadAction() ) buildfoo = make.PythonTarget( project, "build/foo.py", cache=True, convertaction=make.SelectMainAction()+make.WriteAction()+make.ImportAction()+make.UseModuleAction(), readaction=make.ImportAction()+make.UseModuleAction(), useaction=make.UseModuleAction() ) buildfoo.dependOn(make.MainDep, srcfoo) Migrating to ll-make 0.26 ------------------------- All Target constructors expect to be passed one Action instance only now, so instead of: t = make.FileTarget(project, id, action1, action2, action3) you should use: t = make.FileTarget(project, id, action=action1+action2+action3) Adding targets will create an appropriate ChainedAction object from the added actions. Migrating to ll-make 0.23 ------------------------- A class variable name in an action class will be ignored now. You have to implement a method desc (and might implement fulldesc to give a longer description). Migrating to ll-make 0.17 ------------------------- OracleTarget has been renamed to DBTarget. Migrating to ll-make 0.15 ------------------------- The environment variable MAKE_REPRANSI has been renamed to LL_MAKE_REPRANSI. Migrating to ll-make 0.14 ------------------------- The way actions are handled has changed completely. Instead of a single action that loads the input, does something and saves to output, each of these steps is done by a separate action. XIST transformations will now look something like this: from ll import make p = make.Project() t0 = make.XISTTarget(p, url.File("foo.htmlxsc")) t1 = make.XISTTarget(p, url.File("../install/foo.html", make.ReadAction(), make.XISTParseAction(base=url.File("root:foo.html")), make.XISTConvertAction(), make.XISTPublishAction( publisher=publishers.Publisher(encoding="us-ascii"), base=url.File("root:foo.html") ), make.WriteAction(), make.ModeAction(0644) ) t1.dependOn(make.MainDep, t0) Several Target methods have been renamed: sources has been renamed to inputs. targets has been renamed to outputs. Several related methods and options have been renamed too. The output during the build has changed. Instead of newer sources, the main sources will always be displayed now. The options controlling the output during the build have beed changed and joined into one option, where letters in the option value switch certain output on and off. For more info simply invoke the build script with the option --help. Migrating to ll-make 0.12 ------------------------- make has been updated for XIST 2.4: Parsing and publishing XIST files is now no longer the job of the XISTAction class itself, but is done through the attributes parser and publisher of the XISTTarget object, which must be an XIST parser and XIST publisher respectively. Migrating to ll-make 0.8 ------------------------ All dictionary access method now try the literal id first, and if it's a string, they will retry with an URL and an absolute URL. So now you can no longer have a phony target and a file target with the same name (which shouldn't be a problem anyway, because a file target should include the full path). Migrating to ll-make 0.6 ------------------------ The Target methods sources and targets have been changed, so that they return the source and target Targets instead of the dependency objects. This should be more convenient, because in most cases the targets are needed anyway. The old functionality is available through the new methods sourcedeps and targetdeps. If you've defined your own action classes you'll probably have to update them. The same change has been made for the method newerSources (and the method name has been made lowercase). So newersources will return a list of Targets and newersourcedeps will return the list of dependencies accordingly.