[ARVADOS] updated: 2cdd9751ed9445db4b313ba6e4fd6a3f6b2d6e49

git at public.curoverse.com git at public.curoverse.com
Tue Feb 18 21:33:59 EST 2014


Summary of changes:
 sdk/python/.gitignore                 |    1 +
 sdk/python/build.sh                   |   16 ++++++++++++++++
 sdk/python/{setup.py => setup.py.src} |    6 +++---
 3 files changed, 20 insertions(+), 3 deletions(-)
 create mode 100755 sdk/python/build.sh
 rename sdk/python/{setup.py => setup.py.src} (78%)

       via  2cdd9751ed9445db4b313ba6e4fd6a3f6b2d6e49 (commit)
      from  8711ee09c09a7501baedf59e26e6b7dd35ed6e5c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2cdd9751ed9445db4b313ba6e4fd6a3f6b2d6e49
Author: Ward Vandewege <ward at curoverse.com>
Date:   Tue Feb 18 21:33:37 2014 -0500

    Improve python sdk package building to allow for easy distribution via
    pypi.

diff --git a/sdk/python/.gitignore b/sdk/python/.gitignore
index 7f9c17b..6d57899 100644
--- a/sdk/python/.gitignore
+++ b/sdk/python/.gitignore
@@ -2,3 +2,4 @@
 /dist/
 /*.egg-info
 /tmp
+setup.py
diff --git a/sdk/python/build.sh b/sdk/python/build.sh
new file mode 100755
index 0000000..4808954
--- /dev/null
+++ b/sdk/python/build.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Apparently the only reliable way to distribute Python packages with pypi and
+# install them via pip is as source packages (sdist).
+#
+# That means that setup.py is run on the system the package is being installed on,
+# outside of the Arvados git tree.
+#
+# In turn, this means that we can not build the minor_version on the fly when
+# setup.py is being executed. Instead, we use this script to generate a 'static'
+# version of setup.py which will can be distributed via pypi.
+
+minor_version=`git log --format=format:%ct.%h -n1 .`
+
+sed "s|%%MINOR_VERSION%%|$minor_version|" < setup.py.src > setup.py
+
diff --git a/sdk/python/setup.py b/sdk/python/setup.py.src
similarity index 78%
rename from sdk/python/setup.py
rename to sdk/python/setup.py.src
index d366e76..bb9e476 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py.src
@@ -1,15 +1,15 @@
 from setuptools import setup
 import subprocess
 
-minor_version = subprocess.check_output(
-    ['git', 'log', '--format=format:%ct.%h', '-n1', '.'])
+minor_version = '%%MINOR_VERSION%%'
 
 setup(name='arvados-python-client',
       version='0.1.' + minor_version,
       description='Arvados client library',
       author='Arvados',
       author_email='info at arvados.org',
-      url="https://github.com/curoverse/arvados.git",
+      url="https://arvados.org",
+      download_url="https://github.com/curoverse/arvados.git",
       license='Apache 2.0',
       packages=['arvados'],
       scripts=[

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list