Using "#!/usr/bin/env python" is not recommended as it's not portable.
setuptools provides an console_scripts entry_point that generates
scripts that always have the good sheban whatever the target operating
system and python version/distribution.
http://tracker.ceph.com/issues/36601
Signed-off-by: Mehdi Abaakouk <sileht@sileht.net>
(cherry picked from commit
6a2ed6c285b74f463f223d3501def8ef4e6283b1)
+++ /dev/null
-#!/usr/bin/env python
-
-from ceph_volume import main
-
-if __name__ == '__main__':
- main.Volume()
+++ /dev/null
-#!/usr/bin/env python
-
-from ceph_volume.systemd import main
-
-if __name__ == '__main__':
- main.main()
'pytest >=2.1.3',
'tox',
],
- scripts = ['bin/ceph-volume', 'bin/ceph-volume-systemd'],
+ entry_points = dict(
+ console_scripts = [
+ 'ceph-volume = ceph_volume.main:Volume',
+ 'ceph-volume-systemd = ceph_volume.systemd:main',
+ ],
+ ),
classifiers = [
'Environment :: Console',
'Intended Audience :: Information Technology',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
]
-
)