public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:rewrite-on-master commit in: /, doc/
@ 2013-11-22  7:13 Brian Dolbec
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2013-11-22  7:13 UTC (permalink / raw
  To: gentoo-commits

commit:     477cff3cb0fc6fb11f889b63c2dd7eb45c7b5e07
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  5 17:39:48 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Nov 22 06:02:34 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=477cff3c

Make testpath automagic via dwfeed's tweak

Update HOWTO to include the testpath use.

---
 doc/HOWTO.txt | 10 ++++++++--
 testpath      |  4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/doc/HOWTO.txt b/doc/HOWTO.txt
index 5717f80..178f7fc 100644
--- a/doc/HOWTO.txt
+++ b/doc/HOWTO.txt
@@ -208,9 +208,15 @@ Running catalyst from a Git checkout
 
 If you're developing catalyst, you'll want to test your altered
 version.  An easy way to run it without reinstalling is to setup a
-local configuration file and run:
+local configuration file.  The checkout also includes a testpath file
+which when sourced adds it's bin/ to PATH and it's checkout dir to
+PYTHONPATH.  That terminal will then use the checkout bin/catalyst and
+the checkout's python modules.
 
-    # ./catalyst -c catalyst.conf -f path/to/your.spec
+cd into the checkout directory and run:
+
+    # source ./testpath
+    # catalyst -c catalyst.conf -f path/to/your.spec
 
 The local configuration file can use all the defaults except for
 `sharedir`, which you should change to point to your development

diff --git a/testpath b/testpath
index 9fd7e45..0eed300 100644
--- a/testpath
+++ b/testpath
@@ -13,6 +13,6 @@
 #
 # catalyst -c ./test.conf -p  -f stage1.spec
 
-export PATH="/home/brian/Dev/git/catalyst/bin:${PATH}"
+export PATH="$(dirname $BASH_SOURCE[0])/bin:${PATH}"
 
-export PYTHONPATH="/home/brian/Dev/git/catalyst/:${PYTHONPATH}"
+export PYTHONPATH="$(dirname $BASH_SOURCE[0]):${PYTHONPATH}"


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/catalyst:rewrite-on-master commit in: /, doc/
@ 2013-11-22  7:13 Brian Dolbec
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2013-11-22  7:13 UTC (permalink / raw
  To: gentoo-commits

commit:     446aeeb00f0d4d8d62ea0801454283de9636a6c2
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  5 17:38:44 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Nov 22 06:02:24 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=446aeeb0

update doc scripts for the new structure

---
 Makefile                           |  6 +++---
 doc/make_subarch_table_guidexml.py |  5 ++++-
 doc/make_target_table.py           | 13 +++++++------
 3 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index 98accbe..52e0297 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 # Copyright (C) 2011 Sebastian Pipping <sebastian@pipping.org>
 # Licensed under GPL v2 or later
 
-PACKAGE_VERSION = `fgrep '__version__=' catalyst | sed 's|^__version__="\(.*\)"$$|\1|'`
+#PACKAGE_VERSION = `fgrep '__version__=' catalyst | sed 's|^__version__="\(.*\)"$$|\1|'`
 MAN_PAGE_SOURCES = $(wildcard doc/*.?.txt)
 MAN_PAGES = $(patsubst doc/%.txt,files/%,$(MAN_PAGE_SOURCES))
 MAN_PAGE_INCLUDES = doc/subarches.generated.txt doc/targets.generated.txt
@@ -24,10 +24,10 @@ $(MAN_PAGES): files/%: doc/%.txt doc/asciidoc.conf Makefile catalyst
 files/catalyst.1: doc/subarches.generated.txt
 files/catalyst-spec.5: doc/subarches.generated.txt doc/targets.generated.txt
 
-doc/subarches.generated.txt: $(wildcard arch/*.py) doc/make_subarch_table_guidexml.py
+doc/subarches.generated.txt: $(wildcard catalyst/arch/*.py) doc/make_subarch_table_guidexml.py
 	./doc/make_subarch_table_guidexml.py
 
-doc/targets.generated.txt: doc/make_target_table.py $(wildcard modules/*_target.py)
+doc/targets.generated.txt: doc/make_target_table.py $(wildcard catalyst/targets/*.py)
 	"./$<" > "$@"
 
 $(DOCS): files/%.html: doc/%.txt doc/asciidoc.conf Makefile

diff --git a/doc/make_subarch_table_guidexml.py b/doc/make_subarch_table_guidexml.py
index 16c8776..54e0a4a 100755
--- a/doc/make_subarch_table_guidexml.py
+++ b/doc/make_subarch_table_guidexml.py
@@ -1,5 +1,6 @@
 #! /usr/bin/env python2
 # Copyright (C) 2011 Sebastian Pipping <sebastian@pipping.org>
+# Copyright (C) 2013 Brian dolbec <dolsen@gentoo.org>
 # Licensed under GPL v2 or later
 
 
@@ -102,10 +103,12 @@ if __name__ == '__main__':
 	subarch_title_to_subarch_id = dict()
 	subarch_id_to_pattern_arch_genericrch_id = dict()
 
-	for (dirpath, dirnames, filenames) in os.walk('arch'):
+	for (dirpath, dirnames, filenames) in os.walk('catalyst/arch'):
 		for _fn in filenames:
 			if not _fn.endswith('.py'):
 				continue
+			if _fn == '__init__.py':
+				continue
 
 			fn = os.path.join(dirpath, _fn)
 			handle_file(fn, subarch_title_to_subarch_id, subarch_id_to_pattern_arch_genericrch_id)

diff --git a/doc/make_target_table.py b/doc/make_target_table.py
index ad4d292..9e7ebe8 100755
--- a/doc/make_target_table.py
+++ b/doc/make_target_table.py
@@ -1,16 +1,17 @@
 #!/usr/bin/env python2
 # Copyright (C) 2012 W. Trevor King <wking@drexel.edu>
 # Copyright (C) 2012 Sebastian Pipping <sebastian@pipping.org>
+# Copyright (C) 2013 Brian dolbec <dolsen@gentoo.org>
 # Licensed under GPL v2 or later
 
 # This script should be run from the root of the catalyst source.
+# source the testpath file then run "doc/make_target_table.py"
+
 
 from __future__ import print_function
 
 import sys as _sys
 
-_sys.path.insert(0, 'modules')  # so we can find the `catalyst` module
-
 import glob
 import re
 
@@ -20,15 +21,15 @@ def key_netboot_before_netboot2((target_name, module)):
 
 
 if __name__ == '__main__':
-	extractor = re.compile('^modules/(([^ ]+)_target).py$')
+	extractor = re.compile('^catalyst/targets/(([^ ]+)).py$')
 	targets = list()
-	for filename in sorted(glob.glob('modules/*_target.py')):
-		if 'generic' in filename:
+	for filename in sorted(glob.glob('catalyst/targets/*.py')):
+		if '__init__' in filename:
 			continue
 
 		match = extractor.match(filename)
 		target_name = match.group(2).replace('_', '-')
-		module_name = match.group(1)
+		module_name = 'catalyst.targets.' + match.group(1)
 
 		__import__(module_name)
 		module = _sys.modules[module_name]


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-22  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22  7:13 [gentoo-commits] proj/catalyst:rewrite-on-master commit in: /, doc/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2013-11-22  7:13 Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox