From 39d22ccec726ec8a56ef2771c1315b4a7aee5922 Mon Sep 17 00:00:00 2001 From: Christian Schwede Date: Wed, 12 Feb 2014 20:26:29 +0000 Subject: [PATCH] Don't create bin/* files magically Just use import to make scripts available in bin/ instead of creating these during setup.py install. Change-Id: I7318bbb77f6564ed58736887e711e1c497873471 --- bin/swift-recon | 24 ++++++++++++++++++++++++ bin/swift-ring-builder | 24 ++++++++++++++++++++++++ setup.cfg | 6 ++---- 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100755 bin/swift-recon create mode 100755 bin/swift-ring-builder diff --git a/bin/swift-recon b/bin/swift-recon new file mode 100755 index 0000000000..9a068f915e --- /dev/null +++ b/bin/swift-recon @@ -0,0 +1,24 @@ +#!/usr/bin/python +# Copyright (c) 2014 Christian Schwede +# +# 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. + + +import sys + +from swift.cli.recon import main + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/bin/swift-ring-builder b/bin/swift-ring-builder new file mode 100755 index 0000000000..ed1b3843a8 --- /dev/null +++ b/bin/swift-ring-builder @@ -0,0 +1,24 @@ +#!/usr/bin/python +# Copyright (c) 2014 Christian Schwede +# +# 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. + + +import sys + +from swift.cli.ringbuilder import main + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/setup.cfg b/setup.cfg index 9f37ddbd18..4fc28dc838 100644 --- a/setup.cfg +++ b/setup.cfg @@ -52,7 +52,9 @@ scripts = bin/swift-oldies bin/swift-orphans bin/swift-proxy-server + bin/swift-recon bin/swift-recon-cron + bin/swift-ring-builder bin/swift-temp-url [entry_points] @@ -88,10 +90,6 @@ paste.filter_factory = gatekeeper = swift.common.middleware.gatekeeper:filter_factory container_sync = swift.common.middleware.container_sync:filter_factory -console_scripts = - swift-recon = swift.cli.recon:main - swift-ring-builder = swift.cli.ringbuilder:main - [build_sphinx] all_files = 1 build-dir = doc/build