diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-10-30 20:03:33 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-11-01 18:12:48 +0100 |
commit | e28ea0740a7b4eb2ef4c1bd3079d77a40c6072b8 (patch) | |
tree | 779145e71a996c471a1d1a6b1acde1bc90deecc4 | |
parent | abf90abcba15beb51196cf503f35695acdcd91c1 (diff) | |
download | git-buildpackage-e28ea0740a7b4eb2ef4c1bd3079d77a40c6072b8.tar.gz git-buildpackage-e28ea0740a7b4eb2ef4c1bd3079d77a40c6072b8.tar.bz2 git-buildpackage-e28ea0740a7b4eb2ef4c1bd3079d77a40c6072b8.zip |
Get rid of the symlink
by moving the commands to gbp/scripts/
-rw-r--r-- | .gitignore | 10 | ||||
-rwxr-xr-x | bin/gbp-clone | 5 | ||||
-rwxr-xr-x | bin/gbp-create-remote-repo | 5 | ||||
-rwxr-xr-x | bin/gbp-pq | 5 | ||||
-rwxr-xr-x | bin/gbp-pull | 5 | ||||
-rwxr-xr-x | bin/git-buildpackage | 5 | ||||
-rwxr-xr-x | bin/git-dch | 5 | ||||
-rwxr-xr-x | bin/git-import-dsc | 5 | ||||
-rwxr-xr-x | bin/git-import-dscs | 5 | ||||
-rwxr-xr-x | bin/git-import-orig | 5 | ||||
-rwxr-xr-x | bin/git-pbuilder (renamed from git-pbuilder) | 0 | ||||
-rwxr-xr-x | debian/rules | 18 | ||||
-rw-r--r-- | gbp/scripts/__init__.py | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | gbp/scripts/buildpackage.py (renamed from git-buildpackage) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | gbp/scripts/clone.py (renamed from gbp-clone) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | gbp/scripts/create_remote_repo.py (renamed from gbp-create-remote-repo) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | gbp/scripts/dch.py (renamed from git-dch) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | gbp/scripts/import_dsc.py (renamed from git-import-dsc) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | gbp/scripts/import_dscs.py (renamed from git-import-dscs) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | gbp/scripts/import_orig.py (renamed from git-import-orig) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | gbp/scripts/pq.py (renamed from gbp-pq) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | gbp/scripts/pull.py (renamed from gbp-pull) | 1 | ||||
-rw-r--r-- | setup.py | 19 | ||||
-rw-r--r-- | tests/01_test_help.py | 4 | ||||
-rw-r--r-- | tests/02_test_import.py | 5 | ||||
-rw-r--r-- | tests/04_test_gbp_submodules.py | 6 | ||||
-rw-r--r-- | tests/05_test_detection.py | 22 |
27 files changed, 82 insertions, 56 deletions
@@ -2,16 +2,6 @@ .noseids .coverage gbp/gbp_version.py -gbp_clone.py -gbp_pq.py -gbp_pull.py -gbp_create_remote_repo.py -git_buildpackage.py -git_dch.py -git_import_dsc.py -git_import_dscs.py -git_import_orig.py -links_stamp build/ docs/*.1 diff --git a/bin/gbp-clone b/bin/gbp-clone new file mode 100755 index 00000000..33e8226b --- /dev/null +++ b/bin/gbp-clone @@ -0,0 +1,5 @@ +#! /usr/bin/python -u +import sys +from gbp.scripts.clone import main + +sys.exit(main(sys.argv)) diff --git a/bin/gbp-create-remote-repo b/bin/gbp-create-remote-repo new file mode 100755 index 00000000..81ca8c15 --- /dev/null +++ b/bin/gbp-create-remote-repo @@ -0,0 +1,5 @@ +#! /usr/bin/python -u +import sys +from gbp.scripts.create_remote_repo import main + +sys.exit(main(sys.argv)) diff --git a/bin/gbp-pq b/bin/gbp-pq new file mode 100755 index 00000000..733be7b6 --- /dev/null +++ b/bin/gbp-pq @@ -0,0 +1,5 @@ +#! /usr/bin/python -u +import sys +from gbp.scripts.pq import main + +sys.exit(main(sys.argv)) diff --git a/bin/gbp-pull b/bin/gbp-pull new file mode 100755 index 00000000..21c22c56 --- /dev/null +++ b/bin/gbp-pull @@ -0,0 +1,5 @@ +#! /usr/bin/python -u +import sys +from gbp.scripts.pull import main + +sys.exit(main(sys.argv)) diff --git a/bin/git-buildpackage b/bin/git-buildpackage new file mode 100755 index 00000000..bc093ab0 --- /dev/null +++ b/bin/git-buildpackage @@ -0,0 +1,5 @@ +#! /usr/bin/python -u +import sys +from gbp.scripts.buildpackage import main + +sys.exit(main(sys.argv)) diff --git a/bin/git-dch b/bin/git-dch new file mode 100755 index 00000000..68eacd9d --- /dev/null +++ b/bin/git-dch @@ -0,0 +1,5 @@ +#! /usr/bin/python -u +import sys +from gbp.scripts.dch import main + +sys.exit(main(sys.argv)) diff --git a/bin/git-import-dsc b/bin/git-import-dsc new file mode 100755 index 00000000..fd6737a5 --- /dev/null +++ b/bin/git-import-dsc @@ -0,0 +1,5 @@ +#! /usr/bin/python -u +import sys +from gbp.scripts.import_dsc import main + +sys.exit(main(sys.argv)) diff --git a/bin/git-import-dscs b/bin/git-import-dscs new file mode 100755 index 00000000..cd0f8806 --- /dev/null +++ b/bin/git-import-dscs @@ -0,0 +1,5 @@ +#! /usr/bin/python -u +import sys +from gbp.scripts.import_dscs import main + +sys.exit(main(sys.argv)) diff --git a/bin/git-import-orig b/bin/git-import-orig new file mode 100755 index 00000000..812e3ec0 --- /dev/null +++ b/bin/git-import-orig @@ -0,0 +1,5 @@ +#! /usr/bin/python -u +import sys +from gbp.scripts.import_orig import main + +sys.exit(main(sys.argv)) diff --git a/git-pbuilder b/bin/git-pbuilder index d82b58b1..d82b58b1 100755 --- a/git-pbuilder +++ b/bin/git-pbuilder diff --git a/debian/rules b/debian/rules index 735cb452..b8fccabe 100755 --- a/debian/rules +++ b/debian/rules @@ -43,30 +43,24 @@ $(MANUAL): docs/manual.sgml docs/chapters/*.sgml docs/manpages/*.sgml cp /usr/share/gtk-doc/data/*.png $(MANUAL) -docs/git-pbuilder.1: git-pbuilder +docs/git-pbuilder.1: bin/git-pbuilder pod2man $< $@ -links_stamp: - for c in $(COMMANDS); do \ - ln -s $$c $$(echo $$c | sed -e 's,-,_,g').py; \ - done - touch links_stamp - -apidocs: links_stamp +apidocs: epydoc -v -n git-buildpackage --no-sourcecode -o docs/apidocs/ \ --url=https://honk.sigxcpu.org/piki/projects/git-buildpackage/ \ - --fail-on-docstring-warning \ - gbp*.py git*.py gbp/ tests/test_Git*.py + --fail-on-docstring-warning gbp/ tests/test_Git*.py ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) pychecker: - PYTHONPATH=. pychecker $(PYCHECKER_ARGS) -q git*.py gbp*.py + PYTHONPATH=. pychecker $(PYCHECKER_ARGS) -q gbp -checks: links_stamp pychecker +checks: pychecker export GIT_AUTHOR_NAME="Gbp Tests"; \ export GIT_AUTHOR_EMAIL=tests@example.com; \ export GIT_COMMITTER_NAME=$$GIT_AUTHOR_NAME; \ export GIT_COMMITTER_EMAIL=$$GIT_AUTHOR_EMAIL; \ + export PYTHONPATH=$$(pwd); \ nosetests --exe --with-doctest --with-coverage --cover-package=gbp endif diff --git a/gbp/scripts/__init__.py b/gbp/scripts/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/gbp/scripts/__init__.py diff --git a/git-buildpackage b/gbp/scripts/buildpackage.py index c7c747d1..d0ce3c17 100755..100644 --- a/git-buildpackage +++ b/gbp/scripts/buildpackage.py @@ -1,4 +1,3 @@ -#!/usr/bin/python -u # vim: set fileencoding=utf-8 : # # (C) 2006-2011 Guido Guenther <agx@sigxcpu.org> diff --git a/gbp-clone b/gbp/scripts/clone.py index 53ef1775..665b548e 100755..100644 --- a/gbp-clone +++ b/gbp/scripts/clone.py @@ -1,4 +1,3 @@ -#!/usr/bin/python -u # vim: set fileencoding=utf-8 : # # (C) 2009,2010 Guido Guenther <agx@sigxcpu.org> diff --git a/gbp-create-remote-repo b/gbp/scripts/create_remote_repo.py index 84bac66f..00f3410d 100755..100644 --- a/gbp-create-remote-repo +++ b/gbp/scripts/create_remote_repo.py @@ -1,4 +1,3 @@ -#!/usr/bin/python -u # vim: set fileencoding=utf-8 : # # (C) 2010 Guido Guenther <agx@sigxcpu.org> diff --git a/git-dch b/gbp/scripts/dch.py index 819762eb..a82c1bdc 100755..100644 --- a/git-dch +++ b/gbp/scripts/dch.py @@ -1,4 +1,3 @@ -#!/usr/bin/python -u # vim: set fileencoding=utf-8 : # # (C) 2007, 2008, 2009, 2010 Guido Guenther <agx@sigxcpu.org> diff --git a/git-import-dsc b/gbp/scripts/import_dsc.py index e43e56ba..94013e25 100755..100644 --- a/git-import-dsc +++ b/gbp/scripts/import_dsc.py @@ -1,4 +1,3 @@ -#!/usr/bin/python -u # vim: set fileencoding=utf-8 : # # (C) 2006,2007,2011 Guido Guenther <agx@sigxcpu.org> diff --git a/git-import-dscs b/gbp/scripts/import_dscs.py index 41dc2239..fc39ce4a 100755..100644 --- a/git-import-dscs +++ b/gbp/scripts/import_dscs.py @@ -1,4 +1,3 @@ -#!/usr/bin/python -u # vim: set fileencoding=utf-8 : # # (C) 2008, 2009, 2010 Guido Guenther <agx@sigxcpu.org> diff --git a/git-import-orig b/gbp/scripts/import_orig.py index 263d0ba4..445d1a6d 100755..100644 --- a/git-import-orig +++ b/gbp/scripts/import_orig.py @@ -1,4 +1,3 @@ -#!/usr/bin/python -u # vim: set fileencoding=utf-8 : # # (C) 2006, 2007, 2009, 2011 Guido Guenther <agx@sigxcpu.org> diff --git a/gbp-pq b/gbp/scripts/pq.py index 092c628a..2ad7b259 100755..100644 --- a/gbp-pq +++ b/gbp/scripts/pq.py @@ -1,4 +1,3 @@ -#!/usr/bin/python -u # vim: set fileencoding=utf-8 : # # (C) 2011 Guido Günther <agx@sigxcpu.org> diff --git a/gbp-pull b/gbp/scripts/pull.py index cb7d5efa..69ad1a6d 100755..100644 --- a/gbp-pull +++ b/gbp/scripts/pull.py @@ -1,4 +1,3 @@ -#!/usr/bin/python -u # vim: set fileencoding=utf-8 : # # (C) 2009 Guido Guenther <agx@sigxcpu.org> @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (C) 2006,2007 Guido Guenther <agx@sigxcpu.org> +# Copyright (C) 2006-2011 Guido Guenther <agx@sigxcpu.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,9 +21,16 @@ from distutils.core import setup setup(name = "git_build_package", author = 'Guido Guenther', author_email = 'agx@sigxcpu.org', - scripts = [ 'git-buildpackage', 'git-import-dsc', 'git-import-orig', 'git-dch', 'git-import-dscs', - 'gbp-pq', 'gbp-pull', 'gbp-clone', 'git-pbuilder', 'gbp-create-remote-repo'], - packages = [ 'gbp' ], - data_files = [("/etc/git-buildpackage/", ["gbp.conf" ]),], + scripts = [ 'bin/git-buildpackage', + 'bin/git-import-dsc', + 'bin/git-import-orig', + 'bin/git-dch', + 'bin/git-import-dscs', + 'bin/gbp-pq', + 'bin/gbp-pull', + 'bin/gbp-clone', + 'bin/gbp-create-remote-repo', + 'bin/git-pbuilder'], + packages = [ 'gbp', 'gbp.scripts' ], + data_files = [("/etc/git-buildpackage/", ["gbp.conf"]),], ) - diff --git a/tests/01_test_help.py b/tests/01_test_help.py index 8d520694..02b19c8a 100644 --- a/tests/01_test_help.py +++ b/tests/01_test_help.py @@ -9,12 +9,12 @@ class TestHelp(unittest.TestCase): """Test help output of gbp commands""" def testHelp(self): for prog in [ "buildpackage", "import-orig", "import-dsc", "dch" ]: - ret = os.system("./git-%s --help >/dev/null" % prog) + ret = os.system("bin/git-%s --help >/dev/null" % prog) self.assertEqual(ret, 0) def testHelpGbp(self): for prog in [ "pull", "clone", "pq", "create-remote-repo" ]: - ret = os.system("./gbp-%s --help >/dev/null" % prog) + ret = os.system("bin/gbp-%s --help >/dev/null" % prog) self.assertEqual(ret, 0) # vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: diff --git a/tests/02_test_import.py b/tests/02_test_import.py index f1e93c97..6ded95af 100644 --- a/tests/02_test_import.py +++ b/tests/02_test_import.py @@ -22,8 +22,7 @@ class TestUnpack: assert os.path.exists(target), "%s does not exist" % target def _create_archive(self, comp): - filelist = [ os.path.basename(f) for f in - glob.glob(os.path.join(self.top, "g*-*")) ] + filelist = [ 'README', 'setup.py' ] name = "%s_0.1.tar.%s" % (self.archive_prefix, comp) t = tarfile.open(name= name, mode='w:%s' % comp) @@ -70,7 +69,7 @@ class TestUnpack: self._check_files(archive[1], comp) def test_upstream_source_unpack_filtered(self): - exclude = "git-buildpackage" + exclude = "README" for (comp, archive) in self.archives.iteritems(): source = gbp.deb.UpstreamSource(archive[0]) diff --git a/tests/04_test_gbp_submodules.py b/tests/04_test_gbp_submodules.py index e69570eb..a20f668d 100644 --- a/tests/04_test_gbp_submodules.py +++ b/tests/04_test_gbp_submodules.py @@ -9,7 +9,7 @@ import gbp.log import gbp.git import gbp.command_wrappers -import git_buildpackage +from gbp.scripts import buildpackage top = None repo = None @@ -97,7 +97,7 @@ def test_dump_tree(): """Dump the repository and check if files exist""" dumpdir = os.path.join(tmpdir, "dump") os.mkdir(dumpdir) - assert git_buildpackage.dump_tree(repo, dumpdir, "master", True) + assert buildpackage.dump_tree(repo, dumpdir, "master", True) assert os.path.exists(os.path.join(dumpdir, testfile_name)) assert os.path.exists(os.path.join(dumpdir, submodules[0].name, testfile_name)) @@ -105,7 +105,7 @@ def test_dump_tree(): def test_create_tarball(): """Create an upstream tarball""" cp = { "Source": "test", "Upstream-Version": "0.1" } - assert git_buildpackage.git_archive(repo, + assert buildpackage.git_archive(repo, cp, tmpdir, "HEAD", diff --git a/tests/05_test_detection.py b/tests/05_test_detection.py index a60cab17..2f58265c 100644 --- a/tests/05_test_detection.py +++ b/tests/05_test_detection.py @@ -3,7 +3,7 @@ import shutil import tempfile import unittest -import git_buildpackage +from gbp.scripts import buildpackage from gbp.deb import has_orig from gbp.errors import GbpError @@ -31,14 +31,14 @@ class TestDetection(unittest.TestCase): def test_guess_comp_type_no_pristine_tar_no_orig(self): repo = MockGitRepository(with_branch=False) - guessed = git_buildpackage.guess_comp_type( + guessed = buildpackage.guess_comp_type( repo, 'auto', self.cp, self.tmpdir) self.assertEqual('gzip', guessed) def test_guess_comp_type_no_pristine_tar_with_orig(self): open(os.path.join(self.tmpdir, 'source_1.2.orig.tar.bz2'), "w").close() repo = MockGitRepository(with_branch=False) - guessed = git_buildpackage.guess_comp_type( + guessed = buildpackage.guess_comp_type( repo, 'auto', self.cp, self.tmpdir) self.assertEqual('bzip2', guessed) @@ -48,7 +48,7 @@ class TestDetection(unittest.TestCase): repo = MockGitRepository(with_branch=False) self.assertRaises( GbpError, - git_buildpackage.guess_comp_type, + buildpackage.guess_comp_type, repo, 'auto', self.cp, @@ -57,7 +57,7 @@ class TestDetection(unittest.TestCase): def test_guess_comp_type_auto_bzip2(self): subject = 'pristine-tar data for source_1.2-3.orig.tar.bz2' repo = MockGitRepository(with_branch=True, subject=subject) - guessed = git_buildpackage.guess_comp_type( + guessed = buildpackage.guess_comp_type( repo, 'auto', self.cp, self.tmpdir) self.assertEqual("bzip2", guessed) @@ -70,36 +70,36 @@ class TestDetection(unittest.TestCase): def test_guess_comp_type_bzip2(self): repo = MockGitRepository(with_branch=False) - guessed = git_buildpackage.guess_comp_type( + guessed = buildpackage.guess_comp_type( repo, 'bzip2', self.cp, None) self.assertEqual("bzip2", guessed) def test_guess_comp_type_gzip(self): repo = MockGitRepository(with_branch=False) - guessed = git_buildpackage.guess_comp_type( + guessed = buildpackage.guess_comp_type( repo, 'gzip', self.cp, None) self.assertEqual("gzip", guessed) def test_guess_comp_type_bz(self): repo = MockGitRepository(with_branch=False) - guessed = git_buildpackage.guess_comp_type( + guessed = buildpackage.guess_comp_type( repo, 'xz', self.cp, None) self.assertEqual("xz", guessed) def test_guess_comp_type_lzma(self): repo = MockGitRepository(with_branch=False) - guessed = git_buildpackage.guess_comp_type( + guessed = buildpackage.guess_comp_type( repo, 'lzma', self.cp, None) self.assertEqual("lzma", guessed) def test_guess_comp_type_bz2(self): repo = MockGitRepository(with_branch=False) - guessed = git_buildpackage.guess_comp_type( + guessed = buildpackage.guess_comp_type( repo, 'bz2', self.cp, None) self.assertEqual("bzip2", guessed) def test_guess_comp_type_gz(self): repo = MockGitRepository(with_branch=False) - guessed = git_buildpackage.guess_comp_type( + guessed = buildpackage.guess_comp_type( repo, 'gz', self.cp, None) self.assertEqual("gzip", guessed) |