Switch back to pre-created scripts

The script generated by setuptools does not work properly in containers
in case storlets is installed into venv at host.

Change-Id: If41a782983269956f81ab7811ae54f2ec05de35e
This commit is contained in:
Takashi Kajinami 2025-01-06 23:50:57 +09:00
parent 0edc71a6d0
commit 0bac79d7bd
4 changed files with 45 additions and 3 deletions

20
bin/storlets-daemon Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env python3
#
# 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.
from storlets.agent.daemon.server import main
if __name__ == '__main__':
main()

20
bin/storlets-daemon-factory Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env python3
#
# 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.
from storlets.agent.daemon_factory.server import main
if __name__ == '__main__':
main()

View File

@ -211,7 +211,7 @@ function install_storlets_code {
pip_install . -t /usr/local/lib/storlets/python --no-compile --no-deps
sudo mkdir -p -m 755 /usr/local/libexec/storlets
for bin_file in storlets-daemon storlets-daemon-factory ; do
sudo cp `which ${bin_file}` /usr/local/libexec/storlets/
sudo cp ./bin/${bin_file} /usr/local/libexec/storlets/
done
sudo mkdir -p -m 0755 $STORLETS_DOCKER_DEVICE

View File

@ -31,6 +31,10 @@ skip_changelog = True
packages =
storlets
scripts =
bin/storlets-daemon
bin/storlets-daemon-factory
[entry_points]
paste.filter_factory =
storlet_handler = storlets.swift_middleware.storlet_handler:filter_factory
@ -41,8 +45,6 @@ storlets.gateways =
console_scripts =
sbus = storlets.sbus.cli:main
storlets-daemon = storlets.agent.daemon.server:main
storlets-daemon-factory = storlets.agent.daemon_factory.server:main
[codespell]
quiet-level = 4