summaryrefslogtreecommitdiff
path: root/xnt
diff options
context:
space:
mode:
authorkballou <kballou@devnulllabs.io>2014-07-31 19:49:28 -0600
committerkballou <kballou@devnulllabs.io>2014-07-31 19:49:28 -0600
commitd34bc64180e9f2acac476a28f273968344a9e955 (patch)
tree5733961cf88d60cbfb390ea2077e75ec2391e635 /xnt
parent04d56a6d4d06d16a371ad9d2d9f43e1eb461694b (diff)
downloadxnt-d34bc64180e9f2acac476a28f273968344a9e955.tar.gz
xnt-d34bc64180e9f2acac476a28f273968344a9e955.tar.xz
Move `build` and `vcs` into `tasks`
Diffstat (limited to 'xnt')
-rw-r--r--xnt/__init__.py74
-rw-r--r--xnt/tasks/__init__.py (renamed from xnt/tasks.py)0
-rw-r--r--xnt/tasks/build/__init__.py (renamed from xnt/build/__init__.py)0
-rw-r--r--xnt/tasks/build/cc.py (renamed from xnt/build/cc.py)0
-rw-r--r--xnt/tasks/build/make.py (renamed from xnt/build/make.py)0
-rw-r--r--xnt/tasks/build/tex.py (renamed from xnt/build/tex.py)0
-rw-r--r--xnt/tasks/vcs/__init__.py (renamed from xnt/vcs/__init__.py)0
-rw-r--r--xnt/tasks/vcs/cvs.py (renamed from xnt/vcs/cvs.py)0
-rw-r--r--xnt/tasks/vcs/git.py (renamed from xnt/vcs/git.py)4
-rw-r--r--xnt/tasks/vcs/hg.py (renamed from xnt/vcs/hg.py)4
-rw-r--r--xnt/tests/compilercollectiontests.py8
-rw-r--r--xnt/tests/maketests.py6
-rw-r--r--xnt/tests/textests.py4
-rw-r--r--xnt/tests/vcscvstests.py4
-rw-r--r--xnt/tests/vcsgittests.py4
-rw-r--r--xnt/tests/vcshgtests.py4
16 files changed, 62 insertions, 50 deletions
diff --git a/xnt/__init__.py b/xnt/__init__.py
index 00414bb..f3fc11e 100644
--- a/xnt/__init__.py
+++ b/xnt/__init__.py
@@ -174,8 +174,8 @@ def gcc(src, output=None, flags=None):
:param src: C source file to compile
:param output: Optional name of object
:param flags: list of compiler flags'''
- import xnt.build.cc
- return xnt.tasks.__apply__(xnt.build.cc.__gcc__(src, output, flags))
+ import xnt.tasks.build.cc
+ return xnt.tasks.__apply__(xnt.tasks.build.cc.__gcc__(src, output, flags))
def gpp(src, output=None, flags=None):
'''G++ compiler
@@ -183,16 +183,17 @@ def gpp(src, output=None, flags=None):
:param src: C++ source file to compile
:param output: Optional name of object
:param flags: List of compiler flags'''
- import xnt.build.cc
- return xnt.tasks.__apply__(xnt.build.cc.__gpp__(src, output, flags))
+ import xnt.tasks.build.cc
+ return xnt.tasks.__apply__(xnt.tasks.build.cc.__gpp__(src, output, flags))
def javac(src, flags=None):
'''Java compiler
:param src: Java source class
:param flags: List of compiler flags'''
- import xnt.build.cc
- return xnt.tasks.__apply__(xnt.build.cc.__javac__(src, flags))
+ import xnt.tasks.build.cc
+ return xnt.tasks.__apply__(
+ xnt.tasks.build.cc.__javac__(src, flags))
def nvcc(src, output=None, flags=None):
'''CUDA C/C++ compiler
@@ -200,8 +201,9 @@ def nvcc(src, output=None, flags=None):
:param src: CUDA source to compile
:param output: Optional object name
:param flags: List of compiler flags'''
- import xnt.build.cc
- return xnt.tasks.__apply__(xnt.build.cc.__nvcc__(src, output, flags))
+ import xnt.tasks.build.cc
+ return xnt.tasks.__apply__(
+ xnt.tasks.build.cc.__nvcc__(src, output, flags))
#pylint: disable=W0621
def ant(target, path=None, flags=None, pkeys=None, pvalues=None):
@@ -212,9 +214,9 @@ def ant(target, path=None, flags=None, pkeys=None, pvalues=None):
:param flags: list of flags to pass to ant
:param pkeys: key names for properties to pass to ant
:param pvalues: value names for properties to pass to ant'''
- import xnt.build.make
+ import xnt.tasks.build.make
return xnt.tasks.__apply__(
- xnt.build.make.__ant__(target, path, flags, pkeys, pvalues))
+ xnt.tasks.build.make.__ant__(target, path, flags, pkeys, pvalues))
#pylint: disable=W0621
def make(target, path=None, flags=None, pkeys=None, pvalues=None):
@@ -225,9 +227,9 @@ def make(target, path=None, flags=None, pkeys=None, pvalues=None):
:param flags: list of flags to pass to make
:param pkeys: key names for properties to pass to make
:parram pvalues: value names for properties to pass to make'''
- import xnt.build.make
+ import xnt.tasks.build.make
return xnt.tasks.__apply__(
- xnt.build.make.__make__(target, path, flags, pkeys, pvalues))
+ xnt.tasks.build.make.__make__(target, path, flags, pkeys, pvalues))
#pylint: disable=W0621
def nant(target, path=None, flags=None, pkeys=None, pvalues=None):
@@ -238,9 +240,9 @@ def nant(target, path=None, flags=None, pkeys=None, pvalues=None):
:param flags: list of flags to pass to ant
:param pkeys: key names for properties to pass to ant
:param pvalues: value names for properties to pass to ant'''
- import xnt.build.make
+ import xnt.tasks.build.make
return xnt.tasks.__apply__(
- xnt.build.make.__nant__(target, path, flags, pkeys, pvalues))
+ xnt.tasks.build.make.__nant__(target, path, flags, pkeys, pvalues))
def gitclone(url, dest=None, branch=None):
'''Git Clone
@@ -248,8 +250,9 @@ def gitclone(url, dest=None, branch=None):
:param url: URL to respository
:param dest: destination directory or name of repository
:param branch: branch name to clone'''
- import xnt.vcs.git
- return xnt.tasks.__apply__(xnt.vcs.git.__gitclone__(url, dest, branch))
+ import xnt.tasks.vcs.git
+ return xnt.tasks.__apply__(
+ xnt.tasks.vcs.git.__gitclone__(url, dest, branch))
def gitpull(path, remote=None, branch=None):
'''Git pull
@@ -257,8 +260,9 @@ def gitpull(path, remote=None, branch=None):
:param path: local path to git repository
:param remote: repository remote to pull
:param branch: branch name to pull'''
- import xnt.vcs.git
- return xnt.tasks.__apply__(xnt.vcs.git.__gitpull__(path, remote, branch))
+ import xnt.tasks.vcs.git
+ return xnt.tasks.__apply__(
+ xnt.tasks.vcs.git.__gitpull__(path, remote, branch))
def hgclone(url, dest=None, rev=None, branch=None):
'''HG clone
@@ -267,16 +271,20 @@ def hgclone(url, dest=None, rev=None, branch=None):
:param dest: Directory or name of repository
:param rev: Revision to clone
:param branch: Branch to clone'''
- import xnt.vcs.hg
- return xnt.tasks.__apply__(xnt.vcs.hg.__hgclone__(url, dest, rev, branch))
+ import xnt.tasks.vcs.hg
+ return xnt.tasks.__apply__(xnt.tasks.vcs.hg.__hgclone__(
+ url,
+ dest,
+ rev,
+ branch))
def hgfetch(path, source=None):
'''HG Pull
:param path: local path to repository
:param source: remote source to pull'''
- import xnt.vcs.hg
- return xnt.tasks.__apply__(xnt.vcs.hg.__hgfetch__(path, source))
+ import xnt.tasks.vcs.hg
+ return xnt.tasks.__apply__(xnt.tasks.vcs.hg.__hgfetch__(path, source))
def cvsco(module, rev=None, dest=None):
'''CVS Checkout
@@ -284,15 +292,15 @@ def cvsco(module, rev=None, dest=None):
:param module: CVS module to checkout
:param rev: Revision to checkout
:param dest: Destination directory or name'''
- import xnt.vcs.cvs
- return xnt.tasks.__apply__(xnt.vcs.cvs.__cvsco__(module, rev, dest))
+ import xnt.tasks.vcs.cvs
+ return xnt.tasks.__apply__(xnt.tasks.vcs.cvs.__cvsco__(module, rev, dest))
def cvsupdate(path):
'''CVS Update
:param path: local path to csv checkout'''
- import xnt.vcs.cvs
- return xnt.tasks.__apply__(xnt.vcs.cvs.__cvsupdate__(path))
+ import xnt.tasks.vcs.cvs
+ return xnt.tasks.__apply__(xnt.tasks.vcs.cvs.__cvsupdate__(path))
def pdflatex(document, directory=None, bibtex=False, makeglossary=False):
'''PDFLaTeX
@@ -301,14 +309,18 @@ def pdflatex(document, directory=None, bibtex=False, makeglossary=False):
:param directory: path to document
:param bibtex: generate bibtex entries: default false
:param makeglossary: generate glossary entries: default false'''
- import xnt.build.tex
- return xnt.tasks.__apply__(
- xnt.build.tex.__pdflatex__(document, directory, bibtex, makeglossary))
+ import xnt.tasks.build.tex
+ return xnt.tasks.__apply__(xnt.tasks.build.tex.__pdflatex__(
+ document,
+ directory,
+ bibtex,
+ makeglossary))
def latexclean(directory=None, remove_pdf=False):
'''Clean up PDFLaTeX generated files
:param directory: path to document
:param remove_pdf: remove the generated pdf: default false'''
- import xnt.build.tex
- return xnt.tasks.__apply__(xnt.build.tex.__clean__(directory, remove_pdf))
+ import xnt.tasks.build.tex
+ return xnt.tasks.__apply__(
+ xnt.tasks.build.tex.__clean__(directory, remove_pdf))
diff --git a/xnt/tasks.py b/xnt/tasks/__init__.py
index 9f9bdfb..9f9bdfb 100644
--- a/xnt/tasks.py
+++ b/xnt/tasks/__init__.py
diff --git a/xnt/build/__init__.py b/xnt/tasks/build/__init__.py
index 11abb90..11abb90 100644
--- a/xnt/build/__init__.py
+++ b/xnt/tasks/build/__init__.py
diff --git a/xnt/build/cc.py b/xnt/tasks/build/cc.py
index e17276b..e17276b 100644
--- a/xnt/build/cc.py
+++ b/xnt/tasks/build/cc.py
diff --git a/xnt/build/make.py b/xnt/tasks/build/make.py
index da569a9..da569a9 100644
--- a/xnt/build/make.py
+++ b/xnt/tasks/build/make.py
diff --git a/xnt/build/tex.py b/xnt/tasks/build/tex.py
index 50761a1..50761a1 100644
--- a/xnt/build/tex.py
+++ b/xnt/tasks/build/tex.py
diff --git a/xnt/vcs/__init__.py b/xnt/tasks/vcs/__init__.py
index 88c881e..88c881e 100644
--- a/xnt/vcs/__init__.py
+++ b/xnt/tasks/vcs/__init__.py
diff --git a/xnt/vcs/cvs.py b/xnt/tasks/vcs/cvs.py
index 8a0902b..8a0902b 100644
--- a/xnt/vcs/cvs.py
+++ b/xnt/tasks/vcs/cvs.py
diff --git a/xnt/vcs/git.py b/xnt/tasks/vcs/git.py
index bc65f9d..3d56a9f 100644
--- a/xnt/vcs/git.py
+++ b/xnt/tasks/vcs/git.py
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
-import xnt.vcs
+import xnt.tasks.vcs
from xnt.tasks import __apply__, __call__, __which__
def __gitclone__(url, dest=None, branch=None):
@@ -32,7 +32,7 @@ def __gitclone__(url, dest=None, branch=None):
'''Perform git clone'''
assert __apply__(__which__("git"))
command = ["git", "clone"]
- command = xnt.vcs.clone_options(
+ command = xnt.tasks.vcs.clone_options(
command, kwargs['url'], kwargs['branch'], kwargs['dest'])
return __apply__(__call__(command))
args = {'url': url, 'dest': dest, 'branch': branch,}
diff --git a/xnt/vcs/hg.py b/xnt/tasks/vcs/hg.py
index 4ebbf2e..17f15e5 100644
--- a/xnt/vcs/hg.py
+++ b/xnt/tasks/vcs/hg.py
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
-import xnt.vcs
+import xnt.tasks.vcs
from xnt.tasks import __apply__, __call__, __which__
def __hgclone__(url, dest=None, rev=None, branch=None):
@@ -36,7 +36,7 @@ def __hgclone__(url, dest=None, rev=None, branch=None):
if kwargs['rev']:
command.append("--rev")
command.append(kwargs['rev'])
- command = xnt.vcs.clone_options(
+ command = xnt.tasks.vcs.clone_options(
command, kwargs['url'], kwargs['branch'], kwargs['dest'])
return __apply__(__call__(command))
args = {'url': url, 'dest': dest, 'rev': rev, 'branch': branch,}
diff --git a/xnt/tests/compilercollectiontests.py b/xnt/tests/compilercollectiontests.py
index d35df69..9ff30d6 100644
--- a/xnt/tests/compilercollectiontests.py
+++ b/xnt/tests/compilercollectiontests.py
@@ -18,10 +18,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from xnt.tests import assert_basic_assumptions
-from xnt.build.cc import __gcc__
-from xnt.build.cc import __gpp__
-from xnt.build.cc import __nvcc__
-from xnt.build.cc import __javac__
+from xnt.tasks.build.cc import __gcc__
+from xnt.tasks.build.cc import __gpp__
+from xnt.tasks.build.cc import __nvcc__
+from xnt.tasks.build.cc import __javac__
import unittest
# pylint: disable=R0904
diff --git a/xnt/tests/maketests.py b/xnt/tests/maketests.py
index ce74aa5..de043fa 100644
--- a/xnt/tests/maketests.py
+++ b/xnt/tests/maketests.py
@@ -18,9 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from xnt.tests import assert_basic_assumptions
-from xnt.build.make import __make__
-from xnt.build.make import __ant__
-from xnt.build.make import __nant__
+from xnt.tasks.build.make import __make__
+from xnt.tasks.build.make import __ant__
+from xnt.tasks.build.make import __nant__
import unittest
# pylint: disable=R0904
diff --git a/xnt/tests/textests.py b/xnt/tests/textests.py
index 8e214a3..52868a7 100644
--- a/xnt/tests/textests.py
+++ b/xnt/tests/textests.py
@@ -18,8 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from xnt.tests import assert_basic_assumptions
-from xnt.build.tex import __pdflatex__
-from xnt.build.tex import __clean__
+from xnt.tasks.build.tex import __pdflatex__
+from xnt.tasks.build.tex import __clean__
import unittest
# pylint: disable=R0904
diff --git a/xnt/tests/vcscvstests.py b/xnt/tests/vcscvstests.py
index 6f6c415..ed8e9de 100644
--- a/xnt/tests/vcscvstests.py
+++ b/xnt/tests/vcscvstests.py
@@ -18,8 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from xnt.tests import assert_basic_assumptions
-from xnt.vcs.cvs import __cvsco__
-from xnt.vcs.cvs import __cvsupdate__
+from xnt.tasks.vcs.cvs import __cvsco__
+from xnt.tasks.vcs.cvs import __cvsupdate__
import unittest
# pylint: disable=R0904
diff --git a/xnt/tests/vcsgittests.py b/xnt/tests/vcsgittests.py
index 76e013f..e1b8718 100644
--- a/xnt/tests/vcsgittests.py
+++ b/xnt/tests/vcsgittests.py
@@ -18,8 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from xnt.tests import assert_basic_assumptions
-from xnt.vcs.git import __gitclone__
-from xnt.vcs.git import __gitpull__
+from xnt.tasks.vcs.git import __gitclone__
+from xnt.tasks.vcs.git import __gitpull__
import unittest
# pylint: disable=R0904
diff --git a/xnt/tests/vcshgtests.py b/xnt/tests/vcshgtests.py
index 95e59f4..e9138eb 100644
--- a/xnt/tests/vcshgtests.py
+++ b/xnt/tests/vcshgtests.py
@@ -18,8 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from xnt.tests import assert_basic_assumptions
-from xnt.vcs.hg import __hgclone__
-from xnt.vcs.hg import __hgfetch__
+from xnt.tasks.vcs.hg import __hgclone__
+from xnt.tasks.vcs.hg import __hgfetch__
import unittest
# pylint: disable=R0904