From: Ed Bartosh Date: Fri, 12 Apr 2013 15:45:03 +0000 (+0300) Subject: Cleaned up packaging X-Git-Tag: 0.16~25^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5dd030fb1f0bd2f43cd885ad9c699850c690d266;p=tools%2Fgbs.git Cleaned up packaging Fixed debian packaging. Simplified debian/rules. Fixed some lintian findings (not all of them). Get rid of outdated distfiles/ directory Change-Id: Ideb6bf8352a09a3358492d9a8c721ebe2fe877c5 Signed-off-by: Ed Bartosh --- diff --git a/data/gbs-completion.bash b/data/gbs-completion.bash deleted file mode 100644 index de916db..0000000 --- a/data/gbs-completion.bash +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/bash -# copy this file to /etc/bash_completion.d/ -# or copy it to your home directory, rename it as .gbs.bash and add '. .gbs.bash' to ~/.bashrc - -__gbscomp () -{ - local cur_="${3-$cur}" - - case "$cur_" in - --*=) - COMPREPLY=() - ;; - *) - local IFS=$'\n' - COMPREPLY=($(compgen -P "${2-}"\ - -W "$(__gbscomp_1 "${1-}" "${4-}")"\ - -- "$cur_")) - ;; - esac -} - -__gbscomp_1 () -{ - local c IFS=$' \t\n' - for c in $1; do - c="$c$2" - case $c in - --*=*|*.) ;; - *) c="$c " ;; - esac - printf '%s\n' "$c" - done -} - -__gbs_main () -{ - COMPREPLY=() - local cur prev cword cfgdir=/usr/share/gbs - local -a words - if declare -F _get_comp_words_by_ref &>/dev/null ; then - _get_comp_words_by_ref cur prev words cword - else - cur=$2 prev=$3 words=("${COMP_WORDS[@]}") cword=$COMP_CWORD - fi - - local i c=1 command - while [ $c -lt $cword ]; do - i="${words[c]}" - case "$i" in - --help) command="help"; break;; - -c) let c++ ;; - -*) ;; - *) command="$i"; break;; - esac - let c++ - done - - __gbs && return -} - -__gbs_find_on_cmdline () -{ - local word subcommand c=1 - while [ $c -lt $cword ]; do - word="${words[c]}" - for subcommand in $1; do - if [ "$subcommand" = "$word" ]; then - echo "$subcommand" - return - fi - done - let c++ - done -} - -__gbs () -{ - subcommands=" - build remotebuild submit import export changelog chroot clone pull - " - common_opts="--upstream-tag= --upstream-branch= --squash-patches-until= - --packaging-dir= --no-patch-export" - lb_opts=" - --arch= --repository= --dist= --buildroot= --clean - --include-all --extra-packs= --spec= --commit= --cache - --skip-conf-repos --profile= --noinit --keep-packs - --clean-repos --define --baselibs - " - rb_opts=" - --base-obsprj= --target-obsprj= --spec= --commit= --include-all - --status --buildlog --profile= --arch= --repository= - " - sr_opts=" - --msg= --target= --commit= --spec= --sign --user-key= --remote= --tag= - " - im_opts=" - --merge --upstream-branch= --author-email= --author-name= --no-pristine-tar - --packaging-dir= --upstream-vcs-tag= --allow-same-version --native - --filter= --no-patch-import - " - ex_opts=" - --source-rpm --include-all --commit= --spec= --outdir= - " - ch_opts="--message= --since= --packaging-dir=" - cr_opts="--root" - lbex_opts="--no-configure --exclude-from-file= --exclude= --binary-list= --threads=\ - --incremental --overwrite --clean-once --debug --deps --rdeps $lb_opts" - cl_opts="--upstream-branch= --all --depth=" - pull_opts="--upstream-branch= --force --depth=" - - subcommand="$(__gbs_find_on_cmdline "$subcommands")" - if [ -z "$subcommand" ]; then - case $cur in - --*) - __gbscomp "--version --help --verbose --debug" - ;; - *) - __gbscomp "$subcommands" - ;; - esac - else - case "${subcommand},$cur" in - build,--*) - __gbscomp "$lb_opts $lbex_opts $common_opts" - ;; - remotebuild,--*) - __gbscomp "$rb_opts $common_opts" - ;; - import,--*) - __gbscomp "$im_opts" - ;; - export,--*) - __gbscomp "$ex_opts $common_opts" - ;; - submit,--*) - __gbscomp "$sr_opts" - ;; - changelog,--*) - __gbscomp "$ch_opts" - ;; - chroot,--*) - __gbscomp "$cr_opts" - ;; - clone,--*) - __gbscomp "$cl_opts" - ;; - pull,--*) - __gbscomp "$pull_opts" - ;; - *) - COMPREPLY=() - ;; - esac - fi -} -complete -F __gbs_main -o bashdefault -o default -o nospace gbs diff --git a/data/gbs.sh b/data/gbs.sh new file mode 100644 index 0000000..de916db --- /dev/null +++ b/data/gbs.sh @@ -0,0 +1,156 @@ +#!/bin/bash +# copy this file to /etc/bash_completion.d/ +# or copy it to your home directory, rename it as .gbs.bash and add '. .gbs.bash' to ~/.bashrc + +__gbscomp () +{ + local cur_="${3-$cur}" + + case "$cur_" in + --*=) + COMPREPLY=() + ;; + *) + local IFS=$'\n' + COMPREPLY=($(compgen -P "${2-}"\ + -W "$(__gbscomp_1 "${1-}" "${4-}")"\ + -- "$cur_")) + ;; + esac +} + +__gbscomp_1 () +{ + local c IFS=$' \t\n' + for c in $1; do + c="$c$2" + case $c in + --*=*|*.) ;; + *) c="$c " ;; + esac + printf '%s\n' "$c" + done +} + +__gbs_main () +{ + COMPREPLY=() + local cur prev cword cfgdir=/usr/share/gbs + local -a words + if declare -F _get_comp_words_by_ref &>/dev/null ; then + _get_comp_words_by_ref cur prev words cword + else + cur=$2 prev=$3 words=("${COMP_WORDS[@]}") cword=$COMP_CWORD + fi + + local i c=1 command + while [ $c -lt $cword ]; do + i="${words[c]}" + case "$i" in + --help) command="help"; break;; + -c) let c++ ;; + -*) ;; + *) command="$i"; break;; + esac + let c++ + done + + __gbs && return +} + +__gbs_find_on_cmdline () +{ + local word subcommand c=1 + while [ $c -lt $cword ]; do + word="${words[c]}" + for subcommand in $1; do + if [ "$subcommand" = "$word" ]; then + echo "$subcommand" + return + fi + done + let c++ + done +} + +__gbs () +{ + subcommands=" + build remotebuild submit import export changelog chroot clone pull + " + common_opts="--upstream-tag= --upstream-branch= --squash-patches-until= + --packaging-dir= --no-patch-export" + lb_opts=" + --arch= --repository= --dist= --buildroot= --clean + --include-all --extra-packs= --spec= --commit= --cache + --skip-conf-repos --profile= --noinit --keep-packs + --clean-repos --define --baselibs + " + rb_opts=" + --base-obsprj= --target-obsprj= --spec= --commit= --include-all + --status --buildlog --profile= --arch= --repository= + " + sr_opts=" + --msg= --target= --commit= --spec= --sign --user-key= --remote= --tag= + " + im_opts=" + --merge --upstream-branch= --author-email= --author-name= --no-pristine-tar + --packaging-dir= --upstream-vcs-tag= --allow-same-version --native + --filter= --no-patch-import + " + ex_opts=" + --source-rpm --include-all --commit= --spec= --outdir= + " + ch_opts="--message= --since= --packaging-dir=" + cr_opts="--root" + lbex_opts="--no-configure --exclude-from-file= --exclude= --binary-list= --threads=\ + --incremental --overwrite --clean-once --debug --deps --rdeps $lb_opts" + cl_opts="--upstream-branch= --all --depth=" + pull_opts="--upstream-branch= --force --depth=" + + subcommand="$(__gbs_find_on_cmdline "$subcommands")" + if [ -z "$subcommand" ]; then + case $cur in + --*) + __gbscomp "--version --help --verbose --debug" + ;; + *) + __gbscomp "$subcommands" + ;; + esac + else + case "${subcommand},$cur" in + build,--*) + __gbscomp "$lb_opts $lbex_opts $common_opts" + ;; + remotebuild,--*) + __gbscomp "$rb_opts $common_opts" + ;; + import,--*) + __gbscomp "$im_opts" + ;; + export,--*) + __gbscomp "$ex_opts $common_opts" + ;; + submit,--*) + __gbscomp "$sr_opts" + ;; + changelog,--*) + __gbscomp "$ch_opts" + ;; + chroot,--*) + __gbscomp "$cr_opts" + ;; + clone,--*) + __gbscomp "$cl_opts" + ;; + pull,--*) + __gbscomp "$pull_opts" + ;; + *) + COMPREPLY=() + ;; + esac + fi +} +complete -F __gbs_main -o bashdefault -o default -o nospace gbs diff --git a/debian/control b/debian/control index fcce369..95e9b88 100644 --- a/debian/control +++ b/debian/control @@ -2,9 +2,9 @@ Source: gbs Section: devel Priority: extra Maintainer: Jian-feng Ding -Build-Depends: debhelper (>= 7.0.15), python-dev +Build-Depends: debhelper, python (>= 2.6), python-support Standards-Version: 3.8.0 -X-Python-Version: >= 2.7 +X-Python-Version: >= 2.6 Homepage: http://www.tizen.org Package: gbs @@ -18,7 +18,7 @@ Depends: ${misc:Depends}, ${python:Depends}, depanneur (>= 0.6), pristine-tar (>= 1.26) Recommends: librpm-tizen (>= 4.11.0.1.tizen20130304-tizen20130307) -Description: The command line tools for Tizen package developers +Description: Command line tools for Tizen package developers The command line tools for Tizen package developers will be used to do packaging related tasks. diff --git a/debian/gbs-api.install b/debian/gbs-api.install new file mode 100644 index 0000000..99b060c --- /dev/null +++ b/debian/gbs-api.install @@ -0,0 +1,7 @@ +usr/lib/python*/*packages/gitbuildsys/__init__.py +usr/lib/python*/*packages/gitbuildsys/oscapi.py +usr/lib/python*/*packages/gitbuildsys/errors.py +usr/lib/python*/*packages/gitbuildsys/log.py +usr/lib/python*/*packages/gitbuildsys/safe_url.py +usr/lib/python*/*packages/gitbuildsys/utils.py +usr/lib/python*/*packages/gbs-*.egg-info diff --git a/debian/gbs.install b/debian/gbs.install new file mode 100644 index 0000000..8ab22b8 --- /dev/null +++ b/debian/gbs.install @@ -0,0 +1,5 @@ +usr/lib/python*/*packages/gitbuildsys/cmd_*.py +usr/lib/python*/*packages/gitbuildsys/conf.py +usr/lib/python*/*packages/gitbuildsys/parsing.py +usr/bin/* +etc/bash_completion.d/* diff --git a/debian/rules b/debian/rules index c7bb7d1..37dbe9d 100644 --- a/debian/rules +++ b/debian/rules @@ -1,51 +1,10 @@ #!/usr/bin/make -f -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 -GBS =$(shell pwd)/debian/gbs -build: build-stamp -build-stamp: - dh_testdir - python setup.py build +%: + dh $@ -clean: - dh_testdir - dh_testroot - rm -f build-stamp - dh_clean +override_dh_auto_install: + python setup.py install --root=debian/tmp --prefix=/usr -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - # Installing package - mkdir -p '$(GBS)' '$(GBS)'/usr/bin '$(GBS)'/usr/share/doc/gbs - install -m644 docs/RELEASE_NOTES '$(GBS)'/usr/share/doc/gbs - # Bash completion - install -d -m0755 '$(GBS)'/etc/bash_completion.d - install -m0644 data/gbs-completion.bash \ - '$(GBS)'/etc/bash_completion.d/gbs - python setup.py install --root=$(GBS) --prefix=/usr --install-layout=deb - -binary-indep: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_install - dh_installman - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary-arch: build install - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +override_dh_auto_test: + @echo 'Skipping autotests' diff --git a/distfiles/debian/compat b/distfiles/debian/compat deleted file mode 100644 index 7f8f011..0000000 --- a/distfiles/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/distfiles/debian/control b/distfiles/debian/control deleted file mode 100644 index 44ebf48..0000000 --- a/distfiles/debian/control +++ /dev/null @@ -1,23 +0,0 @@ -Source: gbs -Section: devel -Priority: extra -Maintainer: Jian-feng Ding -Build-Depends: debhelper (>= 7.0.15), python-dev -Standards-Version: 3.8.0 -Homepage: http://www.tizen.org - -Package: gbs -Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, - git-core, - osc (>= 0.131), - build (>= 2011.10.10), - rpm, - qemu-arm-static (>= 0.14.1) | qemu-user-static, - binfmt-support, - sudo, - git-buildpackage-rpm, - python-pycurl -Description: The command line tools for Tizen package developers - The command line tools for Tizen package developers will - be used to do packaging related tasks. diff --git a/distfiles/debian/copyright b/distfiles/debian/copyright deleted file mode 100644 index dfa1e65..0000000 --- a/distfiles/debian/copyright +++ /dev/null @@ -1,15 +0,0 @@ -This work was packaged for Debian by: - - Ding Jianfeng on Fri, 02 Dec 2011 13:00:35 +0800 - -It was downloaded from: - - http://www.tizen.org - -Upstream Authors: - - Intel Inc. - -Copyright: - - Copyright (C) 2011 Intel Inc. diff --git a/distfiles/debian/docs b/distfiles/debian/docs deleted file mode 100644 index a1320b1..0000000 --- a/distfiles/debian/docs +++ /dev/null @@ -1 +0,0 @@ -README.rst diff --git a/distfiles/debian/rules b/distfiles/debian/rules deleted file mode 100755 index f45ef94..0000000 --- a/distfiles/debian/rules +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/make -f - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -build: build-stamp -build-stamp: - dh_testdir - python setup.py build - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - # Installing package - mkdir -p $(CURDIR)/debian/gbs /usr/bin - #make DESTDIR=$(CURDIR)/debian/gbs installman - #make DESTDIR=$(CURDIR)/debian/gbs installconf - #make DESTDIR=$(CURDIR)/debian/gbs installsymlinks - python setup.py install --root=$(CURDIR)/debian/gbs --prefix=/usr --install-layout=deb - -binary-indep: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_install - dh_installman - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary-arch: build install - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/distfiles/gbs.conf b/distfiles/gbs.conf deleted file mode 100644 index 7755326..0000000 --- a/distfiles/gbs.conf +++ /dev/null @@ -1,9 +0,0 @@ -[general] -; general settings -tmpdir = /var/tmp - -[build] -; settings for build subcommand -build_server = https://api.tizen.org -user = my_user_id -passwd = pass_in_plaintxt diff --git a/distfiles/gbs.dsc b/distfiles/gbs.dsc deleted file mode 100644 index 2d5df86..0000000 --- a/distfiles/gbs.dsc +++ /dev/null @@ -1,8 +0,0 @@ -Format: 1.0 -Source: gbs -Version: 0.9 -Binary: gbs -Maintainer: Jian-feng Ding -Architecture: all -Standards-Version: 3.7.1 -Build-Depends: debhelper (>= 4.0.0), python-dev diff --git a/distfiles/gbs.spec b/distfiles/gbs.spec deleted file mode 100644 index d15342f..0000000 --- a/distfiles/gbs.spec +++ /dev/null @@ -1,87 +0,0 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_version: %define python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")} -Name: gbs -Summary: The command line tools for Tizen package developers -Version: 0.15 -Release: 1 -Group: Development/Tools -License: GPLv2 -BuildArch: noarch -URL: http://www.tizen.org -Source0: %{name}_%{version}.tar.gz -Requires: python >= 2.6 -Requires: python-pycurl -Requires: sudo -Requires: osc >= 0.139.0 -Requires: tizen-gbp-rpm >= 20130308 -Requires: depanneur >= 0.6 -Requires: tizen-pristine-tar >= 1.26-tizen20130122 - -%if "%{?python_version}" < "2.7" -Requires: python-argparse -%endif -%if ! 0%{?tizen_version:1} -Requires: librpm-tizen >= 4.11.0.1.tizen20130304-tizen20130307 -%endif -Requires: %{name}-api = %{version} - -BuildRequires: python-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -%description -The command line tools for Tizen package developers will -be used to do packaging related tasks. - -%package api -Summary: GBS APIs -Conflicts: gbs < 0.15 -Requires: python -Requires: python-pycurl -Requires: osc >= 0.139.0 -Requires: git-buildpackage-rpm - -%description api -This package contains gbs APIs, which can be used by -external software. - -%prep -%setup -q -n %{name}-%{version} - - -%build -CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build - - -%install -rm -rf $RPM_BUILD_ROOT -%if 0%{?suse_version} -%{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix} -%else -%{__python} setup.py install --root=$RPM_BUILD_ROOT -O1 -%endif -mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d -install -pm 644 data/gbs-completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/gbs.sh - -#mkdir -p %{buildroot}/%{_prefix}/share/man/man1 -#install -m644 doc/gbs.1 %{buildroot}/%{_prefix}/share/man/man1 - -%files -%defattr(-,root,root,-) -%doc README.rst docs/RELEASE_NOTES -#%{_mandir}/man1/* -%{python_sitelib}/gitbuildsys/cmd_*.py* -%{python_sitelib}/gitbuildsys/conf.py* -%{python_sitelib}/gitbuildsys/parsing.py* -%{_bindir}/* -%{_sysconfdir}/bash_completion.d - -%files api -%defattr(-,root,root,-) -%dir %{python_sitelib}/gitbuildsys -%{python_sitelib}/gitbuildsys/__init__.py* -%{python_sitelib}/gitbuildsys/oscapi.py* -%{python_sitelib}/gitbuildsys/errors.py* -%{python_sitelib}/gitbuildsys/log.py* -%{python_sitelib}/gitbuildsys/safe_url.py* -%{python_sitelib}/gitbuildsys/utils.py* -%{python_sitelib}/gbs-*-py*.egg-info diff --git a/packaging/gbs.dsc b/packaging/gbs.dsc index cb92394..e5888eb 100644 --- a/packaging/gbs.dsc +++ b/packaging/gbs.dsc @@ -5,6 +5,6 @@ Binary: gbs, gbs-api Maintainer: Jian-feng Ding Architecture: all Standards-Version: 3.7.1 -Build-Depends: debhelper (>= 4.0.0), python-dev +Build-Depends: debhelper, python-support Files: 574996dfeeb001e70f20239a0e621daf 2457861 gbs_0.15.tar.gz diff --git a/packaging/gbs.spec b/packaging/gbs.spec deleted file mode 120000 index 3133620..0000000 --- a/packaging/gbs.spec +++ /dev/null @@ -1 +0,0 @@ -../distfiles/gbs.spec \ No newline at end of file diff --git a/packaging/gbs.spec b/packaging/gbs.spec new file mode 100644 index 0000000..d453150 --- /dev/null +++ b/packaging/gbs.spec @@ -0,0 +1,82 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_version: %define python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")} +Name: gbs +Summary: The command line tools for Tizen package developers +Version: 0.15 +Release: 1 +Group: Development/Tools +License: GPLv2 +BuildArch: noarch +URL: http://www.tizen.org +Source0: %{name}_%{version}.tar.gz +Requires: python >= 2.6 +Requires: python-pycurl +Requires: sudo +Requires: osc >= 0.139.0 +Requires: tizen-gbp-rpm >= 20130308 +Requires: depanneur >= 0.6 +Requires: tizen-pristine-tar >= 1.26-tizen20130122 + +%if "%{?python_version}" < "2.7" +Requires: python-argparse +%endif +%if ! 0%{?tizen_version:1} +Requires: librpm-tizen >= 4.11.0.1.tizen20130304-tizen20130307 +%endif +Requires: %{name}-api = %{version} + +BuildRequires: python-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +The command line tools for Tizen package developers will +be used to do packaging related tasks. + +%package api +Summary: GBS APIs +Conflicts: gbs < 0.15 +Requires: python +Requires: python-pycurl +Requires: osc >= 0.139.0 +Requires: git-buildpackage-rpm + +%description api +This package contains gbs APIs, which can be used by +external software. + +%prep +%setup -q -n %{name}-%{version} + + +%build +%{__python} setup.py build + +%install +%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} + +#mkdir -p %{buildroot}/%{_prefix}/share/man/man1 +#install -m644 doc/gbs.1 %{buildroot}/%{_prefix}/share/man/man1 + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc README.rst docs/RELEASE_NOTES +#%{_mandir}/man1/* +%{python_sitelib}/gitbuildsys/cmd_*.py* +%{python_sitelib}/gitbuildsys/conf.py* +%{python_sitelib}/gitbuildsys/parsing.py* +%{_bindir}/* +%{_sysconfdir}/bash_completion.d + +%files api +%defattr(-,root,root,-) +%dir %{python_sitelib}/gitbuildsys +%{python_sitelib}/gitbuildsys/__init__.py* +%{python_sitelib}/gitbuildsys/oscapi.py* +%{python_sitelib}/gitbuildsys/errors.py* +%{python_sitelib}/gitbuildsys/log.py* +%{python_sitelib}/gitbuildsys/safe_url.py* +%{python_sitelib}/gitbuildsys/utils.py* +%{python_sitelib}/gbs-*-py*.egg-info diff --git a/setup.py b/setup.py index 6d9e06f..7269086 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ def get_version(mod_name): path = os.path.join(mod_name, "__init__.py") if not os.path.isfile(path): print 'No %s version file found' % path - return + sys.exit(1) content = open(path).read() match = re.search(r'^__version__\s*=\s*[\x22\x27]([^\x22\x27]+)[\x22\x27]', @@ -23,28 +23,15 @@ def get_version(mod_name): return match.group(1) print 'Unable to find version in %s' % path - - -VERSION = get_version(MOD_NAME) -if not VERSION: sys.exit(1) -# HACK!!! --install-layout=deb must be used in debian/rules -# "--install-layout=deb" is required for pyver>2.5 in Debian likes -if sys.version_info[:2] > (2, 5): - if len(sys.argv) > 1 and 'install' in sys.argv: - import platform - # for debian-like distros, mods will be installed to - # ${PYTHONLIB}/dist-packages - if platform.linux_distribution()[0] in ('debian', 'Ubuntu'): - sys.argv.append('--install-layout=deb') - setup(name='gbs', - version=VERSION, + version=get_version(MOD_NAME), description='The command line tools for Tizen package developers', author='Jian-feng Ding, Huaxu Wan', author_email='jian-feng.ding@intel.com, huaxu.wan@intel.com', url='https://git.tizen.org/', scripts=['tools/gbs'], + data_files = [('/etc/bash_completion.d/', ['data/gbs.sh'])], packages=[MOD_NAME], )