summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Illfelder <illfelder@google.com>2016-05-18 10:27:23 -0700
committerMax Illfelder <illfelder@google.com>2016-05-18 10:27:23 -0700
commitb824af6dd7b5b87d218f75241b9c5fcb1565b752 (patch)
tree94b3bd5604ca8037211b11b6c805a46b4c0d7208
parent6a73a19e7329e507f41f0984904e5e484cfefa44 (diff)
downloadgoogle-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-xpackage.sh9
-rwxr-xr-xsetup.py2
2 files changed, 5 insertions, 6 deletions
diff --git a/package.sh b/package.sh
index 9325d0d..57de839 100755
--- a/package.sh
+++ b/package.sh
@@ -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
diff --git a/setup.py b/setup.py
index d7a3e7f..a0f04af 100755
--- a/setup.py
+++ b/setup.py
@@ -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',