diff --git a/.gitignore b/.gitignore index b254f2e5..a433d9f2 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ build dist *.egg +*.eggs .testrepository .cache .tox diff --git a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/hooks.py b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/hooks.py new file mode 100644 index 00000000..1db2aa45 --- /dev/null +++ b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/hooks.py @@ -0,0 +1,21 @@ +# Copyright 2016 Mirantis, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +def setup_hook(config): + import pbr + import pbr.packaging + + # this monkey patch is to avoid appending git version to version + pbr.packaging._get_version_from_git = lambda pre_version: pre_version diff --git a/contrib/fuel_bootstrap/fuel_bootstrap_cli/setup.cfg b/contrib/fuel_bootstrap/fuel_bootstrap_cli/setup.cfg index 2dd1b6f8..f2e4ca6a 100644 --- a/contrib/fuel_bootstrap/fuel_bootstrap_cli/setup.cfg +++ b/contrib/fuel_bootstrap/fuel_bootstrap_cli/setup.cfg @@ -22,6 +22,11 @@ classifier = packages = fuel_bootstrap +[global] +setup-hooks = + pbr.hooks.setup_hook + fuel_bootstrap.hooks.setup_hook + [entry_points] console_scripts = fuel-bootstrap=fuel_bootstrap.main:main