diff options
author | Max Illfelder <illfelder@google.com> | 2016-05-18 10:27:23 -0700 |
---|---|---|
committer | Max Illfelder <illfelder@google.com> | 2016-05-18 10:27:23 -0700 |
commit | b824af6dd7b5b87d218f75241b9c5fcb1565b752 (patch) | |
tree | 94b3bd5604ca8037211b11b6c805a46b4c0d7208 | |
parent | 6a73a19e7329e507f41f0984904e5e484cfefa44 (diff) | |
download | google-compute-image-packages-b824af6dd7b5b87d218f75241b9c5fcb1565b752.tar.gz |
Style improvements to the Linux packaging.
- Prefix release number with "0." so distros can update and pin to a release.
- Replace underscores with hyphens in package name.
- Add packages to dist-packages instead of sites-packages in deb. This is
consistent with debs in Debian and Ubuntu. Adding to dist-packages avoids
conflicting with Python installed from source.
-rwxr-xr-x | package.sh | 9 | ||||
-rwxr-xr-x | setup.py | 2 |
2 files changed, 5 insertions, 6 deletions
@@ -17,8 +17,7 @@ TIMESTAMP="$(date -u +%Y%m%d%H%M%S)" -for CONFIG in 'systemd' 'sysvinit' 'upstart'; -do +for CONFIG in 'systemd' 'sysvinit' 'upstart'; do export CONFIG="$CONFIG" fpm \ @@ -26,10 +25,10 @@ do -t deb \ --no-python-fix-name \ --python-install-bin '/usr/bin' \ - --python-install-lib '/usr/lib/python2.7/site-packages' \ + --python-install-lib '/usr/lib/python2.7/dist-packages' \ --after-install "package/$CONFIG/postinst.sh" \ --before-remove "package/$CONFIG/prerm.sh" \ - --iteration "$TIMESTAMP" \ + --iteration "0.$TIMESTAMP" \ setup.py fpm \ @@ -40,6 +39,6 @@ do --python-install-lib '/usr/lib/python2.7/site-packages' \ --after-install "package/$CONFIG/postinst.sh" \ --before-remove "package/$CONFIG/prerm.sh" \ - --iteration "$TIMESTAMP" \ + --iteration "0.$TIMESTAMP" \ setup.py done @@ -57,7 +57,7 @@ setuptools.setup( install_requires=['boto>=2.25.0'], license='Apache Software License', long_description='Google Compute Engine guest environment.', - name='google_compute_engine_%s' % os.environ['CONFIG'], + name='google-compute-engine-%s' % os.environ['CONFIG'], packages=setuptools.find_packages(), scripts=glob.glob('scripts/*'), url='https://github.com/GoogleCloudPlatform/compute-image-packages', |